Can HDMI's audio be adjusted?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Can HDMI's audio be adjusted?

1,369件の閲覧回数
conteczxy
Contributor III

I am working on imx6q, android4.4.2, kernel 3.0.35, with hdmi display.

I found sound is output through hdmi, but when I adjust the sound to low or high in android settings-> sound volume, it doesn't take effect.

So, I want to know if it is possible to adjust sound of hdmi audio?

Thanks.

ラベル(2)
タグ(1)
2 返答(返信)

1,173件の閲覧回数
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Xiyuan,

  I have got the following solution from my colleague and tested it!

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

  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;

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

Best Regards

Weidong

1,173件の閲覧回数
conteczxy
Contributor III

Thank you very much for your fast and effective response。

0 件の賞賛
返信