Volume cannot control when hdmi connected in android 4.3

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

Volume cannot control when hdmi connected in android 4.3

跳至解决方案
3,572 次查看
jasonhsu
Contributor III

Hi community,

Our customer found a bug that "Audio  volume cannot be adjusted when connected to HDMI tv in android 4.3".

I have confirmed it is really as customer said. our model is based on sabreauto board.

even in Setting menu --> Sound, it cannot also ajust.

Could you give me some advices? thx a lot.

0 项奖励
回复
1 解答
2,298 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Jianhua,

     We have a modification patch for android4.2.2 BSP, Even you are using android4.3 , you can also try to adjust source code according to the following suggestions:

------------------

Two modifications were needed to adjust hdmi volume:

  1. “myandroid/hardware/libhardware_legacy/audio/AudioPolicyManagerBase.cpp”, function computeVolume()

From

// if volume is not 0 (not muted), force media volume to max on digital output

if (stream == AudioSystem::MUSIC &&

index != mStreams[stream].mIndexMin &&

        (((device == AUDIO_DEVICE_OUT_AUX_DIGITAL) && (mDeviceIsHdmidongle == false)) ||

         device == AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET ||

device == AUDIO_DEVICE_OUT_USB_ACCESSORY ||

device == AUDIO_DEVICE_OUT_USB_DEVICE)) {

return 1.0;

}

To

// if volume is not 0 (not muted), force media volume to max on digital output

if (stream == AudioSystem::MUSIC &&

index != mStreams[stream].mIndexMin &&

        (device == AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET ||

device == AUDIO_DEVICE_OUT_USB_ACCESSORY ||

device == AUDIO_DEVICE_OUT_USB_DEVICE)) {

return 1.0;

}

  1. “myandroid/frameworks/base/media/java/android/media/AudioService.java

From

if (SystemProperties.get("ro.product.device").contains("hdmidongle"))

mFixedVolumeDevices &= ~AudioSystem.DEVICE_OUT_AUX_DIGITAL;

To

mFixedVolumeDevices &= ~AudioSystem.DEVICE_OUT_AUX_DIGITAL;

-----------------------------------------------

Regards,

weidong

在原帖中查看解决方案

2 回复数
2,299 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Jianhua,

     We have a modification patch for android4.2.2 BSP, Even you are using android4.3 , you can also try to adjust source code according to the following suggestions:

------------------

Two modifications were needed to adjust hdmi volume:

  1. “myandroid/hardware/libhardware_legacy/audio/AudioPolicyManagerBase.cpp”, function computeVolume()

From

// if volume is not 0 (not muted), force media volume to max on digital output

if (stream == AudioSystem::MUSIC &&

index != mStreams[stream].mIndexMin &&

        (((device == AUDIO_DEVICE_OUT_AUX_DIGITAL) && (mDeviceIsHdmidongle == false)) ||

         device == AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET ||

device == AUDIO_DEVICE_OUT_USB_ACCESSORY ||

device == AUDIO_DEVICE_OUT_USB_DEVICE)) {

return 1.0;

}

To

// if volume is not 0 (not muted), force media volume to max on digital output

if (stream == AudioSystem::MUSIC &&

index != mStreams[stream].mIndexMin &&

        (device == AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET ||

device == AUDIO_DEVICE_OUT_USB_ACCESSORY ||

device == AUDIO_DEVICE_OUT_USB_DEVICE)) {

return 1.0;

}

  1. “myandroid/frameworks/base/media/java/android/media/AudioService.java

From

if (SystemProperties.get("ro.product.device").contains("hdmidongle"))

mFixedVolumeDevices &= ~AudioSystem.DEVICE_OUT_AUX_DIGITAL;

To

mFixedVolumeDevices &= ~AudioSystem.DEVICE_OUT_AUX_DIGITAL;

-----------------------------------------------

Regards,

weidong

2,298 次查看
jasonhsu
Contributor III

Hi Weidong

Thx for your reply, this issue is fixed with your suggestion.:smileywink:

0 项奖励
回复