Closed BYZYB closed 3 years ago
According to user feedbacks, media volume becomes able to control again after using any of the equalizers. On lineage roms, there is an AudioFX app which could be used as prebuilt equalizer (even in "Normal" mode). For both 16.0 and 17.0, AudioFX was removed from the rom by default, and nothing wrong happened to the former one. However, things became worse on 17.0, as the call/media volume will lost control when doing normal output. Using AudioFX as equalizer to bypass this issue is surely available. But this shouldn't be the end of this issue, as the real problem has not been fixed yet.
Hi WJXXBSH,
I've recorded video regarding this issue where you can see that when music plays and by adjusting ring Call Volume you can influence sound sources what shouldn't have happened. In this case when changing Call Volume the sound is being directed to the call speaker for a moment and backs to phone speaker again. I thought that this might help you a bit. I can upload the video if like?
Regards,
Also, it doesn't matter if I call to someone using Headset or talking through a phone. I can't set Call Volume, in both cases. I have AudioFX set to normal and it doesn't change anything. This issue affects pretty essential phone function, so I am eager to help solving it as much as I am able to :-)
Description
When playing some audio/video files with local media player (like Eleven), the media volume is out of control (always maximum). It seems that the audio output is outside Android system and sent to the speaker directly. This issue never happens when using software decoding, like playing music from a web browser. Lineage-16.0 is still not affected by this issue.
Generate the acdb ids from OEM provided rom's audio hal and copy the generated ids to audio_platform_info.xml.
Acdb ids generator: https://github.com/luca020400/acdb_get
Reference commit: https://github.com/SunnyRaj84348/android_device_xiaomi_riva/commit/a8b074a9c1c557553bd9a78b47dcdf2d91f551f8
Generate the acdb ids from OEM provided rom's audio hal and copy the generated ids to audio_platform_info.xml.
Acdb ids generator: https://github.com/luca020400/acdb_get
Reference commit: SunnyRaj84348/android_device_xiaomi_riva@a8b074a
Thanks for your help. I have added the acdb ids (generated by acdb_get, see commit 7b78cccd26afeaa9bcdc2824db35b098c956a9d8) into audio_platform_info.xml, but this issue still exists. I didn't rebuild the rom, but replaced original audio_platform_info.xml with the new one (nothing wrong with file permission).
Here are the new logs:
08-09 22:35:48.456 5090 5090 V MediaRouter: Selecting route: RouteInfo{ name=手机, description=null, status=null, category=RouteCategory{ name=系统 types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
08-09 22:35:48.459 5090 5090 I MediaRouter: Found default route: MediaRouter.RouteInfo{ uniqueId=android/androidx.mediarouter.media.SystemMediaRouteProvider:DEFAULT_ROUTE, name=手机, description=null, iconUri=null, enabled=true, connecting=false, connectionState=0, canDisconnect=false, playbackType=0, playbackStream=3, deviceType=0, volumeHandling=1, volume=0, volumeMax=15, presentationDisplayId=-1, extras=null, settingsIntent=null, providerPackageName=android }
08-09 22:35:48.459 5090 5090 I MediaRouter: Unselecting the current route because it is no longer selectable: null
08-09 22:35:48.576 5090 5090 V MediaRouter: Selecting route: RouteInfo{ name=手机, description=null, status=null, category=RouteCategory{ name=系统 types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
08-09 22:35:48.594 5090 5090 W MediaPlayer: Use of stream types is deprecated for operations other than volume control
08-09 22:35:48.594 5090 5090 W MediaPlayer: See the documentation of setAudioStreamType() for what to use instead with android.media.AudioAttributes to qualify your playback use case
08-09 22:35:48.623 5090 5090 V MediaPlayer: resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
08-09 22:35:48.623 5090 5090 V MediaPlayer: cleanDrmObj: mDrmObj=null mDrmSessionId=null
08-09 22:35:48.628 537 3821 D NuPlayerDriver: NuPlayerDriver(0xf2d2d200) created, clientPid(5090)
08-09 22:35:48.629 537 3821 I Codec2Client: Creating a Codec2 client to service "software"
08-09 22:35:48.631 537 3821 I Codec2Client: Client to Codec2 service "software" created
08-09 22:35:48.635 537 5168 D GenericSource: FileSource remote
08-09 22:35:48.656 537 5167 I GenericSource: start
08-09 22:35:48.666 450 578 D audio_hw_extn: audio_extn_get_parameters: returns
08-09 22:35:48.666 450 578 I hash_map_utils: key: 'vr_audio_mode_on' value: ''
08-09 22:35:48.666 450 578 I AudioFlinger: openOutput() this 0x7fb6782600, module 10 Device 0x2, SamplingRate 44100, Format 0x1000000, Channels 0x3, flags 0x31
08-09 22:35:48.666 450 578 D audio_hw_primary: adev_open_output_stream: enter: sample_rate(44100) channel_mask(0x3) devices(0x2) flags(0x31) stream_handle(0x7f31532000)
08-09 22:35:48.667 450 578 D audio_hw_primary: adev_open_output_stream: Stream (0x7f31532000) picks up usecase (compress-offload-playback2)
08-09 22:35:48.667 450 578 I AudioFlinger: HAL output buffer size 32768 frames, normal sink buffer size 32768 frames
08-09 22:35:48.667 450 5175 I AudioFlinger: AudioFlinger's thread 0x7f3153c000 tid=5175 ready to run
08-09 22:35:48.673 5090 5090 V MediaRouter: Selecting route: RouteInfo{ name=手机, description=null, status=null, category=RouteCategory{ name=系统 types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
08-09 22:35:48.675 450 578 D AF::TrackHandle: OpPlayAudio: track:55 usage:1 not muted
08-09 22:35:48.677 450 578 W AudioFlinger: moveEffectChain_l() effect chain for session 0 not on source thread 0x7f2d8bf780
08-09 22:35:48.703 450 5175 D audio_hw_primary: out_set_parameters: enter: usecase(4: compress-offload-playback2) kvpairs: routing=2
08-09 22:35:48.706 450 5175 D audio_hw_primary: copl(0x7f31532000):calling compress flush
08-09 22:35:48.706 450 5175 D audio_hw_primary: copl(0x7f31532000):out of compress flush
08-09 22:35:48.709 450 5175 D audio_hw_primary: out_set_parameters: enter: usecase(4: compress-offload-playback2) kvpairs: delay_samples=576;music_offload_avg_bit_rate=320000;music_offload_sample_rate=44100;padding_samples=1681
08-09 22:35:48.731 450 5177 D audio_hw_primary: start_output_stream: enter: stream(0x7f31532000)usecase(4: compress-offload-playback2) devices(0x2)
08-09 22:35:48.731 450 5177 E audio_hw_extn: audio_extn_perf_lock_acquire: Incorrect params, Failed to acquire perf lock, err
08-09 22:35:48.731 450 5177 D audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
08-09 22:35:48.731 450 5177 W msm8974_platform: Codec backend bitwidth 16, samplerate 48000
08-09 22:35:48.731 450 5177 D hardware_info: hw_info_append_hw_type : device_name = speaker
08-09 22:35:48.731 450 5177 D audio_hw_primary: enable_snd_device: snd_device(2: speaker)
08-09 22:35:48.731 450 5177 D audio_route: Apply path: speaker
08-09 22:35:48.736 450 5177 I audio_hw_primary: select_devices Selected apptype: 69936
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 14, path = 0
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> send_asm_topology
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> send_adm_topology
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> send_audtable
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> send_audvoltable
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> send_afe_cal
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> send_hw_delay : acdb_id = 14 path = 0
08-09 22:35:48.736 450 5177 D ACDB-LOADER: ACDB -> ACDB_AVSYNC_INFO: ACDB_CMD_GET_DEVICE_PROPERTY
08-09 22:35:48.737 450 5177 I audio_hw_utils: audio_extn_utils_send_app_type_cfg app_type 69936, acdb_dev_id 14, sample_rate 48000
08-09 22:35:48.737 450 5177 D audio_hw_primary: enable_audio_route: apply mixer and update path: compress-offload-playback2
08-09 22:35:48.737 450 5177 D audio_route: Apply path: compress-offload-playback2
08-09 22:35:48.737 450 5177 D audio_hw_primary: select_devices: done
08-09 22:35:48.737 450 5177 D msm8974_platform: platform_set_channel_map mixer_ctl_name:Playback Channel Map17
08-09 22:35:48.738 450 5177 D msm8974_platform: platform_set_channel_map: set mapping(1 2 0 0 0 0 0 0) for channel:2
08-09 22:35:48.773 450 5177 E audio_hw_extn: audio_extn_perf_lock_release: Perf lock release error
08-09 22:35:48.773 450 5177 D audio_hw_primary: start_output_stream: exit
08-09 22:35:48.773 450 5177 D audio_hw_primary: copl(0x7f31532000):send new gapless metadata
08-09 22:35:48.784 450 5177 D audio_hw_primary: No space available in compress driver, post msg to cb thread
08-09 22:35:48.785 450 5173 D audio_hw_primary: copl(0x7f31532000):calling compress_wait
08-09 22:35:48.910 406 5178 E ResolverController: No valid NAT64 prefix (100, <unspecified>/0)
08-09 22:35:49.466 450 5173 D audio_hw_primary: copl(0x7f31532000):out of compress_wait
08-09 22:35:49.468 450 5177 D audio_hw_primary: No space available in compress driver, post msg to cb thread
08-09 22:35:49.469 450 5173 D audio_hw_primary: copl(0x7f31532000):calling compress_wait
08-09 22:35:50.270 537 537 D NuPlayerDriver: pause(0xf2d2d200)
08-09 22:35:50.271 450 5175 D audio_hw_primary: copl(0x7f31532000):pause compress driver
08-09 22:35:50.276 450 5173 D audio_hw_primary: copl(0x7f31532000):out of compress_wait
08-09 22:35:50.327 450 569 W AudioFlinger: moveEffectChain_l() effect chain for session 0 not on source thread 0x7f3153c000
08-09 22:35:51.505 537 537 D NuPlayerDriver: stop(0xf2d2d200)
08-09 22:35:51.505 5090 5090 V MediaPlayer: resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
08-09 22:35:51.505 5090 5090 V MediaPlayer: cleanDrmObj: mDrmObj=null mDrmSessionId=null
08-09 22:35:51.505 537 537 D NuPlayerDriver: reset(0xf2d2d200) at state 8
08-09 22:35:51.509 450 5175 D audio_hw_primary: out_set_parameters: enter: usecase(4: compress-offload-playback2) kvpairs: routing=0
08-09 22:35:51.510 450 5175 D audio_hw_primary: out_set_parameters: enter: usecase(4: compress-offload-playback2) kvpairs: closing=true
08-09 22:35:51.512 537 5167 D NuPlayerDriver: notifyResetComplete(0xf2d2d200)
08-09 22:35:51.513 450 569 D audio_hw_primary: out_set_parameters: enter: usecase(4: compress-offload-playback2) kvpairs: exiting=1
08-09 22:35:51.514 450 5175 D audio_hw_primary: copl(0x7f31532000):calling compress flush
08-09 22:35:51.514 537 537 W AMessage: failed to post message as target looper for handler 0 is gone.
08-09 22:35:51.515 450 5175 D audio_hw_primary: copl(0x7f31532000):out of compress flush
08-09 22:35:51.515 450 5175 D audio_hw_primary: out_standby: enter: stream (0x7f31532000) usecase(4: compress-offload-playback2)
08-09 22:35:51.515 450 5175 D audio_hw_primary: copl(0x7f31532000):standby
08-09 22:35:51.517 5090 5090 W MediaPlayer: mediaplayer went away with unhandled events
08-09 22:35:51.535 450 5175 D audio_hw_primary: disable_audio_route: reset and update mixer path: compress-offload-playback2
08-09 22:35:51.536 450 5175 D hardware_info: hw_info_append_hw_type : device_name = speaker
08-09 22:35:51.536 450 5175 D audio_hw_primary: disable_snd_device: snd_device(2: speaker)
08-09 22:35:51.538 450 569 D audio_hw_primary: adev_close_output_stream: enter:stream_handle(0x7f31532000)
08-09 22:35:51.538 450 569 D audio_hw_primary: out_standby: enter: stream (0x7f31532000) usecase(4: compress-offload-playback2)
WJXXBSH what I remember usually on Android the default action for volume +/- buttons was changing ring volume when pressed on Desktop. Here I can see that I manipulate Media Volume. Is that normal or intentional?
WJXXBSH what I remember usually on Android the default action for volume +/- buttons was changing ring volume when pressed on Desktop. Here I can see that I manipulate Media Volume. Is that normal or intentional?
When using previous version of Android, the volume keys are surely controlling ring volume. But on Android 9 or newer, the default action is changed to media volume, which is normal.
Generate the acdb ids from OEM provided rom's audio hal and copy the generated ids to audio_platform_info.xml. Acdb ids generator: https://github.com/luca020400/acdb_get Reference commit: SunnyRaj84348/android_device_xiaomi_riva@a8b074a
Thanks for your help. I have added the acdb ids (generated by acdb_get, see commit 7b78ccc) into audio_platform_info.xml, but this issue still exists. I didn't rebuild the rom, but replaced original audio_platform_info.xml with the new one (nothing wrong with file permission).
Try the acdb ids from similar soc device and check, in my case it didn't worked with Redmi 5A(riva) stock audio hal acdb data but worked with Redmi 4A (rolex) acdb data.
Try the acdb ids from similar soc device and check, in my case it didn't worked with Redmi 5A(riva) stock audio hal acdb data but worked with Redmi 4A (rolex) acdb data.
I tried to use the acdb data from some similar devices, but nothing changed in each test. After searching for more audio_platform_info.xml from those devices as references, I noticed that the current one has only two sections: "acdb_ids" and "bit_width_configs". However, other devices has more sections in this xml file (like "pcm_ids" or "backend_names"). So I did many tests (to find out what effect one section has), and confirmed that "pcm_ids" section is necessary to solve this issue. After taking "pcm_ids" from mido ("acdb_ids" is dumped from stock rom), the media volume is back to normal again.
<pcm_ids>
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD2" type="out" id="24" />
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD3" type="out" id="27" />
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD4" type="out" id="28" />
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD5" type="out" id="29" />
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD6" type="out" id="30" />
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD7" type="out" id="31" />
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD8" type="out" id="32" />
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD9" type="out" id="33" />
<usecase name="USECASE_VOICEMMODE1_CALL" type="in" id="34" />
<usecase name="USECASE_VOICEMMODE1_CALL" type="out" id="34" />
<usecase name="USECASE_VOICEMMODE2_CALL" type="in" id="35" />
<usecase name="USECASE_VOICEMMODE2_CALL" type="out" id="35" />
</pcm_ids>
But some other problems appeared:
08-10 13:53:27.755 6729 6729 D SoundRecorderService: Sound recorder service started recording…
08-10 13:53:27.767 452 665 D audio_hw_primary: adev_open_input_stream: enter: sample_rate(44100) channel_mask(0x10) devices(0x80000004) stream_handle(0x7f313c3700) io_handle(70) source(1)
08-10 13:53:27.769 452 6758 I AudioFlinger: AudioFlinger's thread 0x7f1b8799c0 tid=6758 ready to run
08-10 13:53:27.769 452 6758 D audio_hw_primary: in_standby: enter: stream (0x7f313c3700) usecase(16: audio-record)
08-10 13:53:27.769 452 6758 D audio_hw_primary: in_standby: enter: stream (0x7f313c3700) usecase(16: audio-record)
08-10 13:53:27.777 452 6758 D audio_hw_primary: in_set_parameters: enter: kvpairs=bottom=;input_source=1;routing=-2147483644
08-10 13:53:27.784 452 6759 D audio_hw_primary: start_input_stream: enter: stream(0x7f313c3700)usecase(16: audio-record)
08-10 13:53:27.784 452 6759 E audio_hw_extn: audio_extn_perf_lock_acquire: Incorrect params, Failed to acquire perf lock, err
08-10 13:53:27.784 452 6759 D audio_hw_primary: select_devices: out_snd_device(0: ) in_snd_device(36: handset-mic)
08-10 13:53:27.784 452 6759 D hardware_info: hw_info_append_hw_type : device_name = handset-mic
08-10 13:53:27.784 452 6759 D audio_hw_primary: enable_snd_device: snd_device(36: handset-mic)
08-10 13:53:27.784 452 6759 D audio_route: Apply path: handset-mic
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 1, path = 1
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> send_asm_topology
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> send_adm_topology
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> send_audtable
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> send_audvoltable
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> send_afe_cal
08-10 13:53:27.792 452 6759 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
08-10 13:53:27.793 452 6759 D : Failed to fetch the lookup information of the device 00000001
08-10 13:53:27.793 452 6759 E ACDB-LOADER: Error: ACDB AFE returned = -19
08-10 13:53:27.793 452 6759 D ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
08-10 13:53:27.793 452 6759 D ACDB-LOADER: ACDB -> send_hw_delay : acdb_id = 1 path = 1
08-10 13:53:27.793 452 6759 D ACDB-LOADER: ACDB -> ACDB_AVSYNC_INFO: ACDB_CMD_GET_DEVICE_PROPERTY
08-10 13:53:27.793 452 6759 D audio_hw_primary: enable_audio_route: apply mixer and update path: audio-record
08-10 13:53:27.793 452 6759 D audio_route: Apply path: audio-record
08-10 13:53:27.794 452 6759 D audio_hw_primary: select_devices: done
08-10 14:15:14.362 541 4717 I GenericSource: start
08-10 14:15:14.365 4626 4626 V MediaRouter: Selecting route: RouteInfo{ name=手机, description=null, status=null, category=RouteCategory{ name=系统 types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
08-10 14:15:14.377 450 621 D audio_hw_extn: audio_extn_get_parameters: returns
08-10 14:15:14.378 450 621 I hash_map_utils: key: 'vr_audio_mode_on' value: ''
08-10 14:15:14.378 450 621 I AudioFlinger: openOutput() this 0x7fb6782600, module 10 Device 0x2, SamplingRate 44100, Format 0x1000000, Channels 0x3, flags 0x31
08-10 14:15:14.378 450 621 D audio_hw_primary: adev_open_output_stream: enter: sample_rate(44100) channel_mask(0x3) devices(0x2) flags(0x31) stream_handle(0x7f31321000)
08-10 14:15:14.378 450 621 D audio_hw_primary: adev_open_output_stream: Stream (0x7f31321000) picks up usecase (compress-offload-playback2)
08-10 14:15:14.378 450 621 I AudioFlinger: HAL output buffer size 32768 frames, normal sink buffer size 32768 frames
08-10 14:15:14.379 450 4726 I AudioFlinger: AudioFlinger's thread 0x7f31325000 tid=4726 ready to run
08-10 14:15:14.387 450 621 D AF::TrackHandle: OpPlayAudio: track:55 usage:1 not muted
08-10 14:15:14.392 450 623 W AudioFlinger: moveEffectChain_l() effect chain for session 0 not on source thread 0x7f2d8dd780
08-10 14:15:14.418 450 4726 D audio_hw_primary: out_set_parameters: enter: usecase(4: compress-offload-playback2) kvpairs: routing=2
08-10 14:15:14.420 450 4726 E audio_hw_primary: out_set_volume: Could not get ctl for mixer cmd - Compress Playback 24 Volume
08-10 14:15:14.420 450 4726 W StreamHAL: Error from HAL stream in function set_volume: Invalid argument
08-10 14:15:14.420 450 4726 D audio_hw_primary: copl(0x7f31321000):calling compress flush
08-10 14:15:14.420 450 4726 D audio_hw_primary: copl(0x7f31321000):out of compress flush
08-10 14:15:14.421 450 4726 D audio_hw_primary: out_set_parameters: enter: usecase(4: compress-offload-playback2) kvpairs: delay_samples=576;music_offload_avg_bit_rate=320000;music_offload_sample_rate=44100;padding_samples=1681
08-10 14:15:14.432 450 4726 E audio_hw_primary: out_set_volume: Could not get ctl for mixer cmd - Compress Playback 24 Volume
08-10 14:15:14.432 450 4726 W StreamHAL: Error from HAL stream in function set_volume: Invalid argument
08-10 14:15:14.434 450 4728 D audio_hw_primary: start_output_stream: enter: stream(0x7f31321000)usecase(4: compress-offload-playback2) devices(0x2)
08-10 14:15:14.434 450 4728 E audio_hw_extn: audio_extn_perf_lock_acquire: Incorrect params, Failed to acquire perf lock, err
08-10 14:15:14.434 450 4728 D audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
08-10 14:15:14.434 450 4728 W msm8974_platform: Codec backend bitwidth 16, samplerate 48000
08-10 14:15:14.434 450 4728 D hardware_info: hw_info_append_hw_type : device_name = speaker
08-10 14:15:14.434 450 4728 D audio_hw_primary: enable_snd_device: snd_device(2: speaker)
08-10 14:15:14.434 450 4728 D audio_route: Apply path: speaker
08-10 14:15:14.439 450 4728 I audio_hw_primary: select_devices Selected apptype: 69936
08-10 14:15:14.439 450 4728 D ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 14, path = 0
08-10 14:15:14.439 450 4728 D ACDB-LOADER: ACDB -> send_asm_topology
08-10 14:15:14.439 450 4728 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
08-10 14:15:14.439 450 4728 D ACDB-LOADER: ACDB -> send_adm_topology
08-10 14:15:14.439 450 4728 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
08-10 14:15:14.439 450 4728 D ACDB-LOADER: ACDB -> send_audtable
08-10 14:15:14.439 450 4728 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
08-10 14:15:14.439 450 4728 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
08-10 14:15:14.439 450 4728 D ACDB-LOADER: ACDB -> send_audvoltable
08-10 14:15:14.439 450 4728 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
08-10 14:15:14.439 450 4728 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
08-10 14:15:14.440 450 4728 D ACDB-LOADER: ACDB -> send_afe_cal
08-10 14:15:14.440 450 4728 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
08-10 14:15:14.440 450 4728 D ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
08-10 14:15:14.440 450 4728 D ACDB-LOADER: ACDB -> send_hw_delay : acdb_id = 14 path = 0
08-10 14:15:14.440 450 4728 D ACDB-LOADER: ACDB -> ACDB_AVSYNC_INFO: ACDB_CMD_GET_DEVICE_PROPERTY
08-10 14:15:14.440 450 4728 E audio_hw_utils: audio_extn_utils_send_app_type_cfg: Could not get ctl for mixer cmd - Audio Stream 24 App Type Cfg
08-10 14:15:14.440 450 4728 D audio_hw_primary: enable_audio_route: apply mixer and update path: compress-offload-playback2
08-10 14:15:14.440 450 4728 D audio_route: Apply path: compress-offload-playback2
08-10 14:15:14.441 450 4728 D audio_hw_primary: select_devices: done
08-10 14:15:14.441 450 4728 D msm8974_platform: platform_set_channel_map mixer_ctl_name:Playback Channel Map24
08-10 14:15:14.441 450 4728 E msm8974_platform: platform_set_channel_map: Could not get ctl for mixer cmd - Playback Channel Map24
08-10 14:15:14.441 450 4728 E audio_hw_primary: start_output_stream: cannot open device '/dev/snd/comprC0D24': No such file or directory
08-10 14:15:14.441 450 4728 E audio_hw_extn: audio_extn_perf_lock_release: Perf lock release error
08-10 14:15:14.441 450 4728 D audio_hw_primary: disable_audio_route: reset and update mixer path: compress-offload-playback2
Obviously, part of those values are not right, more works need to be done.
Try the acdb ids from similar soc device and check, in my case it didn't worked with Redmi 5A(riva) stock audio hal acdb data but worked with Redmi 4A (rolex) acdb data.
I tried to use the acdb data from some similar devices, but nothing changed in each test. After searching for more audio_platform_info.xml from those devices as references, I noticed that the current one has only two sections: "acdb_ids" and "bit_width_configs". However, other devices has more sections in this xml file (like "pcm_ids" or "backend_names"). So I did many tests (to find out what effect one section has), and confirmed that "pcm_ids" section is necessary to solve this issue. After taking "pcm_ids" from mido ("acdb_ids" is dumped from stock rom), the media volume is back to normal again.
But some other problems appeared:
- audio recording broken (using lineage recorder app), but video recording works properly
- audio player stucks when playing music for the first time after reboot (eg. stops at 00:00 with no audio output when playing), but backs to normal when playing again Obviously, part of those values are not right, more works need to be done.
Try to add config_params backend_names snd_dev from https://source.codeaurora.org/quic/la/platform/hardware/qcom/audio/tree/configs/msm8937/audio_platform_info.xml?h=LA.UM.8.6.r1-04700-89xx.0
Check for further required changes of mic characteristics.
Has your newest build implemented solution for this issue? I have upgraded your ROM, but Phone volume hasn't been resolved in my device. Also new bug has arrived: I can't turn on Bluetooth, at all. It's starting, but can't be turned on :-(
Has your newest build implemented solution for this issue? I have upgraded your ROM, but Phone volume hasn't been resolved in my device. Also new bug has arrived: I can't turn on Bluetooth, at all. It's starting, but can't be turned on :-(
The phone volume is different from media volume (uses different ways to output), as this new build is for testing media volume (works without AudioFX or other equalizer apps). For the Bluetooth issue, installing this new kernel will fix it (sorry for my mistake, I just noticed this issue last night when connecting to my Mi-band).
OMG: I thought this is this issue. I'm waiting for the fix. OK, so I installed from the scratch your build lineage-17.1-20200714 (with wipe everything, including Internal Storage). From some time I cannot control Volume of a phone call, at all (it might be from the beginning of using this ROM). My speaker wants to explode from the phone and my ear is aching and what's more everything is audible what my interlocutor saying. Should I create another bug to not mix up issues? Please help as this is an essential functionality for me and I'm on the edge of deciding to go back to Lineage 14.1 as beside the design was awkward it was the most stable one for me.
OMG: I thought this is this issue. I'm waiting for the fix. OK, so I installed from the scratch your build lineage-17.1-20200714 (with wipe everything, including Internal Storage). From some time I cannot control Volume of a phone call, at all (it might be from the beginning of using this ROM). My speaker wants to explode from the phone and my ear is aching and what's more everything is audible what my interlocutor saying. Should I create another bug to not mix up issues? Please help as this is an essential functionality for me and I'm on the edge of deciding to go back to Lineage 14.1 as beside the design was awkward it was the most stable one for me.
Sorry for the inconvenience about this issue, but I'm eager to fix it too. The same audio configuration has no issue on lineage-16.0 (exactly, most things are also the same), and there is other roms like Mokee which also uses such audio configs with no issue after all. It's kind of confused to make a full fix currently, as I just started to fix this issue days ago.
I'm not much advanced user, but if there's anyway I can help I am eager to do so. Thank you for the kernel. Bluetooth is working fine now. I tested Mokee 9.0 and I had an issue with Call Volume, but it was different. No matter what Volume level was set at the beginning, when I called anyone the volume was at the highest level (even though mixer shows that Call Volume was at the lowest level). However, I could use hardware Volume button - to decrease the volume. Here in your build I have no control at all. What's more Mokee has SELinux in permissive mode permanently.
Just a few ideas about possible root cause of the issue(s):
Some time ago I was comparing Mokee, eOS, your and MIUI.eu BUILD.PROP I've noticed that for instance Mokee's BUILD.PROP is very similar to MIUI.eu. I'm just pointing out some other aspects which you might not take into consideration, although it's only my limited view on the subject :-) I thought that, cause you mentioned that in your build based on Lineage 16.0 everything worked fine or using the same audio configs as Mokee in your ROM there's an issue.
Just a few ideas about possible root cause of the issue(s):
- Could that issue be connected with Kernel anyhow?
- I haven't noticed any issues with Media Volume I have issue with Call Volume so could that be connected with installed applications?
- Could that be caused be any specific settings, not only sound settings?
Some time ago I was comparing Mokee, eOS, your and MIUI.eu BUILD.PROP I've noticed that for instance Mokee's BUILD.PROP is very similar to MIUI.eu. I'm just pointing out some other aspects which you might not take into consideration, although it's only my limited view on the subject :-) I thought that, cause you mentioned that in your build based on Lineage 16.0 everything worked fine or using the same audio configs as Mokee in your ROM there's an issue.
If you think the kernel causes this issue, you could install the "boot.img" from Mokee roms then test audio output (I think the device will boot up with something broken, so make a backup first).
The media volume has been fixed (partially, may have bugs) in the latest pre-release (20200812), so there should be nothing wrong with it. I don't think this issue is casued by 3rd-party apps, even a clean install will change nothing (if you've made a full backup, you could try).
I can't deny this question, but I don't remember related settings about this. A clean install should also give an answer.
This might be the reason why the call volume lost control (seems different from media volume):
08-15 22:45:58.288 452 1522 D AudioPolicyManagerCustom: setForceUse() usage 7, config 0, mPhoneState 2
08-15 22:45:58.290 452 1522 D APM_AudioPolicyManager: setVolumeCurveIndex: wrong index 0 min=1 max=7
08-15 22:45:58.290 452 1522 E APM_AudioPolicyManager: setVolumeIndexForAttributes failed to set curve index for group 2 device 0x2
08-15 22:45:58.290 645 2030 E AudioSystem-JNI: Command failed for android_media_AudioSystem_setStreamVolumeIndex: -22
08-15 22:45:58.290 452 1522 D APM_AudioPolicyManager: setVolumeCurveIndex: wrong index 0 min=1 max=7
08-15 22:45:58.290 452 1522 E APM_AudioPolicyManager: setVolumeIndexForAttributes failed to set curve index for group 2 device 0x40000000
08-15 22:45:58.290 645 2030 E AudioSystem-JNI: Command failed for android_media_AudioSystem_setStreamVolumeIndex: -22
Kernel from Mokee_10 - 202008150857 doesn't solve the issue with Phone Call Volume. I did totally clean install of your latest Build from August without installing and doing anything. The issue with lost control of Phone Call Volume exists from the beginning :-(((((((
* [ ] Fix audio recoding issue (caused by the first one, priority: 2)
One thing i observed regarding this issue: It looks like the phone wants to use the headphone audio. And when a headphone is connected it works without problems.
Logcat:
11-04 20:33:57.654 19750 19750 W AudioManager: Use of stream types is deprecated for operations other than volume control
11-04 20:33:57.655 19750 19750 W AudioManager: See the documentation of requestAudioFocus() for what to use instead with android.media.AudioAttributes to qualify your playback use case
11-04 20:33:57.657 648 14654 I MediaFocusControl: requestAudioFocus() from uid/pid 10108/19750 clientId=android.media.AudioManager@4ef75e8org.telegram.messenger.-$$Lambda$MediaController$AYThFpEB5vymBiwCJfiKA5jTkJ4@9521401 callingPack=org.telegram.messenger req=2 flags=0x0 sdk=28
11-04 20:33:57.667 433 433 I VibratorService: Voltage set to: 99
11-04 20:33:57.750 451 2409 D audio_hw_primary: adev_open_input_stream: enter: sample_rate(16000) channel_mask(0x10) devices(0x80000004) stream_handle(0x7fb6791cc0) io_handle(54) source(1)
11-04 20:33:57.753 451 21511 I AudioFlinger: AudioFlinger's thread 0x7f1a03d500 tid=21511 ready to run
11-04 20:33:57.753 451 21511 D audio_hw_primary: in_standby: enter: stream (0x7fb6791cc0) usecase(16: audio-record)
11-04 20:33:57.755 451 21511 D audio_hw_primary: in_standby: enter: stream (0x7fb6791cc0) usecase(16: audio-record)
11-04 20:33:57.770 451 21511 D audio_hw_primary: in_set_parameters: enter: kvpairs=bottom=;input_source=1;routing=-2147483644
11-04 20:33:57.773 451 21512 D audio_hw_primary: start_input_stream: enter: stream(0x7fb6791cc0)usecase(16: audio-record)
11-04 20:33:57.773 451 21512 E audio_hw_extn: audio_extn_perf_lock_acquire: Incorrect params, Failed to acquire perf lock, err
11-04 20:33:57.773 451 21512 D audio_hw_primary: select_devices: out_snd_device(0: ) in_snd_device(36: handset-mic)
11-04 20:33:57.773 451 21512 D hardware_info: hw_info_append_hw_type : device_name = handset-mic
11-04 20:33:57.773 451 21512 D audio_hw_primary: enable_snd_device: snd_device(36: handset-mic)
11-04 20:33:57.773 451 21512 E msm8974_platform: platform_send_audio_calibration: Could not find acdb id for device(36)
11-04 20:33:57.773 451 21512 D audio_hw_primary: enable_audio_route: apply mixer and update path: audio-record
11-04 20:33:57.773 451 21512 D audio_route: Apply path: audio-record
11-04 20:33:57.774 451 21512 D audio_hw_primary: select_devices: done
11-04 20:33:57.792 451 21512 E audio_hw_extn: audio_extn_perf_lock_release: Perf lock release error
11-04 20:33:57.792 451 21512 D audio_hw_primary: start_input_stream: exit
11-04 20:33:59.613 594 594 I MSM-irqbalance: Decided to move IRQ128 from CPU2 to CPU1
11-04 20:34:01.674 523 523 I cnss-daemon: RTM_NEWROUTE Indication
* [ ] Fix audio recoding issue (caused by the first one, priority: 2)
One thing i observed regarding this issue: It looks like the phone wants to use the headphone audio. And when a headphone is connected it works without problems.
It might not be the real reason. I got some logs when using the original version of "audio_platform_info.xml" (using Lineage Recoder for audio recording). My device used the same acdb id (36: handset-mic) just like line 1~14 in your logs but not failed like line 15.
Maybe I could replace some (totally 7 of them) acdb-ids in "audio_platform_info.xml" by the ones from original version (if "device name" is the same).
Note: "36: handset-mic" is not the mic on headphone, as "53: headset-mic" should be the correct one for headset. Plug the headphone to the device, then acdb-id 53 should be used for audio recording.
11-05 14:23:57.798 11308 11308 D SoundRecorderService: Sound recorder service started recording…
11-05 14:23:57.832 442 634 D audio_hw_primary: adev_open_input_stream: enter: sample_rate(44100) channel_mask(0x10) devices(0x80000004) stream_handle(0x7fb6791080) io_handle(46) source(1)
11-05 14:23:57.834 442 11340 I AudioFlinger: AudioFlinger's thread 0x7f2b118dc0 tid=11340 ready to run
11-05 14:23:57.834 442 11340 D audio_hw_primary: in_standby: enter: stream (0x7fb6791080) usecase(16: audio-record)
11-05 14:23:57.837 442 11340 D audio_hw_primary: in_standby: enter: stream (0x7fb6791080) usecase(16: audio-record)
11-05 14:23:57.854 442 11340 D audio_hw_primary: in_set_parameters: enter: kvpairs=bottom=;input_source=1;routing=-2147483644
11-05 14:23:57.863 442 11344 D audio_hw_primary: start_input_stream: enter: stream(0x7fb6791080)usecase(16: audio-record)
11-05 14:23:57.864 442 11344 E audio_hw_extn: audio_extn_perf_lock_acquire: Incorrect params, Failed to acquire perf lock, err
11-05 14:23:57.864 442 11344 D audio_hw_primary: select_devices: out_snd_device(0: ) in_snd_device(36: handset-mic)
11-05 14:23:57.864 442 11344 D hardware_info: hw_info_append_hw_type : device_name = handset-mic
11-05 14:23:57.864 442 11344 D audio_hw_primary: enable_snd_device: snd_device(36: handset-mic)
11-05 14:23:57.864 442 11344 D audio_route: Apply path: handset-mic
11-05 14:23:57.875 442 11344 D ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 4, path = 1
11-05 14:23:57.875 442 11344 D ACDB-LOADER: ACDB -> send_asm_topology
11-05 14:23:57.875 442 11344 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
11-05 14:23:57.875 442 11344 D ACDB-LOADER: ACDB -> send_adm_topology
11-05 14:23:57.875 442 11344 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
11-05 14:23:57.875 442 11344 D ACDB-LOADER: ACDB -> send_audtable
11-05 14:23:57.875 442 11344 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
11-05 14:23:57.876 442 11344 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
11-05 14:23:57.876 442 11344 D ACDB-LOADER: ACDB -> send_audvoltable
11-05 14:23:57.876 442 11344 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
11-05 14:23:57.876 442 11344 D : Failed to fetch the lookup information of the device 00000004
11-05 14:23:57.876 442 11344 E ACDB-LOADER: Error: ACDB AudProc vol returned = -19
11-05 14:23:57.876 442 11344 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
11-05 14:23:57.876 442 11344 D ACDB-LOADER: ACDB -> send_afe_cal
11-05 14:23:57.876 442 11344 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
11-05 14:23:57.877 442 11344 D : Failed to fetch the lookup information of the device 00000004
11-05 14:23:57.877 442 11344 E ACDB-LOADER: Error: ACDB AFE returned = -19
11-05 14:23:57.877 442 11344 D ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
11-05 14:23:57.877 442 11344 D ACDB-LOADER: ACDB -> send_hw_delay : acdb_id = 4 path = 1
11-05 14:23:57.877 442 11344 D ACDB-LOADER: ACDB -> ACDB_AVSYNC_INFO: ACDB_CMD_GET_DEVICE_PROPERTY
11-05 14:23:57.877 442 11344 D audio_hw_primary: enable_audio_route: apply mixer and update path: audio-record
11-05 14:23:57.877 442 11344 D audio_route: Apply path: audio-record
11-05 14:23:57.878 442 11344 D audio_hw_primary: select_devices: done
11-05 14:23:57.912 442 11344 E audio_hw_extn: audio_extn_perf_lock_release: Perf lock release error
11-05 14:23:57.912 442 11344 D audio_hw_primary: start_input_stream: exit
11-05 14:24:03.510 11308 11308 D SoundRecorderService: Sound recorder service stopped recording
11-05 14:24:03.534 442 11340 D audio_hw_primary: in_standby: enter: stream (0x7fb6791080) usecase(16: audio-record)
11-05 14:24:03.626 442 11340 D audio_hw_primary: disable_audio_route: reset and update mixer path: audio-record
11-05 14:24:03.627 442 11340 D hardware_info: hw_info_append_hw_type : device_name = handset-mic
11-05 14:24:03.627 442 11340 D audio_hw_primary: disable_snd_device: snd_device(36: handset-mic)
11-05 14:24:03.644 442 11340 D audio_hw_primary: in_set_parameters: enter: kvpairs=routing=0
11-05 14:24:03.663 442 1949 D audio_hw_primary: adev_close_input_stream: enter:stream_handle(0x7fb6791080)
11-05 14:24:03.664 442 1949 D audio_hw_primary: in_standby: enter: stream (0x7fb6791080) usecase(16: audio-record)
After commit 34601cde7042d7f919174dc0c5088a1b6c27983d, both media volume and audio recording should work properly. Most unnecessary sections were removed from "audio_platform_info.xml", and the original acdb_ids before commit 34601cde7042d7f919174dc0c5088a1b6c27983d were taken back (since they're correct).
There are only one known bug currently:
Fortunately, it only happens after a reboot and won't happen again after a successful playback. As a temporary fix, play an audio file for the first time (it should fail), wait for few seconds, then stop ⏹ (not pause ⏸) and try playing again (it should success).
Thanks to fAiL-ix for assistance.
Sorry, but I still curious about this. Apparently, normal audio these days doesn't have any stop button. And if it were replaced by switching between song, no, in my case, it still won't play with hardware decoder.
I've look at my logcat, it is very similar to yours. And it mentioned that somehow device "/dev/snd/comprC0D24" is missing, thus I believe, it failed to send the audio stream to the pcm device, thus no playback.
I have tried to compare with previous build of Lineage 16.0 - yours and Mokee (they're still releasing stable based on that), I did not found that "/dev/snd/comprC0D24", yet the audio plays fine in speaker, bluetooth, or earphone. It's definitely something happened in either Linageos 17.1 or msm8994 tree (I noticed when I run cat /proc/asound/cards, I found msm8994 audio?) that might screw the audio streaming process. It is just my opinion.
Sorry, but I still curious about this. Apparently, normal audio these days doesn't have any stop button. And if it were replaced by switching between song, no, in my case, it still won't play with hardware decoder.
I've look at my logcat, it is very similar to yours. And it mentioned that somehow device "/dev/snd/comprC0D24" is missing, thus I believe, it failed to send the audio stream to the pcm device, thus no playback.
I have tried to compare with previous build of Lineage 16.0 - yours and Mokee (they're still releasing stable based on that), I did not found that "/dev/snd/comprC0D24", yet the audio plays fine in speaker, bluetooth, or earphone. It's definitely something happened in either Linageos 17.1 or msm8994 tree (I noticed when I run cat /proc/asound/cards, I found msm8994 audio?) that might screw the audio streaming process. It is just my opinion.
If there is no stop button in some APPs, try playing an audio file for some seconds, then exit and restart the APP.
Firstly, I cannot deny that I don't know much about audio in Android system. That's why I'm also curious about this Android 10+ only problem, as the same audio configs had a different result on Mi-4c. I once replaced most things about audio (list all files) with the ones from Mokee (other things were kept unchanged), but the problem was not fixed at all. I have also compared the differences of audio configs between Mokee sources and mine, and found nothing valuable (except the code format and indent). Some users even tried to install the kernel of Mokee on the top of my Lineage 17.1 (by flashing "boot.img"), still nothing changed.
In fact, this repo is a fork of these repos (android_device_xiaomi_libra + android_device_xiaomi_msm8994-common) from Mokee, you could also see many similar things between these ones. That's why I feel a little confused about this problem, the (almost) same things have a different result on similar custom ROMs. The solution used currently is to specify the pcm_ids
of all usecase
(also see https://github.com/BYZYB/android_device_xiaomi_libra/issues/2#issuecomment-671000230), which fixed (or hide) this problem in most conditions, but may not be a good solution.
Similar issue here, @GuaiYiHu . Using AudioFX is surely the most simple and working solution to this problem (enable "Mono audio" in accessibility settings is another way). My solution (see the changes of audio_platform_info.xml) could fix (or hide) this problem without using APPs or change settings, but not perfect (see https://github.com/BYZYB/android_device_xiaomi_libra/issues/2#issuecomment-722348201). Also, this way has no effect to phone call volume (AudioFX have no effect on phone call either, I remember).
From your method, I found you can hardly understand the audio of Android. Fixed via a simple commit. https://github.com/xiaomi-classic-dev/android_device_xiaomi_msm8994-common/commit/7c6419636bfa9c0e332b91d49cf6b5159d126286
From your method, I found you can hardly understand the audio of Android. Fixed via a simple commit. xiaomi-classic-dev/android_device_xiaomi_msm8994-common@7c64196
I admit what you said, but still thanks for your reply. I'll test this solution on Android 10 later.
[Update] Both phone call and media volume issue has been fixed (in Android 10), thanks again. This issue will be closed now.
Description
When playing some audio/video files with local media player (like Eleven), the media volume is out of control (always maximum). It seems that the audio output is outside Android system and sent to the speaker directly. This issue never happens when using software decoding, like playing music from a web browser. Lineage 16.0 is not affected by this issue.
Related logcat
Related dmesg
Roadmap
For now, this issue has a roadmap like this: