Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db4b80b5 authored by Sherry Huang's avatar Sherry Huang
Browse files

HDMI-CEC: Add S/PDIF type to absolute volume device allowlist

When outputting sound via S/PDIF, volume control should be also
available from the TV with <User Control Pressed>. Currently, we
only allows for ARC + ERAC devices.

Test: verified by vendor
Bug: b/400832673
Flag: EXEMPT Bugfix only
Change-Id: I02778e6f64d921acb3be4e52702a4a56b6477ff5
parent 749cf65a
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -252,17 +252,22 @@ public class HdmiControlService extends SystemService {
    static final AudioDeviceAttributes AUDIO_OUTPUT_DEVICE_HDMI_EARC =
            new AudioDeviceAttributes(AudioDeviceAttributes.ROLE_OUTPUT,
                    AudioDeviceInfo.TYPE_HDMI_EARC, "");
    static final AudioDeviceAttributes AUDIO_OUTPUT_DEVICE_LINE_DIGITAL =
            new AudioDeviceAttributes(AudioDeviceAttributes.ROLE_OUTPUT,
            AudioDeviceInfo.TYPE_LINE_DIGITAL, "");

    // Audio output devices used for absolute volume behavior
    private static final List<AudioDeviceAttributes> AVB_AUDIO_OUTPUT_DEVICES =
            List.of(AUDIO_OUTPUT_DEVICE_HDMI,
                    AUDIO_OUTPUT_DEVICE_HDMI_ARC,
                    AUDIO_OUTPUT_DEVICE_HDMI_EARC);
                    AUDIO_OUTPUT_DEVICE_HDMI_EARC,
                    AUDIO_OUTPUT_DEVICE_LINE_DIGITAL);

    // Audio output devices used for absolute volume behavior on TV panels
    private static final List<AudioDeviceAttributes> TV_AVB_AUDIO_OUTPUT_DEVICES =
            List.of(AUDIO_OUTPUT_DEVICE_HDMI_ARC,
                    AUDIO_OUTPUT_DEVICE_HDMI_EARC);
                    AUDIO_OUTPUT_DEVICE_HDMI_EARC,
                    AUDIO_OUTPUT_DEVICE_LINE_DIGITAL);

    // Audio output devices used for absolute volume behavior on Playback devices
    private static final List<AudioDeviceAttributes> PLAYBACK_AVB_AUDIO_OUTPUT_DEVICES =