summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJinsuk Kim <jinsukkim@google.com>2014-03-24 13:26:40 +0900
committerJinsuk Kim <jinsukkim@google.com>2014-03-24 13:43:47 +0900
commitefbdb25d1b98389c343c326c5ec1b29b4750e24e (patch)
treedc18547d4c721cf829e8c33b6c7c9af941dd8a50 /include
parent98add8956b1a346425df40d2f70a9ca33500f01c (diff)
downloadhardware_libhardware-efbdb25d1b98389c343c326c5ec1b29b4750e24e.zip
hardware_libhardware-efbdb25d1b98389c343c326c5ec1b29b4750e24e.tar.gz
hardware_libhardware-efbdb25d1b98389c343c326c5ec1b29b4750e24e.tar.bz2
Added message_abort and operand enums
Also clarfieid the method description (allocate_logical_address), update method signatures to use more appropriate type. Change-Id: Ie5d13969308e77ca19b3dbde682ca968337ab41b
Diffstat (limited to 'include')
-rw-r--r--include/hardware/hdmi_cec.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/include/hardware/hdmi_cec.h b/include/hardware/hdmi_cec.h
index a697334..de6c70c 100644
--- a/include/hardware/hdmi_cec.h
+++ b/include/hardware/hdmi_cec.h
@@ -34,6 +34,7 @@ __BEGIN_DECLS
#define HDMI_CEC_HARDWARE_INTERFACE "hdmi_cec_hw_if"
typedef enum cec_device_type {
+ CEC_DEVICE_INACTIVE = -1,
CEC_DEVICE_TV = 0,
CEC_DEVICE_RECORDER = 1,
CEC_DEVICE_RESERVED = 2,
@@ -127,7 +128,20 @@ enum cec_message_type {
CEC_MESSAGE_GET_CEC_VERSION = 0x9F,
CEC_MESSAGE_VENDOR_COMMAND_WITH_ID = 0xA0,
CEC_MESSAGE_CLEAR_EXTERNAL_TIMER = 0xA1,
- CEC_MESSAGE_SET_EXTERNAL_TIMER = 0xA2
+ CEC_MESSAGE_SET_EXTERNAL_TIMER = 0xA2,
+ CEC_MESSAGE_ABORT = 0xFF
+};
+
+/*
+ * Operand description [Abort Reason]
+ */
+enum abort_reason {
+ ABORT_UNRECOGNIZED_MODE = 0,
+ ABORT_NOT_IN_CORRECT_MODE = 1,
+ ABORT_CANNOT_PROVIDE_SOURCE = 2,
+ ABORT_INVALID_OPERAND = 3,
+ ABORT_REFUSED = 4,
+ ABORT_UNABLE_TO_DETERMINE = 5
};
/*
@@ -210,13 +224,15 @@ typedef struct hdmi_cec_device {
* (*allocate_logical_address)() allocates a new logical address
* for a given device type. The address is written to addr. The HAL
* implementation is also expected to configure itself to start receiving
- * the messages addressed to the allocated one. If allocation
- * is not successful the addr will be set to CEC_ADDR_UNREGISTERED.
+ * the messages addressed to the allocated one. If the address has been already
+ * allocated, it should simply return the allocated address without attempting
+ * the allocation again. If allocation is not successful the addr will be
+ * set to CEC_ADDR_UNREGISTERED.
*
* Returns 0 on success or -errno on error.
*/
int (*allocate_logical_address)(const struct hdmi_cec_device* dev,
- int device_type, cec_logical_address_t* addr);
+ cec_device_type_t device_type, cec_logical_address_t* addr);
/*
* (*get_logical_address)() returns the logical address already allocated
@@ -232,7 +248,7 @@ typedef struct hdmi_cec_device {
* 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);
+ cec_device_type_t device_type, cec_logical_address_t* addr);
/*
* (*get_physical_address)() returns the CEC physical address. The
* address is written to addr.
@@ -251,8 +267,7 @@ typedef struct hdmi_cec_device {
*
* Returns 0 on success or -errno on error.
*/
- int (*send_message)(const struct hdmi_cec_device* dev,
- const cec_message_t*);
+ int (*send_message)(const struct hdmi_cec_device* dev, const cec_message_t*);
/*
* (*register_event_callback)() registers a callback that HDMI-CEC HAL