CEC: Pass port ID for set_audio_return_channel
This CL passes a port ID when enabling/disabling ARC in case
there are multiple HDMI ports that support the feature.
Bug: 18781204
Change-Id: I632518132bf07c8ae6f0ff5135429ca719b596b2
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecController.java b/services/core/java/com/android/server/hdmi/HdmiCecController.java
index 1486fee..55917fc 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecController.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecController.java
@@ -331,12 +331,13 @@
/**
* Configure ARC circuit in the hardware logic to start or stop the feature.
*
+ * @param port ID of HDMI port to which AVR is connected
* @param enabled whether to enable/disable ARC
*/
@ServiceThreadOnly
- void setAudioReturnChannel(boolean enabled) {
+ void setAudioReturnChannel(int port, boolean enabled) {
assertRunOnServiceThread();
- nativeSetAudioReturnChannel(mNativePtr, enabled);
+ nativeSetAudioReturnChannel(mNativePtr, port, enabled);
}
/**
@@ -633,6 +634,6 @@
private static native int nativeGetVendorId(long controllerPtr);
private static native HdmiPortInfo[] nativeGetPortInfos(long controllerPtr);
private static native void nativeSetOption(long controllerPtr, int flag, int value);
- private static native void nativeSetAudioReturnChannel(long controllerPtr, boolean flag);
+ private static native void nativeSetAudioReturnChannel(long controllerPtr, int port, boolean flag);
private static native boolean nativeIsConnected(long controllerPtr, int port);
}