Regular 16 steps volume adjustment is not enough for smooth adjustment. In Android 4.4 I did 60 steps on /frameworks/base/media/java/android/media/AudioService.java file for smooth adjustment of the encoder. But android 6 and 7 does not has this file (AudioService.java). It has file AudioSystem.java only and in it set to the default volume.
public static int DEFAULT_STREAM_VOLUME = new int {
4, // STREAM_VOICE_CALL
7, // STREAM_SYSTEM
5, // STREAM_RING
11, // STREAM_MUSIC
6, // STREAM_ALARM
5, // STREAM_NOTIFICATION
7, // STREAM_BLUETOOTH_SCO
7, // STREAM_SYSTEM_ENFORCED
11, // STREAM_DTMF
11 // STREAM_TTS
};
You can refer to Volume_button_patch
It is only for reference, can’t apply this patch directly.
Have a try. Thanks Notice: Need to add ro.khadas.systembar.voiceicon=true into file build.prop