summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJinsuk Kim <jinsukkim@google.com>2014-03-05 18:08:02 +0900
committerJinsuk Kim <jinsukkim@google.com>2014-03-11 02:50:03 +0000
commit98add8956b1a346425df40d2f70a9ca33500f01c (patch)
treeb84d209a1fcee1af02117ab38bca7d201f2e05ee
parent355e5d68021b272f692e5aa26f21fb4da57b3b93 (diff)
downloadhardware_libhardware-98add8956b1a346425df40d2f70a9ca33500f01c.zip
hardware_libhardware-98add8956b1a346425df40d2f70a9ca33500f01c.tar.gz
hardware_libhardware-98add8956b1a346425df40d2f70a9ca33500f01c.tar.bz2
Add 'get_logical_address' in HDMI-CEC HAL interface
The new function allows the HDMI-CEC service to get the logical address updated by HAL implementation. Change-Id: I1a4c5f7b7773279091d5bd7c6971a8c9090a81ca
-rw-r--r--include/hardware/hdmi_cec.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/hardware/hdmi_cec.h b/include/hardware/hdmi_cec.h
index 5b3b1af..a697334 100644
--- a/include/hardware/hdmi_cec.h
+++ b/include/hardware/hdmi_cec.h
@@ -219,6 +219,21 @@ typedef struct hdmi_cec_device {
int device_type, cec_logical_address_t* addr);
/*
+ * (*get_logical_address)() returns the logical address already allocated
+ * for the device of the given type. It is necessary to call this function
+ * when HAL implementation, without being triggered by service, updated
+ * the address by itself. Such situation happens when an event like
+ * hotplug occurs, since it is possible the HDMI network topology or
+ * the port which the device was connected to might have changed while it
+ * was unplugged. In response to such events, the service is required to
+ * call this function to get the updated address. The address is written
+ * to addr.
+ *
+ * Returns 0 on success or -errno on error.
+ */
+ int (*get_logical_address)(const struct hdmi_cec_device* dev,
+ int device_type, cec_logical_address_t* addr);
+ /*
* (*get_physical_address)() returns the CEC physical address. The
* address is written to addr.
*
@@ -264,7 +279,7 @@ typedef struct hdmi_cec_device {
void (*get_vendor_id)(const struct hdmi_cec_device* dev, uint32_t* vendor_id);
/* Reserved for future use to maximum 16 functions. Must be NULL. */
- void* reserved[16 - 6];
+ void* reserved[16 - 7];
} hdmi_cec_device_t;
/** convenience API for opening and closing a device */