Clarify which HAL (methods) apply to which devices
Bug: 265906860
Test: make
Change-Id: Icc8df58d4a806d71fc2c073a67bedfd9dd9d3f60
Merged-In: Icc8df58d4a806d71fc2c073a67bedfd9dd9d3f60
diff --git a/tv/README.md b/tv/README.md
new file mode 100644
index 0000000..9a1c381
--- /dev/null
+++ b/tv/README.md
@@ -0,0 +1,8 @@
+# TV-related HIDL and AIDL HALs
+
+This directory bundles TV-related HALs in HIDL (legacy) and AIDL.
+
+- The 'tuner' directory contains the Tuner HIDL and AIDL HALs.
+- The 'input' directory contains the TV Input HIDL and AIDL HALs.
+- The 'cec' directory contains the CEC HIDL HAL.
+- The 'hdmi' directory contains the HDMI-related AIDL HALs, which includes the CEC AIDL HAL.
diff --git a/tv/hdmi/README.md b/tv/hdmi/README.md
new file mode 100644
index 0000000..183a3d0
--- /dev/null
+++ b/tv/hdmi/README.md
@@ -0,0 +1,11 @@
+# HDMI-related AIDL HALs for Android devices
+
+This directory bundles 3 HDMI-related AIDL HALs: HDMI Connection HAL, CEC HAL and eARC HAL.
+
+The HDMI Connection HAL contains general APIs for the HDMI Connection. These methods are required by
+the CEC and the eARC implementation. Therefore, devices that implement CEC need to support the HDMI
+Connection HAL and the CEC HAL. Devices that implement eARC need to support the HDMI Connection HAL
+and the eARC HAL.
+
+Other Android HALs are related to HDMI as well, but not included in this directory for historical
+reasons, e.g. Display HAL and TV Input HAL.
diff --git a/tv/hdmi/connection/aidl/android/hardware/tv/hdmi/connection/HdmiPortInfo.aidl b/tv/hdmi/connection/aidl/android/hardware/tv/hdmi/connection/HdmiPortInfo.aidl
index 875c9da..6bec7e5 100644
--- a/tv/hdmi/connection/aidl/android/hardware/tv/hdmi/connection/HdmiPortInfo.aidl
+++ b/tv/hdmi/connection/aidl/android/hardware/tv/hdmi/connection/HdmiPortInfo.aidl
@@ -24,11 +24,16 @@
@VintfStability
parcelable HdmiPortInfo {
HdmiPortType type;
- int portId; // Input ports should start from 1 which corresponds to HDMI "port 1".
+ int portId; // For devices with input ports (e.g. TV Panels), input ports should start from 1
+ // which corresponds to HDMI "port 1".
+
+ // In the following, 'supported' refers to having the necessary hardware and firmware on the
+ // device to support CEC/ARC/eARC on this port.
boolean cecSupported;
boolean arcSupported; // If true, cecSupported has to be true as well. ARC cannot be supported
// without CEC support.
boolean eArcSupported;
+
// The physical address of the device connected to this port, valid range is 0x0000 to 0xFFFF
// (ref Sec 8.7.2 of HDMI 1.4b).
int physicalAddress;
diff --git a/tv/hdmi/connection/aidl/android/hardware/tv/hdmi/connection/IHdmiConnection.aidl b/tv/hdmi/connection/aidl/android/hardware/tv/hdmi/connection/IHdmiConnection.aidl
index 6c7a438..ee6cc89 100644
--- a/tv/hdmi/connection/aidl/android/hardware/tv/hdmi/connection/IHdmiConnection.aidl
+++ b/tv/hdmi/connection/aidl/android/hardware/tv/hdmi/connection/IHdmiConnection.aidl
@@ -56,6 +56,11 @@
* hotplug signal). When set to {@code HDMI_HPD_STATUS_BIT} the HAL should use the HDP status
* bit.
*
+ * This is only relevant to TV Panel devices that support eARC TX. While eARC TX is connected,
+ * the framework calls this method to set the HPD signal to {@code HDMI_HPD_STATUS_BIT}.
+ *
+ * For all other device types, this method can be stubbed.
+ *
* @param signal The HPD signal type to use.
* @param portId id of the port on which the HPD signal should be set.
*
@@ -70,6 +75,12 @@
/**
* Get the current signal the HAL is using for HPD
*
+ * This is only relevant to TV Panel devices that support eARC TX. While eARC TX is connected,
+ * this method returns {@code HDMI_HPD_STATUS_BIT}.
+ *
+ * For all other device types, this method can be stubbed by always returning
+ * {@code HDMI_HPD_PHYSICAL}.
+ *
* @param portId id of the port of which the current HPD signal is queried.
*/
HpdSignal getHpdSignal(in int portId);
diff --git a/tv/hdmi/earc/aidl/android/hardware/tv/hdmi/earc/IEArc.aidl b/tv/hdmi/earc/aidl/android/hardware/tv/hdmi/earc/IEArc.aidl
index e5a6458..d9fb29c 100644
--- a/tv/hdmi/earc/aidl/android/hardware/tv/hdmi/earc/IEArc.aidl
+++ b/tv/hdmi/earc/aidl/android/hardware/tv/hdmi/earc/IEArc.aidl
@@ -20,7 +20,7 @@
import android.hardware.tv.hdmi.earc.IEArcStatus;
/**
- * eARC HAL interface definition
+ * eARC HAL interface definition. This is only relevant to TV Panels that implement eARC TX.
*/
@VintfStability
interface IEArc {