The Android audio curve call is set down from the ui. There are different UIS Based on stream audio, which are divided into 7 and 15 steps, corresponding to the actual step 100. For the conversion process, see the volIndexToAmpl function in AudioPolicyManagerBase. cpp. 4.1 The Calling process is different from the previous one, and the principle is the same. I think the previous version is linear, and the new version is a three-segment line. Why is it a straight line? The Voice perception is not linear, but a logarithm. This can correspond to the android principle with a base-10 logarithm. The following is the derivation of the decibel formula. In the audio, the db uses addition and subtraction to adjust the volume. Currently, three broken lines are used. I think it is more convenient to adjust the variation of sound in different regions. The lowest and highest voices should be adjusted from the lower-layer driver. The volIndexToAmpl function implements the preceding Conversion Relationship. This function starts the following call process by responding to the volume key benefits to adjust the volume. The following is the call process of Audiomanager after the volume key is pressed. java handleKeyDown adjustSuggestStreamVolume service. adjustSuggestStreamVolume AudioService. java adjustSuggestStreamVolume adjustStreamVolum sendMSG (mAudioHandler, MSG_SET_DEVICE_VOLUME, SND_QUEUE, device, 0, streamstate, 0); message mechanism AudioService. java AudioHandler handleMessage setDeviceVolume StreamState. applyDeviceVolume audioSystem. setStreamVolumeIndex JNI mechanism Android_media_AudioSystem.cpp AudioPolicyManagerBase. cpp setStreamVolumeIndex checkAndSetVolume computeVolume volIndexToAmpl