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

Commit 5f75329d authored by Paul Colta's avatar Paul Colta
Browse files

HDMI: Disable SAM only if AVR doesn't ACK <UCP> message

There is a small chance that sending a message might result in failure code 3 (other) for different reasons (e.g. driver is busy). We should disable SAM only if the AVR doesn't acknowledge the CEC message. This is similar to aosp/2619391.

Bug: 326821366
Change-Id: Iadaa65f91a2338a8cc2653fd9af6f17cb80ae727
Test: manual
parent 41dba274
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -158,9 +158,11 @@ final class SendKeyAction extends HdmiCecFeatureAction {
                mTargetAddress, cecKeycodeAndParams), new SendMessageCallback() {
                @Override
                public void onSendCompleted(int error) {
                    if (error != SendMessageResult.SUCCESS) {
                    // Disable System Audio Mode, if the AVR doesn't acknowledge
                    // a <User Control Pressed> message.
                    if (error == SendMessageResult.NACK) {
                        HdmiLogger.debug(
                            "AVR did not respond to <User Control Pressed>");
                            "AVR did not acknowledge <User Control Pressed>");
                        localDevice().mService.setSystemAudioActivated(false);
                    }
                }