am 2ee0d6f4: CEC: Stop ARC if hotplug event is asserted low
* commit '2ee0d6f44d7274bb1846cc6ff7a60451539a2b51': CEC: Stop ARC if hotplug event is asserted low
This commit is contained in:
@@ -34,6 +34,7 @@ import android.annotation.Nullable;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.hardware.hdmi.HdmiControlManager;
|
import android.hardware.hdmi.HdmiControlManager;
|
||||||
import android.hardware.hdmi.HdmiDeviceInfo;
|
import android.hardware.hdmi.HdmiDeviceInfo;
|
||||||
|
import android.hardware.hdmi.HdmiPortInfo;
|
||||||
import android.hardware.hdmi.HdmiRecordSources;
|
import android.hardware.hdmi.HdmiRecordSources;
|
||||||
import android.hardware.hdmi.HdmiTimerRecordSources;
|
import android.hardware.hdmi.HdmiTimerRecordSources;
|
||||||
import android.hardware.hdmi.IHdmiControlCallback;
|
import android.hardware.hdmi.IHdmiControlCallback;
|
||||||
@@ -878,6 +879,17 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
|
|||||||
return oldStatus;
|
return oldStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ServiceThreadOnly
|
||||||
|
private void updateArcFeatureStatus(int portId, boolean isConnected) {
|
||||||
|
assertRunOnServiceThread();
|
||||||
|
// HEAC 2.4, HEACT 5-15
|
||||||
|
// Should not activate ARC if +5V status is false.
|
||||||
|
HdmiPortInfo portInfo = mService.getPortInfo(portId);
|
||||||
|
if (portInfo.isArcSupported()) {
|
||||||
|
changeArcFeatureEnabled(isConnected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void notifyArcStatusToAudioService(boolean enabled) {
|
private void notifyArcStatusToAudioService(boolean enabled) {
|
||||||
// Note that we don't set any name to ARC.
|
// Note that we don't set any name to ARC.
|
||||||
mService.getAudioManager().setWiredDeviceConnectionState(
|
mService.getAudioManager().setWiredDeviceConnectionState(
|
||||||
@@ -1509,6 +1521,7 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
|
|||||||
// It covers seq #40, #43.
|
// It covers seq #40, #43.
|
||||||
hotplugActions.get(0).pollAllDevicesNow();
|
hotplugActions.get(0).pollAllDevicesNow();
|
||||||
}
|
}
|
||||||
|
updateArcFeatureStatus(portId, connected);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeCecSwitches(int portId) {
|
private void removeCecSwitches(int portId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user