Can HDMI volume be changed in Android Sound settings?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Can HDMI volume be changed in Android Sound settings?

跳至解决方案
1,271 次查看
sinjhe
Contributor I

Hi,

 

I flash the P9.0.0_2.3.0 Android image for MCIMX8M-EVK, and boot up with HDMI panel.

 

I want to change the HDMI volume in Android Sound settings, but the HDMI volume is not changed.

 

Like the graph below, I change the volume by scrolling "Media volume" bar, but HDMI volume always be the same.

sound.jpg

I can change the default HDMI volume at here: android_source/frameworks/av/services/audiopolicy/config/default_volume_tables.xml

 

May I enable the HDMI volume change at android_source/frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml?

 

标签 (1)
0 项奖励
回复
1 解答
1,243 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hi sinjhe,

     Google fixed the HDIM volume adjustment in the code, causing the HDMI volume to be either 0 or maximu

int mFixedVolumeDevices = AudioSystem.DEVICE_OUT_HDMI |                                                                                      

            AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET |

            AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET |

            AudioSystem.DEVICE_OUT_HDMI_ARC | 

You can try to find a suitable position to add the line below to remove DEVICE_OUT_HDMI feature from mFixedVolumeDevices.

mFixedVolumeDevices &= ~AudioSystem.DEVICE_OUT_HDMI

File: ./services/core/java/com/android/server/audio/AudioService.java

[comment]

Here is just to provide you with an idea. If you still cannot achieve your goal, you can find a similar solution on the internet.

 

Have a nice day!

B.R,

Weidong

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,231 次查看
sinjhe
Contributor I

Hi Weidong,

 

Thank you, it works now.

0 项奖励
回复
1,244 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hi sinjhe,

     Google fixed the HDIM volume adjustment in the code, causing the HDMI volume to be either 0 or maximu

int mFixedVolumeDevices = AudioSystem.DEVICE_OUT_HDMI |                                                                                      

            AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET |

            AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET |

            AudioSystem.DEVICE_OUT_HDMI_ARC | 

You can try to find a suitable position to add the line below to remove DEVICE_OUT_HDMI feature from mFixedVolumeDevices.

mFixedVolumeDevices &= ~AudioSystem.DEVICE_OUT_HDMI

File: ./services/core/java/com/android/server/audio/AudioService.java

[comment]

Here is just to provide you with an idea. If you still cannot achieve your goal, you can find a similar solution on the internet.

 

Have a nice day!

B.R,

Weidong

0 项奖励
回复