Fix TV didn't initiate ARC sometimes.
Root Cause: 1. Some AVRs would send <Terminate ARC> several times and wait for TV's response with <Report ARC Terminated>. TV would only send <Report ARC Terminated> in current flow, thus AVR couldn't be re-initiated, even TV send <Request ARC Initiation>. 2. System might not start to initiate ARC after several times hot-plug. Solution: 1. Send <Report ARC Terminated> everytime when setArcStatus(false). 2. Re-initiate ARC when ARC is plugged in. Verified pass with Denon AVR-X3600H. Bug: 168087640 Change-Id: I8a5adf8b9d1e378dfc0984113c7db60b1630a46c
This commit is contained in:
@@ -1569,10 +1569,11 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
|
||||
// When the device is not unplugged but reawaken from standby, we check if the System
|
||||
// Audio Control Feature is enabled or not then decide if turning SAM on/off accordingly.
|
||||
if (getAvrDeviceInfo() != null && portId == getAvrDeviceInfo().getPortId()) {
|
||||
HdmiLogger.debug("Port ID:%d, 5v=%b", portId, connected);
|
||||
if (!connected) {
|
||||
setSystemAudioMode(false);
|
||||
} else if (mSystemAudioControlFeatureEnabled != mService.isSystemAudioActivated()){
|
||||
setSystemAudioMode(mSystemAudioControlFeatureEnabled);
|
||||
} else {
|
||||
onNewAvrAdded(getAvrDeviceInfo());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,12 +102,12 @@ final class SetArcTransmissionStateAction extends HdmiCecFeatureAction {
|
||||
}
|
||||
|
||||
private void setArcStatus(boolean enabled) {
|
||||
boolean wasEnabled = tv().setArcStatus(enabled);
|
||||
Slog.i(TAG, "Change arc status [old:" + wasEnabled + ", new:" + enabled + "]");
|
||||
tv().setArcStatus(enabled);
|
||||
Slog.i(TAG, "Change arc status to " + enabled);
|
||||
|
||||
// If enabled before and set to "disabled" and send <Report Arc Terminated> to
|
||||
// av reciever.
|
||||
if (!enabled && wasEnabled) {
|
||||
if (!enabled) {
|
||||
sendCommand(HdmiCecMessageBuilder.buildReportArcTerminated(getSourceAddress(),
|
||||
mAvrAddress));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user