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

Commit 00a122a8 authored by Amy's avatar Amy Committed by Amy Zhang
Browse files

Operation with TVs that do not support the System Audio Mode

Note: according to HDMI spec 1.4b cec 13.15.4.2, when non-TV device
inits System Audio Mode, and the amplifier is the Active Source or is on
the Active Path, amplifier can send <Set System Audio Mode on> without
querying TV's support on SAM.

Test: manual
Bug: 80296135
Change-Id: I5c850e1c906f13e60e7c830e8d3d6d3c8e7f118f
(cherry picked from commit 6ebc6a53ae2b55db1526aac94fb754bfd52522fe)
parent bf3fd062
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -992,6 +992,17 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDeviceSource {
        }
        // Wake up device
        mService.wakeUp();
        // If Audio device is the active source or is on the active path,
        // enable system audio mode without querying TV's support on sam.
        // This is per HDMI spec 1.4b CEC 13.15.4.2.
        if (mService.pathToPortId(getActiveSource().physicalAddress)
                != Constants.INVALID_PORT_ID) {
            setSystemAudioMode(true);
            mService.sendCecCommand(
                HdmiCecMessageBuilder.buildSetSystemAudioMode(
                    mAddress, Constants.ADDR_BROADCAST, true));
            return;
        }
        // Check if TV supports System Audio Control.
        // Handle broadcasting setSystemAudioMode on or aborting message on callback.
        queryTvSystemAudioModeSupport(new TvSystemAudioModeSupportedCallback() {