€• Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ6/translations/zh_CN/userspace-api/media/cec/cec-header”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/zh_TW/userspace-api/media/cec/cec-header”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/it_IT/userspace-api/media/cec/cec-header”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/ja_JP/userspace-api/media/cec/cec-header”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/ko_KR/userspace-api/media/cec/cec-header”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/sp_SP/userspace-api/media/cec/cec-header”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later”h]”hŒ8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒP/var/lib/git/docbuild/linux/Documentation/userspace-api/media/cec/cec-header.rst”h KubhŒtarget”“”)”}”(hŒ.. _cec_header:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œ cec-header”uh1h´h KhhhžhhŸh³ubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒCEC Header File”h]”hŒCEC Header File”…””}”(hhÉhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhhÄhžhhŸh³h Kubh¢)”}”(hŒ -*- coding: utf-8; mode: rst -*-”h]”hŒ -*- coding: utf-8; mode: rst -*-”…””}”hh×sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1h¡hhÄhžhhŸŒ:/var/lib/git/docbuild/linux/Documentation/output/cec.h.rst”h KubhÃ)”}”(hhh]”(hÈ)”}”(hŒcec.h”h]”hŒcec.h”…””}”(hhéhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhhæhžhhŸhåh KubhŒ literal_block”“”)”}”(hX,è\/\* SPDX-License-Identifier\: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) \*\/ \/\* \* cec - HDMI Consumer Electronics Control public header \* \* Copyright 2016 Cisco Systems, Inc. and\/or its affiliates. All rights reserved. \*\/ \#ifndef \_CEC\_UAPI\_H \#define \_CEC\_UAPI\_H \#include \ \#include \ \#define CEC\_MAX\_MSG\_SIZE 16 \/\*\* \* struct cec_msg - CEC message structure. \* @tx\_ts\: Timestamp in nanoseconds using CLOCK\_MONOTONIC. Set by the \* driver when the message transmission has finished. \* @rx\_ts\: Timestamp in nanoseconds using CLOCK\_MONOTONIC. Set by the \* driver when the message was received. \* @len\: Length in bytes of the message. \* @timeout\: The timeout (in ms) that is used to timeout CEC\_RECEIVE. \* Set to 0 if you want to wait forever. This timeout can also be \* used with \ :ref:`CEC_TRANSMIT ` as the timeout for waiting for a reply. \* If 0, then it will use a 1 second timeout instead of waiting \* forever as is done with CEC\_RECEIVE. \* @sequence\: The framework assigns a sequence number to messages that are \* sent. This can be used to track replies to previously sent \* messages. \* @flags\: Set to 0. \* @msg\: The message payload. \* @reply\: This field is ignored with \ :ref:`CEC_RECEIVE ` and is only used by \* CEC\_TRANSMIT. If non-zero, then wait for a reply with this \* opcode. Set to CEC\_MSG\_FEATURE\_ABORT if you want to wait for \* a possible ABORT reply. If there was an error when sending the \* msg or FeatureAbort was returned, then reply is set to 0. \* If reply is non-zero upon return, then len\/msg are set to \* the received message. \* If reply is zero upon return and status has the \* CEC\_TX\_STATUS\_FEATURE\_ABORT bit set, then len\/msg are set to \* the received feature abort message. \* If reply is zero upon return and status has the \* \ :ref:`CEC_TX_STATUS_MAX_RETRIES ` bit set, then no reply was seen at \* all. If reply is non-zero for \ :ref:`CEC_TRANSMIT ` and the message is a \* broadcast, then -EINVAL is returned. \* if reply is non-zero, then timeout is set to 1000 (the required \* maximum response time). \* @rx\_status\: The message receive status bits. Set by the driver. \* @tx\_status\: The message transmit status bits. Set by the driver. \* @tx\_arb\_lost\_cnt\: The number of 'Arbitration Lost' events. Set by the driver. \* @tx\_nack\_cnt\: The number of 'Not Acknowledged' events. Set by the driver. \* @tx\_low\_drive\_cnt\: The number of 'Low Drive Detected' events. Set by the \* driver. \* @tx\_error\_cnt\: The number of 'Error' events. Set by the driver. \*\/ struct cec_msg \{ \_\_u64 tx\_ts; \_\_u64 rx\_ts; \_\_u32 len; \_\_u32 timeout; \_\_u32 sequence; \_\_u32 flags; \_\_u8 msg[CEC\_MAX\_MSG\_SIZE]; \_\_u8 reply; \_\_u8 rx\_status; \_\_u8 tx\_status; \_\_u8 tx\_arb\_lost\_cnt; \_\_u8 tx\_nack\_cnt; \_\_u8 tx\_low\_drive\_cnt; \_\_u8 tx\_error\_cnt; \}; \/\*\* \* cec\_msg\_initiator - return the initiator's logical address. \* @msg\: the message structure \*\/ static inline \_\_u8 cec\_msg\_initiator(const struct cec_msg \*msg) \{ return msg-\>msg[0] \>\> 4; \} \/\*\* \* cec\_msg\_destination - return the destination's logical address. \* @msg\: the message structure \*\/ static inline \_\_u8 cec\_msg\_destination(const struct cec_msg \*msg) \{ return msg-\>msg[0] \& 0xf; \} \/\*\* \* cec\_msg\_opcode - return the opcode of the message, -1 for poll \* @msg\: the message structure \*\/ static inline int cec\_msg\_opcode(const struct cec_msg \*msg) \{ return msg-\>len \> 1 ? msg-\>msg[1] \: -1; \} \/\*\* \* cec\_msg\_is\_broadcast - return true if this is a broadcast message. \* @msg\: the message structure \*\/ static inline int cec\_msg\_is\_broadcast(const struct cec_msg \*msg) \{ return (msg-\>msg[0] \& 0xf) == 0xf; \} \/\*\* \* cec\_msg\_init - initialize the message structure. \* @msg\: the message structure \* @initiator\: the logical address of the initiator \* @destination\:the logical address of the destination (0xf for broadcast) \* \* The whole structure is zeroed, the len field is set to 1 (i.e. a poll \* message) and the initiator and destination are filled in. \*\/ static inline void cec\_msg\_init(struct cec_msg \*msg, \_\_u8 initiator, \_\_u8 destination) \{ memset(msg, 0, sizeof(\*msg)); msg-\>msg[0] = (initiator \<\< 4) \| destination; msg-\>len = 1; \} \/\*\* \* cec\_msg\_set\_reply\_to - fill in destination\/initiator in a reply message. \* @msg\: the message structure for the reply \* @orig\: the original message structure \* \* Set the msg destination to the orig initiator and the msg initiator to the \* orig destination. Note that msg and orig may be the same pointer, in which \* case the change is done in place. \* \* It also zeroes the reply, timeout and flags fields. \*\/ static inline void cec\_msg\_set\_reply\_to(struct cec_msg \*msg, struct cec_msg \*orig) \{ \/\* The destination becomes the initiator and vice versa \*\/ msg-\>msg[0] = (cec\_msg\_destination(orig) \<\< 4) \| cec\_msg\_initiator(orig); msg-\>reply = 0; msg-\>timeout = 0; msg-\>flags = 0; \} \/\*\* \* cec\_msg\_recv\_is\_tx\_result - return true if this message contains the \* result of an earlier non-blocking transmit \* @msg\: the message structure from \ :ref:`CEC_RECEIVE ` \*\/ static inline int cec\_msg\_recv\_is\_tx\_result(const struct cec_msg \*msg) \{ return msg-\>sequence \&\& msg-\>tx\_status \&\& !msg-\>rx\_status; \} \/\*\* \* cec\_msg\_recv\_is\_rx\_result - return true if this message contains the \* reply of an earlier non-blocking transmit \* @msg\: the message structure from \ :ref:`CEC_RECEIVE ` \*\/ static inline int cec\_msg\_recv\_is\_rx\_result(const struct cec_msg \*msg) \{ return msg-\>sequence \&\& !msg-\>tx\_status \&\& msg-\>rx\_status; \} \/\* cec\_msg flags field \*\/ \#define \ :ref:`CEC_MSG_FL_REPLY_TO_FOLLOWERS ` (1 \<\< 0) \#define \ :ref:`CEC_MSG_FL_RAW ` (1 \<\< 1) \#define \ :ref:`CEC_MSG_FL_REPLY_VENDOR_ID ` (1 \<\< 2) \/\* cec\_msg tx\/rx\_status field \*\/ \#define \ :ref:`CEC_TX_STATUS_OK ` (1 \<\< 0) \#define \ :ref:`CEC_TX_STATUS_ARB_LOST ` (1 \<\< 1) \#define \ :ref:`CEC_TX_STATUS_NACK ` (1 \<\< 2) \#define \ :ref:`CEC_TX_STATUS_LOW_DRIVE ` (1 \<\< 3) \#define \ :ref:`CEC_TX_STATUS_ERROR ` (1 \<\< 4) \#define \ :ref:`CEC_TX_STATUS_MAX_RETRIES ` (1 \<\< 5) \#define \ :ref:`CEC_TX_STATUS_ABORTED ` (1 \<\< 6) \#define \ :ref:`CEC_TX_STATUS_TIMEOUT ` (1 \<\< 7) \#define \ :ref:`CEC_RX_STATUS_OK ` (1 \<\< 0) \#define \ :ref:`CEC_RX_STATUS_TIMEOUT ` (1 \<\< 1) \#define \ :ref:`CEC_RX_STATUS_FEATURE_ABORT ` (1 \<\< 2) \#define \ :ref:`CEC_RX_STATUS_ABORTED ` (1 \<\< 3) static inline int cec\_msg\_status\_is\_ok(const struct cec_msg \*msg) \{ if (msg-\>tx\_status \&\& !(msg-\>tx\_status \& \ :ref:`CEC_TX_STATUS_OK `\ )) return 0; if (msg-\>rx\_status \&\& !(msg-\>rx\_status \& \ :ref:`CEC_RX_STATUS_OK `\ )) return 0; if (!msg-\>tx\_status \&\& !msg-\>rx\_status) return 0; return !(msg-\>rx\_status \& \ :ref:`CEC_RX_STATUS_FEATURE_ABORT `\ ); \} \#define CEC\_LOG\_ADDR\_INVALID 0xff \#define CEC\_PHYS\_ADDR\_INVALID 0xffff \/\* \* The maximum number of logical addresses one device can be assigned to. \* The CEC 2.0 spec allows for only 2 logical addresses at the moment. The \* Analog Devices CEC hardware supports 3. So let's go wild and go for 4. \*\/ \#define CEC\_MAX\_LOG\_ADDRS 4 \/\* The logical addresses defined by CEC 2.0 \*\/ \#define CEC\_LOG\_ADDR\_TV 0 \#define CEC\_LOG\_ADDR\_RECORD\_1 1 \#define CEC\_LOG\_ADDR\_RECORD\_2 2 \#define CEC\_LOG\_ADDR\_TUNER\_1 3 \#define CEC\_LOG\_ADDR\_PLAYBACK\_1 4 \#define CEC\_LOG\_ADDR\_AUDIOSYSTEM 5 \#define CEC\_LOG\_ADDR\_TUNER\_2 6 \#define CEC\_LOG\_ADDR\_TUNER\_3 7 \#define CEC\_LOG\_ADDR\_PLAYBACK\_2 8 \#define CEC\_LOG\_ADDR\_RECORD\_3 9 \#define CEC\_LOG\_ADDR\_TUNER\_4 10 \#define CEC\_LOG\_ADDR\_PLAYBACK\_3 11 \#define CEC\_LOG\_ADDR\_BACKUP\_1 12 \#define CEC\_LOG\_ADDR\_BACKUP\_2 13 \#define CEC\_LOG\_ADDR\_SPECIFIC 14 \#define CEC\_LOG\_ADDR\_UNREGISTERED 15 \/\* as initiator address \*\/ \#define CEC\_LOG\_ADDR\_BROADCAST 15 \/\* as destination address \*\/ \/\* The logical address types that the CEC device wants to claim \*\/ \#define \ :ref:`CEC_LOG_ADDR_TYPE_TV ` 0 \#define \ :ref:`CEC_LOG_ADDR_TYPE_RECORD ` 1 \#define \ :ref:`CEC_LOG_ADDR_TYPE_TUNER ` 2 \#define \ :ref:`CEC_LOG_ADDR_TYPE_PLAYBACK ` 3 \#define \ :ref:`CEC_LOG_ADDR_TYPE_AUDIOSYSTEM ` 4 \#define \ :ref:`CEC_LOG_ADDR_TYPE_SPECIFIC ` 5 \#define \ :ref:`CEC_LOG_ADDR_TYPE_UNREGISTERED ` 6 \/\* \* Switches should use UNREGISTERED. \* Processors should use SPECIFIC. \*\/ \#define CEC\_LOG\_ADDR\_MASK\_TV (1 \<\< CEC\_LOG\_ADDR\_TV) \#define CEC\_LOG\_ADDR\_MASK\_RECORD ((1 \<\< CEC\_LOG\_ADDR\_RECORD\_1) \| \\ (1 \<\< CEC\_LOG\_ADDR\_RECORD\_2) \| \\ (1 \<\< CEC\_LOG\_ADDR\_RECORD\_3)) \#define CEC\_LOG\_ADDR\_MASK\_TUNER ((1 \<\< CEC\_LOG\_ADDR\_TUNER\_1) \| \\ (1 \<\< CEC\_LOG\_ADDR\_TUNER\_2) \| \\ (1 \<\< CEC\_LOG\_ADDR\_TUNER\_3) \| \\ (1 \<\< CEC\_LOG\_ADDR\_TUNER\_4)) \#define CEC\_LOG\_ADDR\_MASK\_PLAYBACK ((1 \<\< CEC\_LOG\_ADDR\_PLAYBACK\_1) \| \\ (1 \<\< CEC\_LOG\_ADDR\_PLAYBACK\_2) \| \\ (1 \<\< CEC\_LOG\_ADDR\_PLAYBACK\_3)) \#define CEC\_LOG\_ADDR\_MASK\_AUDIOSYSTEM (1 \<\< CEC\_LOG\_ADDR\_AUDIOSYSTEM) \#define CEC\_LOG\_ADDR\_MASK\_BACKUP ((1 \<\< CEC\_LOG\_ADDR\_BACKUP\_1) \| \\ (1 \<\< CEC\_LOG\_ADDR\_BACKUP\_2)) \#define CEC\_LOG\_ADDR\_MASK\_SPECIFIC (1 \<\< CEC\_LOG\_ADDR\_SPECIFIC) \#define CEC\_LOG\_ADDR\_MASK\_UNREGISTERED (1 \<\< CEC\_LOG\_ADDR\_UNREGISTERED) static inline int cec\_has\_tv(\_\_u16 log\_addr\_mask) \{ return log\_addr\_mask \& CEC\_LOG\_ADDR\_MASK\_TV; \} static inline int cec\_has\_record(\_\_u16 log\_addr\_mask) \{ return log\_addr\_mask \& CEC\_LOG\_ADDR\_MASK\_RECORD; \} static inline int cec\_has\_tuner(\_\_u16 log\_addr\_mask) \{ return log\_addr\_mask \& CEC\_LOG\_ADDR\_MASK\_TUNER; \} static inline int cec\_has\_playback(\_\_u16 log\_addr\_mask) \{ return log\_addr\_mask \& CEC\_LOG\_ADDR\_MASK\_PLAYBACK; \} static inline int cec\_has\_audiosystem(\_\_u16 log\_addr\_mask) \{ return log\_addr\_mask \& CEC\_LOG\_ADDR\_MASK\_AUDIOSYSTEM; \} static inline int cec\_has\_backup(\_\_u16 log\_addr\_mask) \{ return log\_addr\_mask \& CEC\_LOG\_ADDR\_MASK\_BACKUP; \} static inline int cec\_has\_specific(\_\_u16 log\_addr\_mask) \{ return log\_addr\_mask \& CEC\_LOG\_ADDR\_MASK\_SPECIFIC; \} static inline int cec\_is\_unregistered(\_\_u16 log\_addr\_mask) \{ return log\_addr\_mask \& CEC\_LOG\_ADDR\_MASK\_UNREGISTERED; \} static inline int cec\_is\_unconfigured(\_\_u16 log\_addr\_mask) \{ return log\_addr\_mask == 0; \} \/\* \* Use this if there is no vendor ID (CEC\_G\_VENDOR\_ID) or if the vendor ID \* should be disabled (CEC\_S\_VENDOR\_ID) \*\/ \#define CEC\_VENDOR\_ID\_NONE 0xffffffff \/\* The message handling modes \*\/ \/\* Modes for initiator \*\/ \#define \ :ref:`CEC_MODE_NO_INITIATOR ` (0x0 \<\< 0) \#define \ :ref:`CEC_MODE_INITIATOR ` (0x1 \<\< 0) \#define \ :ref:`CEC_MODE_EXCL_INITIATOR ` (0x2 \<\< 0) \#define CEC\_MODE\_INITIATOR\_MSK 0x0f \/\* Modes for follower \*\/ \#define \ :ref:`CEC_MODE_NO_FOLLOWER ` (0x0 \<\< 4) \#define \ :ref:`CEC_MODE_FOLLOWER ` (0x1 \<\< 4) \#define \ :ref:`CEC_MODE_EXCL_FOLLOWER ` (0x2 \<\< 4) \#define \ :ref:`CEC_MODE_EXCL_FOLLOWER_PASSTHRU ` (0x3 \<\< 4) \#define \ :ref:`CEC_MODE_MONITOR_PIN ` (0xd \<\< 4) \#define \ :ref:`CEC_MODE_MONITOR ` (0xe \<\< 4) \#define \ :ref:`CEC_MODE_MONITOR_ALL ` (0xf \<\< 4) \#define CEC\_MODE\_FOLLOWER\_MSK 0xf0 \/\* Userspace has to configure the physical address \*\/ \#define \ :ref:`CEC_CAP_PHYS_ADDR ` (1 \<\< 0) \/\* Userspace has to configure the logical addresses \*\/ \#define \ :ref:`CEC_CAP_LOG_ADDRS ` (1 \<\< 1) \/\* Userspace can transmit messages (and thus become follower as well) \*\/ \#define \ :ref:`CEC_CAP_TRANSMIT ` (1 \<\< 2) \/\* \* Passthrough all messages instead of processing them. \*\/ \#define \ :ref:`CEC_CAP_PASSTHROUGH ` (1 \<\< 3) \/\* Supports remote control \*\/ \#define \ :ref:`CEC_CAP_RC ` (1 \<\< 4) \/\* Hardware can monitor all messages, not just directed and broadcast. \*\/ \#define \ :ref:`CEC_CAP_MONITOR_ALL ` (1 \<\< 5) \/\* Hardware can use CEC only if the HDMI HPD pin is high. \*\/ \#define \ :ref:`CEC_CAP_NEEDS_HPD ` (1 \<\< 6) \/\* Hardware can monitor CEC pin transitions \*\/ \#define \ :ref:`CEC_CAP_MONITOR_PIN ` (1 \<\< 7) \/\* \ :ref:`CEC_ADAP_G_CONNECTOR_INFO ` is available \*\/ \#define \ :ref:`CEC_CAP_CONNECTOR_INFO ` (1 \<\< 8) \/\* \ :ref:`CEC_MSG_FL_REPLY_VENDOR_ID ` is available \*\/ \#define \ :ref:`CEC_CAP_REPLY_VENDOR_ID ` (1 \<\< 9) \/\*\* \* struct cec_caps - CEC capabilities structure. \* @driver\: name of the CEC device driver. \* @name\: name of the CEC device. @driver + @name must be unique. \* @available\_log\_addrs\: number of available logical addresses. \* @capabilities\: capabilities of the CEC adapter. \* @version\: version of the CEC adapter framework. \*\/ struct cec_caps \{ char driver[32]; char name[32]; \_\_u32 available\_log\_addrs; \_\_u32 capabilities; \_\_u32 version; \}; \/\*\* \* struct cec_log_addrs - CEC logical addresses structure. \* @log\_addr\: the claimed logical addresses. Set by the driver. \* @log\_addr\_mask\: current logical address mask. Set by the driver. \* @cec\_version\: the CEC version that the adapter should implement. Set by the \* caller. \* @num\_log\_addrs\: how many logical addresses should be claimed. Set by the \* caller. \* @vendor\_id\: the vendor ID of the device. Set by the caller. \* @flags\: flags. \* @osd\_name\: the OSD name of the device. Set by the caller. \* @primary\_device\_type\: the primary device type for each logical address. \* Set by the caller. \* @log\_addr\_type\: the logical address types. Set by the caller. \* @all\_device\_types\: CEC 2.0\: all device types represented by the logical \* address. Set by the caller. \* @features\: CEC 2.0\: The logical address features. Set by the caller. \*\/ struct cec_log_addrs \{ \_\_u8 log\_addr[CEC\_MAX\_LOG\_ADDRS]; \_\_u16 log\_addr\_mask; \_\_u8 cec\_version; \_\_u8 num\_log\_addrs; \_\_u32 vendor\_id; \_\_u32 flags; char osd\_name[15]; \_\_u8 primary\_device\_type[CEC\_MAX\_LOG\_ADDRS]; \_\_u8 log\_addr\_type[CEC\_MAX\_LOG\_ADDRS]; \/\* CEC 2.0 \*\/ \_\_u8 all\_device\_types[CEC\_MAX\_LOG\_ADDRS]; \_\_u8 features[CEC\_MAX\_LOG\_ADDRS][12]; \}; \/\* Allow a fallback to unregistered \*\/ \#define \ :ref:`CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK ` (1 \<\< 0) \/\* Passthrough RC messages to the input subsystem \*\/ \#define \ :ref:`CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU ` (1 \<\< 1) \/\* CDC-Only device\: supports only CDC messages \*\/ \#define \ :ref:`CEC_LOG_ADDRS_FL_CDC_ONLY ` (1 \<\< 2) \/\*\* \* struct cec_drm_connector_info - tells which drm connector is \* associated with the CEC adapter. \* @card\_no\: drm card number \* @connector\_id\: drm connector ID \*\/ struct cec_drm_connector_info \{ \_\_u32 card\_no; \_\_u32 connector\_id; \}; \#define \ :ref:`CEC_CONNECTOR_TYPE_NO_CONNECTOR ` 0 \#define \ :ref:`CEC_CONNECTOR_TYPE_DRM ` 1 \/\*\* \* struct cec_connector_info - tells if and which connector is \* associated with the CEC adapter. \* @type\: connector type (if any) \* @drm\: drm connector info \* @raw\: array to pad the union \*\/ struct cec_connector_info \{ \_\_u32 type; union \{ struct cec_drm_connector_info drm; \_\_u32 raw[16]; \}; \}; \/\* Events \*\/ \/\* Event that occurs when the adapter state changes \*\/ \#define \ :ref:`CEC_EVENT_STATE_CHANGE ` 1 \/\* \* This event is sent when messages are lost because the application \* didn't empty the message queue in time \*\/ \#define \ :ref:`CEC_EVENT_LOST_MSGS ` 2 \#define \ :ref:`CEC_EVENT_PIN_CEC_LOW ` 3 \#define \ :ref:`CEC_EVENT_PIN_CEC_HIGH ` 4 \#define \ :ref:`CEC_EVENT_PIN_HPD_LOW ` 5 \#define \ :ref:`CEC_EVENT_PIN_HPD_HIGH ` 6 \#define \ :ref:`CEC_EVENT_PIN_5V_LOW ` 7 \#define \ :ref:`CEC_EVENT_PIN_5V_HIGH ` 8 \#define \ :ref:`CEC_EVENT_FL_INITIAL_STATE ` (1 \<\< 0) \#define \ :ref:`CEC_EVENT_FL_DROPPED_EVENTS ` (1 \<\< 1) \/\*\* \* struct cec_event_state_change - used when the CEC adapter changes state. \* @phys\_addr\: the current physical address \* @log\_addr\_mask\: the current logical address mask \* @have\_conn\_info\: if non-zero, then HDMI connector information is available. \* This field is only valid if \ :ref:`CEC_CAP_CONNECTOR_INFO ` is set. If that \* capability is set and @have\_conn\_info is zero, then that indicates \* that the HDMI connector device is not instantiated, either because \* the HDMI driver is still configuring the device or because the HDMI \* device was unbound. \*\/ struct cec_event_state_change \{ \_\_u16 phys\_addr; \_\_u16 log\_addr\_mask; \_\_u16 have\_conn\_info; \}; \/\*\* \* struct cec_event_lost_msgs - tells you how many messages were lost. \* @lost\_msgs\: how many messages were lost. \*\/ struct cec_event_lost_msgs \{ \_\_u32 lost\_msgs; \}; \/\*\* \* struct cec_event - CEC event structure \* @ts\: the timestamp of when the event was sent. \* @event\: the event. \* @flags\: event flags. \* @state\_change\: the event payload for CEC\_EVENT\_STATE\_CHANGE. \* @lost\_msgs\: the event payload for CEC\_EVENT\_LOST\_MSGS. \* @raw\: array to pad the union. \*\/ struct cec_event \{ \_\_u64 ts; \_\_u32 event; \_\_u32 flags; union \{ struct cec_event_state_change state\_change; struct cec_event_lost_msgs lost\_msgs; \_\_u32 raw[16]; \}; \}; \/\* ioctls \*\/ \/\* Adapter capabilities \*\/ \#define \ :ref:`CEC_ADAP_G_CAPS ` \_IOWR('a', 0, struct cec_caps\ ) \/\* \* phys\_addr is either 0 (if this is the CEC root device) \* or a valid physical address obtained from the sink's EDID \* as read by this CEC device (if this is a source device) \* or a physical address obtained and modified from a sink \* EDID and used for a sink CEC device. \* If nothing is connected, then phys\_addr is 0xffff. \* See HDMI 1.4b, section 8.7 (Physical Address). \* \* The \ :ref:`CEC_ADAP_S_PHYS_ADDR ` ioctl may not be available if that is handled \* internally. \*\/ \#define \ :ref:`CEC_ADAP_G_PHYS_ADDR ` \_IOR('a', 1, \_\_u16) \#define \ :ref:`CEC_ADAP_S_PHYS_ADDR ` \_IOW('a', 2, \_\_u16) \/\* \* Configure the CEC adapter. It sets the device type and which \* logical types it will try to claim. It will return which \* logical addresses it could actually claim. \* An error is returned if the adapter is disabled or if there \* is no physical address assigned. \*\/ \#define \ :ref:`CEC_ADAP_G_LOG_ADDRS ` \_IOR('a', 3, struct cec_log_addrs\ ) \#define \ :ref:`CEC_ADAP_S_LOG_ADDRS ` \_IOWR('a', 4, struct cec_log_addrs\ ) \/\* Transmit\/receive a CEC command \*\/ \#define \ :ref:`CEC_TRANSMIT ` \_IOWR('a', 5, struct cec_msg\ ) \#define \ :ref:`CEC_RECEIVE ` \_IOWR('a', 6, struct cec_msg\ ) \/\* Dequeue CEC events \*\/ \#define \ :ref:`CEC_DQEVENT ` \_IOWR('a', 7, struct cec_event\ ) \/\* \* Get and set the message handling mode for this filehandle. \*\/ \#define \ :ref:`CEC_G_MODE ` \_IOR('a', 8, \_\_u32) \#define \ :ref:`CEC_S_MODE ` \_IOW('a', 9, \_\_u32) \/\* Get the connector info \*\/ \#define \ :ref:`CEC_ADAP_G_CONNECTOR_INFO ` \_IOR('a', 10, struct cec_connector_info\ ) \/\* \* The remainder of this header defines all CEC messages and operands. \* The format matters since it the cec-ctl utility parses it to generate \* code for implementing all these messages. \* \* Comments ending with 'Feature' group messages for each feature. \* If messages are part of multiple features, then the "Has also" \* comment is used to list the previously defined messages that are \* supported by the feature. \* \* Before operands are defined a comment is added that gives the \* name of the operand and in brackets the variable name of the \* corresponding argument in the cec-funcs.h function. \*\/ \/\* Messages \*\/ \/\* One Touch Play Feature \*\/ \#define CEC\_MSG\_ACTIVE\_SOURCE 0x82 \#define CEC\_MSG\_IMAGE\_VIEW\_ON 0x04 \#define CEC\_MSG\_TEXT\_VIEW\_ON 0x0d \/\* Routing Control Feature \*\/ \/\* \* Has also\: \* CEC\_MSG\_ACTIVE\_SOURCE \*\/ \#define CEC\_MSG\_INACTIVE\_SOURCE 0x9d \#define CEC\_MSG\_REQUEST\_ACTIVE\_SOURCE 0x85 \#define CEC\_MSG\_ROUTING\_CHANGE 0x80 \#define CEC\_MSG\_ROUTING\_INFORMATION 0x81 \#define CEC\_MSG\_SET\_STREAM\_PATH 0x86 \/\* Standby Feature \*\/ \#define CEC\_MSG\_STANDBY 0x36 \/\* One Touch Record Feature \*\/ \#define CEC\_MSG\_RECORD\_OFF 0x0b \#define CEC\_MSG\_RECORD\_ON 0x09 \/\* Record Source Type Operand (rec\_src\_type) \*\/ \#define CEC\_OP\_RECORD\_SRC\_OWN 1 \#define CEC\_OP\_RECORD\_SRC\_DIGITAL 2 \#define CEC\_OP\_RECORD\_SRC\_ANALOG 3 \#define CEC\_OP\_RECORD\_SRC\_EXT\_PLUG 4 \#define CEC\_OP\_RECORD\_SRC\_EXT\_PHYS\_ADDR 5 \/\* Service Identification Method Operand (service\_id\_method) \*\/ \#define CEC\_OP\_SERVICE\_ID\_METHOD\_BY\_DIG\_ID 0 \#define CEC\_OP\_SERVICE\_ID\_METHOD\_BY\_CHANNEL 1 \/\* Digital Service Broadcast System Operand (dig\_bcast\_system) \*\/ \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_ARIB\_GEN 0x00 \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_ATSC\_GEN 0x01 \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_DVB\_GEN 0x02 \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_ARIB\_BS 0x08 \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_ARIB\_CS 0x09 \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_ARIB\_T 0x0a \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_ATSC\_CABLE 0x10 \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_ATSC\_SAT 0x11 \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_ATSC\_T 0x12 \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_DVB\_C 0x18 \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_DVB\_S 0x19 \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_DVB\_S2 0x1a \#define CEC\_OP\_DIG\_SERVICE\_BCAST\_SYSTEM\_DVB\_T 0x1b \/\* Analogue Broadcast Type Operand (ana\_bcast\_type) \*\/ \#define CEC\_OP\_ANA\_BCAST\_TYPE\_CABLE 0 \#define CEC\_OP\_ANA\_BCAST\_TYPE\_SATELLITE 1 \#define CEC\_OP\_ANA\_BCAST\_TYPE\_TERRESTRIAL 2 \/\* Broadcast System Operand (bcast\_system) \*\/ \#define CEC\_OP\_BCAST\_SYSTEM\_PAL\_BG 0x00 \#define CEC\_OP\_BCAST\_SYSTEM\_SECAM\_LQ 0x01 \/\* SECAM L' \*\/ \#define CEC\_OP\_BCAST\_SYSTEM\_PAL\_M 0x02 \#define CEC\_OP\_BCAST\_SYSTEM\_NTSC\_M 0x03 \#define CEC\_OP\_BCAST\_SYSTEM\_PAL\_I 0x04 \#define CEC\_OP\_BCAST\_SYSTEM\_SECAM\_DK 0x05 \#define CEC\_OP\_BCAST\_SYSTEM\_SECAM\_BG 0x06 \#define CEC\_OP\_BCAST\_SYSTEM\_SECAM\_L 0x07 \#define CEC\_OP\_BCAST\_SYSTEM\_PAL\_DK 0x08 \#define CEC\_OP\_BCAST\_SYSTEM\_OTHER 0x1f \/\* Channel Number Format Operand (channel\_number\_fmt) \*\/ \#define CEC\_OP\_CHANNEL\_NUMBER\_FMT\_1\_PART 0x01 \#define CEC\_OP\_CHANNEL\_NUMBER\_FMT\_2\_PART 0x02 \#define CEC\_MSG\_RECORD\_STATUS 0x0a \/\* Record Status Operand (rec\_status) \*\/ \#define CEC\_OP\_RECORD\_STATUS\_CUR\_SRC 0x01 \#define CEC\_OP\_RECORD\_STATUS\_DIG\_SERVICE 0x02 \#define CEC\_OP\_RECORD\_STATUS\_ANA\_SERVICE 0x03 \#define CEC\_OP\_RECORD\_STATUS\_EXT\_INPUT 0x04 \#define CEC\_OP\_RECORD\_STATUS\_NO\_DIG\_SERVICE 0x05 \#define CEC\_OP\_RECORD\_STATUS\_NO\_ANA\_SERVICE 0x06 \#define CEC\_OP\_RECORD\_STATUS\_NO\_SERVICE 0x07 \#define CEC\_OP\_RECORD\_STATUS\_INVALID\_EXT\_PLUG 0x09 \#define CEC\_OP\_RECORD\_STATUS\_INVALID\_EXT\_PHYS\_ADDR 0x0a \#define CEC\_OP\_RECORD\_STATUS\_UNSUP\_CA 0x0b \#define CEC\_OP\_RECORD\_STATUS\_NO\_CA\_ENTITLEMENTS 0x0c \#define CEC\_OP\_RECORD\_STATUS\_CANT\_COPY\_SRC 0x0d \#define CEC\_OP\_RECORD\_STATUS\_NO\_MORE\_COPIES 0x0e \#define CEC\_OP\_RECORD\_STATUS\_NO\_MEDIA 0x10 \#define CEC\_OP\_RECORD\_STATUS\_PLAYING 0x11 \#define CEC\_OP\_RECORD\_STATUS\_ALREADY\_RECORDING 0x12 \#define CEC\_OP\_RECORD\_STATUS\_MEDIA\_PROT 0x13 \#define CEC\_OP\_RECORD\_STATUS\_NO\_SIGNAL 0x14 \#define CEC\_OP\_RECORD\_STATUS\_MEDIA\_PROBLEM 0x15 \#define CEC\_OP\_RECORD\_STATUS\_NO\_SPACE 0x16 \#define CEC\_OP\_RECORD\_STATUS\_PARENTAL\_LOCK 0x17 \#define CEC\_OP\_RECORD\_STATUS\_TERMINATED\_OK 0x1a \#define CEC\_OP\_RECORD\_STATUS\_ALREADY\_TERM 0x1b \#define CEC\_OP\_RECORD\_STATUS\_OTHER 0x1f \#define CEC\_MSG\_RECORD\_TV\_SCREEN 0x0f \/\* Timer Programming Feature \*\/ \#define CEC\_MSG\_CLEAR\_ANALOGUE\_TIMER 0x33 \/\* Recording Sequence Operand (recording\_seq) \*\/ \#define CEC\_OP\_REC\_SEQ\_SUNDAY 0x01 \#define CEC\_OP\_REC\_SEQ\_MONDAY 0x02 \#define CEC\_OP\_REC\_SEQ\_TUESDAY 0x04 \#define CEC\_OP\_REC\_SEQ\_WEDNESDAY 0x08 \#define CEC\_OP\_REC\_SEQ\_THURSDAY 0x10 \#define CEC\_OP\_REC\_SEQ\_FRIDAY 0x20 \#define CEC\_OP\_REC\_SEQ\_SATURDAY 0x40 \#define CEC\_OP\_REC\_SEQ\_ONCE\_ONLY 0x00 \#define CEC\_MSG\_CLEAR\_DIGITAL\_TIMER 0x99 \#define CEC\_MSG\_CLEAR\_EXT\_TIMER 0xa1 \/\* External Source Specifier Operand (ext\_src\_spec) \*\/ \#define CEC\_OP\_EXT\_SRC\_PLUG 0x04 \#define CEC\_OP\_EXT\_SRC\_PHYS\_ADDR 0x05 \#define CEC\_MSG\_SET\_ANALOGUE\_TIMER 0x34 \#define CEC\_MSG\_SET\_DIGITAL\_TIMER 0x97 \#define CEC\_MSG\_SET\_EXT\_TIMER 0xa2 \#define CEC\_MSG\_SET\_TIMER\_PROGRAM\_TITLE 0x67 \#define CEC\_MSG\_TIMER\_CLEARED\_STATUS 0x43 \/\* Timer Cleared Status Data Operand (timer\_cleared\_status) \*\/ \#define CEC\_OP\_TIMER\_CLR\_STAT\_RECORDING 0x00 \#define CEC\_OP\_TIMER\_CLR\_STAT\_NO\_MATCHING 0x01 \#define CEC\_OP\_TIMER\_CLR\_STAT\_NO\_INFO 0x02 \#define CEC\_OP\_TIMER\_CLR\_STAT\_CLEARED 0x80 \#define CEC\_MSG\_TIMER\_STATUS 0x35 \/\* Timer Overlap Warning Operand (timer\_overlap\_warning) \*\/ \#define CEC\_OP\_TIMER\_OVERLAP\_WARNING\_NO\_OVERLAP 0 \#define CEC\_OP\_TIMER\_OVERLAP\_WARNING\_OVERLAP 1 \/\* Media Info Operand (media\_info) \*\/ \#define CEC\_OP\_MEDIA\_INFO\_UNPROT\_MEDIA 0 \#define CEC\_OP\_MEDIA\_INFO\_PROT\_MEDIA 1 \#define CEC\_OP\_MEDIA\_INFO\_NO\_MEDIA 2 \/\* Programmed Indicator Operand (prog\_indicator) \*\/ \#define CEC\_OP\_PROG\_IND\_NOT\_PROGRAMMED 0 \#define CEC\_OP\_PROG\_IND\_PROGRAMMED 1 \/\* Programmed Info Operand (prog\_info) \*\/ \#define CEC\_OP\_PROG\_INFO\_ENOUGH\_SPACE 0x08 \#define CEC\_OP\_PROG\_INFO\_NOT\_ENOUGH\_SPACE 0x09 \#define CEC\_OP\_PROG\_INFO\_MIGHT\_NOT\_BE\_ENOUGH\_SPACE 0x0b \#define CEC\_OP\_PROG\_INFO\_NONE\_AVAILABLE 0x0a \/\* Not Programmed Error Info Operand (prog\_error) \*\/ \#define CEC\_OP\_PROG\_ERROR\_NO\_FREE\_TIMER 0x01 \#define CEC\_OP\_PROG\_ERROR\_DATE\_OUT\_OF\_RANGE 0x02 \#define CEC\_OP\_PROG\_ERROR\_REC\_SEQ\_ERROR 0x03 \#define CEC\_OP\_PROG\_ERROR\_INV\_EXT\_PLUG 0x04 \#define CEC\_OP\_PROG\_ERROR\_INV\_EXT\_PHYS\_ADDR 0x05 \#define CEC\_OP\_PROG\_ERROR\_CA\_UNSUPP 0x06 \#define CEC\_OP\_PROG\_ERROR\_INSUF\_CA\_ENTITLEMENTS 0x07 \#define CEC\_OP\_PROG\_ERROR\_RESOLUTION\_UNSUPP 0x08 \#define CEC\_OP\_PROG\_ERROR\_PARENTAL\_LOCK 0x09 \#define CEC\_OP\_PROG\_ERROR\_CLOCK\_FAILURE 0x0a \#define CEC\_OP\_PROG\_ERROR\_DUPLICATE 0x0e \/\* System Information Feature \*\/ \#define CEC\_MSG\_CEC\_VERSION 0x9e \/\* CEC Version Operand (cec\_version) \*\/ \#define CEC\_OP\_CEC\_VERSION\_1\_3A 4 \#define CEC\_OP\_CEC\_VERSION\_1\_4 5 \#define CEC\_OP\_CEC\_VERSION\_2\_0 6 \#define CEC\_MSG\_GET\_CEC\_VERSION 0x9f \#define CEC\_MSG\_GIVE\_PHYSICAL\_ADDR 0x83 \#define CEC\_MSG\_GET\_MENU\_LANGUAGE 0x91 \#define CEC\_MSG\_REPORT\_PHYSICAL\_ADDR 0x84 \/\* Primary Device Type Operand (prim\_devtype) \*\/ \#define CEC\_OP\_PRIM\_DEVTYPE\_TV 0 \#define CEC\_OP\_PRIM\_DEVTYPE\_RECORD 1 \#define CEC\_OP\_PRIM\_DEVTYPE\_TUNER 3 \#define CEC\_OP\_PRIM\_DEVTYPE\_PLAYBACK 4 \#define CEC\_OP\_PRIM\_DEVTYPE\_AUDIOSYSTEM 5 \#define CEC\_OP\_PRIM\_DEVTYPE\_SWITCH 6 \#define CEC\_OP\_PRIM\_DEVTYPE\_PROCESSOR 7 \#define CEC\_MSG\_SET\_MENU\_LANGUAGE 0x32 \#define CEC\_MSG\_REPORT\_FEATURES 0xa6 \/\* HDMI 2.0 \*\/ \/\* All Device Types Operand (all\_device\_types) \*\/ \#define CEC\_OP\_ALL\_DEVTYPE\_TV 0x80 \#define CEC\_OP\_ALL\_DEVTYPE\_RECORD 0x40 \#define CEC\_OP\_ALL\_DEVTYPE\_TUNER 0x20 \#define CEC\_OP\_ALL\_DEVTYPE\_PLAYBACK 0x10 \#define CEC\_OP\_ALL\_DEVTYPE\_AUDIOSYSTEM 0x08 \#define CEC\_OP\_ALL\_DEVTYPE\_SWITCH 0x04 \/\* \* And if you wondering what happened to PROCESSOR devices\: those should \* be mapped to a SWITCH. \*\/ \/\* Valid for RC Profile and Device Feature operands \*\/ \#define CEC\_OP\_FEAT\_EXT 0x80 \/\* Extension bit \*\/ \/\* RC Profile Operand (rc\_profile) \*\/ \#define CEC\_OP\_FEAT\_RC\_TV\_PROFILE\_NONE 0x00 \#define CEC\_OP\_FEAT\_RC\_TV\_PROFILE\_1 0x02 \#define CEC\_OP\_FEAT\_RC\_TV\_PROFILE\_2 0x06 \#define CEC\_OP\_FEAT\_RC\_TV\_PROFILE\_3 0x0a \#define CEC\_OP\_FEAT\_RC\_TV\_PROFILE\_4 0x0e \#define CEC\_OP\_FEAT\_RC\_SRC\_HAS\_DEV\_ROOT\_MENU 0x50 \#define CEC\_OP\_FEAT\_RC\_SRC\_HAS\_DEV\_SETUP\_MENU 0x48 \#define CEC\_OP\_FEAT\_RC\_SRC\_HAS\_CONTENTS\_MENU 0x44 \#define CEC\_OP\_FEAT\_RC\_SRC\_HAS\_MEDIA\_TOP\_MENU 0x42 \#define CEC\_OP\_FEAT\_RC\_SRC\_HAS\_MEDIA\_CONTEXT\_MENU 0x41 \/\* Device Feature Operand (dev\_features) \*\/ \#define CEC\_OP\_FEAT\_DEV\_HAS\_RECORD\_TV\_SCREEN 0x40 \#define CEC\_OP\_FEAT\_DEV\_HAS\_SET\_OSD\_STRING 0x20 \#define CEC\_OP\_FEAT\_DEV\_HAS\_DECK\_CONTROL 0x10 \#define CEC\_OP\_FEAT\_DEV\_HAS\_SET\_AUDIO\_RATE 0x08 \#define CEC\_OP\_FEAT\_DEV\_SINK\_HAS\_ARC\_TX 0x04 \#define CEC\_OP\_FEAT\_DEV\_SOURCE\_HAS\_ARC\_RX 0x02 \#define CEC\_OP\_FEAT\_DEV\_HAS\_SET\_AUDIO\_VOLUME\_LEVEL 0x01 \#define CEC\_MSG\_GIVE\_FEATURES 0xa5 \/\* HDMI 2.0 \*\/ \/\* Deck Control Feature \*\/ \#define CEC\_MSG\_DECK\_CONTROL 0x42 \/\* Deck Control Mode Operand (deck\_control\_mode) \*\/ \#define CEC\_OP\_DECK\_CTL\_MODE\_SKIP\_FWD 1 \#define CEC\_OP\_DECK\_CTL\_MODE\_SKIP\_REV 2 \#define CEC\_OP\_DECK\_CTL\_MODE\_STOP 3 \#define CEC\_OP\_DECK\_CTL\_MODE\_EJECT 4 \#define CEC\_MSG\_DECK\_STATUS 0x1b \/\* Deck Info Operand (deck\_info) \*\/ \#define CEC\_OP\_DECK\_INFO\_PLAY 0x11 \#define CEC\_OP\_DECK\_INFO\_RECORD 0x12 \#define CEC\_OP\_DECK\_INFO\_PLAY\_REV 0x13 \#define CEC\_OP\_DECK\_INFO\_STILL 0x14 \#define CEC\_OP\_DECK\_INFO\_SLOW 0x15 \#define CEC\_OP\_DECK\_INFO\_SLOW\_REV 0x16 \#define CEC\_OP\_DECK\_INFO\_FAST\_FWD 0x17 \#define CEC\_OP\_DECK\_INFO\_FAST\_REV 0x18 \#define CEC\_OP\_DECK\_INFO\_NO\_MEDIA 0x19 \#define CEC\_OP\_DECK\_INFO\_STOP 0x1a \#define CEC\_OP\_DECK\_INFO\_SKIP\_FWD 0x1b \#define CEC\_OP\_DECK\_INFO\_SKIP\_REV 0x1c \#define CEC\_OP\_DECK\_INFO\_INDEX\_SEARCH\_FWD 0x1d \#define CEC\_OP\_DECK\_INFO\_INDEX\_SEARCH\_REV 0x1e \#define CEC\_OP\_DECK\_INFO\_OTHER 0x1f \#define CEC\_MSG\_GIVE\_DECK\_STATUS 0x1a \/\* Status Request Operand (status\_req) \*\/ \#define CEC\_OP\_STATUS\_REQ\_ON 1 \#define CEC\_OP\_STATUS\_REQ\_OFF 2 \#define CEC\_OP\_STATUS\_REQ\_ONCE 3 \#define CEC\_MSG\_PLAY 0x41 \/\* Play Mode Operand (play\_mode) \*\/ \#define CEC\_OP\_PLAY\_MODE\_PLAY\_FWD 0x24 \#define CEC\_OP\_PLAY\_MODE\_PLAY\_REV 0x20 \#define CEC\_OP\_PLAY\_MODE\_PLAY\_STILL 0x25 \#define CEC\_OP\_PLAY\_MODE\_PLAY\_FAST\_FWD\_MIN 0x05 \#define CEC\_OP\_PLAY\_MODE\_PLAY\_FAST\_FWD\_MED 0x06 \#define CEC\_OP\_PLAY\_MODE\_PLAY\_FAST\_FWD\_MAX 0x07 \#define CEC\_OP\_PLAY\_MODE\_PLAY\_FAST\_REV\_MIN 0x09 \#define CEC\_OP\_PLAY\_MODE\_PLAY\_FAST\_REV\_MED 0x0a \#define CEC\_OP\_PLAY\_MODE\_PLAY\_FAST\_REV\_MAX 0x0b \#define CEC\_OP\_PLAY\_MODE\_PLAY\_SLOW\_FWD\_MIN 0x15 \#define CEC\_OP\_PLAY\_MODE\_PLAY\_SLOW\_FWD\_MED 0x16 \#define CEC\_OP\_PLAY\_MODE\_PLAY\_SLOW\_FWD\_MAX 0x17 \#define CEC\_OP\_PLAY\_MODE\_PLAY\_SLOW\_REV\_MIN 0x19 \#define CEC\_OP\_PLAY\_MODE\_PLAY\_SLOW\_REV\_MED 0x1a \#define CEC\_OP\_PLAY\_MODE\_PLAY\_SLOW\_REV\_MAX 0x1b \/\* Tuner Control Feature \*\/ \#define CEC\_MSG\_GIVE\_TUNER\_DEVICE\_STATUS 0x08 \#define CEC\_MSG\_SELECT\_ANALOGUE\_SERVICE 0x92 \#define CEC\_MSG\_SELECT\_DIGITAL\_SERVICE 0x93 \#define CEC\_MSG\_TUNER\_DEVICE\_STATUS 0x07 \/\* Recording Flag Operand (rec\_flag) \*\/ \#define CEC\_OP\_REC\_FLAG\_NOT\_USED 0 \#define CEC\_OP\_REC\_FLAG\_USED 1 \/\* Tuner Display Info Operand (tuner\_display\_info) \*\/ \#define CEC\_OP\_TUNER\_DISPLAY\_INFO\_DIGITAL 0 \#define CEC\_OP\_TUNER\_DISPLAY\_INFO\_NONE 1 \#define CEC\_OP\_TUNER\_DISPLAY\_INFO\_ANALOGUE 2 \#define CEC\_MSG\_TUNER\_STEP\_DECREMENT 0x06 \#define CEC\_MSG\_TUNER\_STEP\_INCREMENT 0x05 \/\* Vendor Specific Commands Feature \*\/ \/\* \* Has also\: \* CEC\_MSG\_CEC\_VERSION \* CEC\_MSG\_GET\_CEC\_VERSION \*\/ \#define CEC\_MSG\_DEVICE\_VENDOR\_ID 0x87 \#define CEC\_MSG\_GIVE\_DEVICE\_VENDOR\_ID 0x8c \#define CEC\_MSG\_VENDOR\_COMMAND 0x89 \#define CEC\_MSG\_VENDOR\_COMMAND\_WITH\_ID 0xa0 \#define CEC\_MSG\_VENDOR\_REMOTE\_BUTTON\_DOWN 0x8a \#define CEC\_MSG\_VENDOR\_REMOTE\_BUTTON\_UP 0x8b \/\* OSD Display Feature \*\/ \#define CEC\_MSG\_SET\_OSD\_STRING 0x64 \/\* Display Control Operand (disp\_ctl) \*\/ \#define CEC\_OP\_DISP\_CTL\_DEFAULT 0x00 \#define CEC\_OP\_DISP\_CTL\_UNTIL\_CLEARED 0x40 \#define CEC\_OP\_DISP\_CTL\_CLEAR 0x80 \/\* Device OSD Transfer Feature \*\/ \#define CEC\_MSG\_GIVE\_OSD\_NAME 0x46 \#define CEC\_MSG\_SET\_OSD\_NAME 0x47 \/\* Device Menu Control Feature \*\/ \#define CEC\_MSG\_MENU\_REQUEST 0x8d \/\* Menu Request Type Operand (menu\_req) \*\/ \#define CEC\_OP\_MENU\_REQUEST\_ACTIVATE 0x00 \#define CEC\_OP\_MENU\_REQUEST\_DEACTIVATE 0x01 \#define CEC\_OP\_MENU\_REQUEST\_QUERY 0x02 \#define CEC\_MSG\_MENU\_STATUS 0x8e \/\* Menu State Operand (menu\_state) \*\/ \#define CEC\_OP\_MENU\_STATE\_ACTIVATED 0x00 \#define CEC\_OP\_MENU\_STATE\_DEACTIVATED 0x01 \#define CEC\_MSG\_USER\_CONTROL\_PRESSED 0x44 \/\* UI Command Operand (ui\_cmd) \*\/ \#define CEC\_OP\_UI\_CMD\_SELECT 0x00 \#define CEC\_OP\_UI\_CMD\_UP 0x01 \#define CEC\_OP\_UI\_CMD\_DOWN 0x02 \#define CEC\_OP\_UI\_CMD\_LEFT 0x03 \#define CEC\_OP\_UI\_CMD\_RIGHT 0x04 \#define CEC\_OP\_UI\_CMD\_RIGHT\_UP 0x05 \#define CEC\_OP\_UI\_CMD\_RIGHT\_DOWN 0x06 \#define CEC\_OP\_UI\_CMD\_LEFT\_UP 0x07 \#define CEC\_OP\_UI\_CMD\_LEFT\_DOWN 0x08 \#define CEC\_OP\_UI\_CMD\_DEVICE\_ROOT\_MENU 0x09 \#define CEC\_OP\_UI\_CMD\_DEVICE\_SETUP\_MENU 0x0a \#define CEC\_OP\_UI\_CMD\_CONTENTS\_MENU 0x0b \#define CEC\_OP\_UI\_CMD\_FAVORITE\_MENU 0x0c \#define CEC\_OP\_UI\_CMD\_BACK 0x0d \#define CEC\_OP\_UI\_CMD\_MEDIA\_TOP\_MENU 0x10 \#define CEC\_OP\_UI\_CMD\_MEDIA\_CONTEXT\_SENSITIVE\_MENU 0x11 \#define CEC\_OP\_UI\_CMD\_NUMBER\_ENTRY\_MODE 0x1d \#define CEC\_OP\_UI\_CMD\_NUMBER\_11 0x1e \#define CEC\_OP\_UI\_CMD\_NUMBER\_12 0x1f \#define CEC\_OP\_UI\_CMD\_NUMBER\_0\_OR\_NUMBER\_10 0x20 \#define CEC\_OP\_UI\_CMD\_NUMBER\_1 0x21 \#define CEC\_OP\_UI\_CMD\_NUMBER\_2 0x22 \#define CEC\_OP\_UI\_CMD\_NUMBER\_3 0x23 \#define CEC\_OP\_UI\_CMD\_NUMBER\_4 0x24 \#define CEC\_OP\_UI\_CMD\_NUMBER\_5 0x25 \#define CEC\_OP\_UI\_CMD\_NUMBER\_6 0x26 \#define CEC\_OP\_UI\_CMD\_NUMBER\_7 0x27 \#define CEC\_OP\_UI\_CMD\_NUMBER\_8 0x28 \#define CEC\_OP\_UI\_CMD\_NUMBER\_9 0x29 \#define CEC\_OP\_UI\_CMD\_DOT 0x2a \#define CEC\_OP\_UI\_CMD\_ENTER 0x2b \#define CEC\_OP\_UI\_CMD\_CLEAR 0x2c \#define CEC\_OP\_UI\_CMD\_NEXT\_FAVORITE 0x2f \#define CEC\_OP\_UI\_CMD\_CHANNEL\_UP 0x30 \#define CEC\_OP\_UI\_CMD\_CHANNEL\_DOWN 0x31 \#define CEC\_OP\_UI\_CMD\_PREVIOUS\_CHANNEL 0x32 \#define CEC\_OP\_UI\_CMD\_SOUND\_SELECT 0x33 \#define CEC\_OP\_UI\_CMD\_INPUT\_SELECT 0x34 \#define CEC\_OP\_UI\_CMD\_DISPLAY\_INFORMATION 0x35 \#define CEC\_OP\_UI\_CMD\_HELP 0x36 \#define CEC\_OP\_UI\_CMD\_PAGE\_UP 0x37 \#define CEC\_OP\_UI\_CMD\_PAGE\_DOWN 0x38 \#define CEC\_OP\_UI\_CMD\_POWER 0x40 \#define CEC\_OP\_UI\_CMD\_VOLUME\_UP 0x41 \#define CEC\_OP\_UI\_CMD\_VOLUME\_DOWN 0x42 \#define CEC\_OP\_UI\_CMD\_MUTE 0x43 \#define CEC\_OP\_UI\_CMD\_PLAY 0x44 \#define CEC\_OP\_UI\_CMD\_STOP 0x45 \#define CEC\_OP\_UI\_CMD\_PAUSE 0x46 \#define CEC\_OP\_UI\_CMD\_RECORD 0x47 \#define CEC\_OP\_UI\_CMD\_REWIND 0x48 \#define CEC\_OP\_UI\_CMD\_FAST\_FORWARD 0x49 \#define CEC\_OP\_UI\_CMD\_EJECT 0x4a \#define CEC\_OP\_UI\_CMD\_SKIP\_FORWARD 0x4b \#define CEC\_OP\_UI\_CMD\_SKIP\_BACKWARD 0x4c \#define CEC\_OP\_UI\_CMD\_STOP\_RECORD 0x4d \#define CEC\_OP\_UI\_CMD\_PAUSE\_RECORD 0x4e \#define CEC\_OP\_UI\_CMD\_ANGLE 0x50 \#define CEC\_OP\_UI\_CMD\_SUB\_PICTURE 0x51 \#define CEC\_OP\_UI\_CMD\_VIDEO\_ON\_DEMAND 0x52 \#define CEC\_OP\_UI\_CMD\_ELECTRONIC\_PROGRAM\_GUIDE 0x53 \#define CEC\_OP\_UI\_CMD\_TIMER\_PROGRAMMING 0x54 \#define CEC\_OP\_UI\_CMD\_INITIAL\_CONFIGURATION 0x55 \#define CEC\_OP\_UI\_CMD\_SELECT\_BROADCAST\_TYPE 0x56 \#define CEC\_OP\_UI\_CMD\_SELECT\_SOUND\_PRESENTATION 0x57 \#define CEC\_OP\_UI\_CMD\_AUDIO\_DESCRIPTION 0x58 \#define CEC\_OP\_UI\_CMD\_INTERNET 0x59 \#define CEC\_OP\_UI\_CMD\_3D\_MODE 0x5a \#define CEC\_OP\_UI\_CMD\_PLAY\_FUNCTION 0x60 \#define CEC\_OP\_UI\_CMD\_PAUSE\_PLAY\_FUNCTION 0x61 \#define CEC\_OP\_UI\_CMD\_RECORD\_FUNCTION 0x62 \#define CEC\_OP\_UI\_CMD\_PAUSE\_RECORD\_FUNCTION 0x63 \#define CEC\_OP\_UI\_CMD\_STOP\_FUNCTION 0x64 \#define CEC\_OP\_UI\_CMD\_MUTE\_FUNCTION 0x65 \#define CEC\_OP\_UI\_CMD\_RESTORE\_VOLUME\_FUNCTION 0x66 \#define CEC\_OP\_UI\_CMD\_TUNE\_FUNCTION 0x67 \#define CEC\_OP\_UI\_CMD\_SELECT\_MEDIA\_FUNCTION 0x68 \#define CEC\_OP\_UI\_CMD\_SELECT\_AV\_INPUT\_FUNCTION 0x69 \#define CEC\_OP\_UI\_CMD\_SELECT\_AUDIO\_INPUT\_FUNCTION 0x6a \#define CEC\_OP\_UI\_CMD\_POWER\_TOGGLE\_FUNCTION 0x6b \#define CEC\_OP\_UI\_CMD\_POWER\_OFF\_FUNCTION 0x6c \#define CEC\_OP\_UI\_CMD\_POWER\_ON\_FUNCTION 0x6d \#define CEC\_OP\_UI\_CMD\_F1\_BLUE 0x71 \#define CEC\_OP\_UI\_CMD\_F2\_RED 0x72 \#define CEC\_OP\_UI\_CMD\_F3\_GREEN 0x73 \#define CEC\_OP\_UI\_CMD\_F4\_YELLOW 0x74 \#define CEC\_OP\_UI\_CMD\_F5 0x75 \#define CEC\_OP\_UI\_CMD\_DATA 0x76 \/\* UI Broadcast Type Operand (ui\_bcast\_type) \*\/ \#define CEC\_OP\_UI\_BCAST\_TYPE\_TOGGLE\_ALL 0x00 \#define CEC\_OP\_UI\_BCAST\_TYPE\_TOGGLE\_DIG\_ANA 0x01 \#define CEC\_OP\_UI\_BCAST\_TYPE\_ANALOGUE 0x10 \#define CEC\_OP\_UI\_BCAST\_TYPE\_ANALOGUE\_T 0x20 \#define CEC\_OP\_UI\_BCAST\_TYPE\_ANALOGUE\_CABLE 0x30 \#define CEC\_OP\_UI\_BCAST\_TYPE\_ANALOGUE\_SAT 0x40 \#define CEC\_OP\_UI\_BCAST\_TYPE\_DIGITAL 0x50 \#define CEC\_OP\_UI\_BCAST\_TYPE\_DIGITAL\_T 0x60 \#define CEC\_OP\_UI\_BCAST\_TYPE\_DIGITAL\_CABLE 0x70 \#define CEC\_OP\_UI\_BCAST\_TYPE\_DIGITAL\_SAT 0x80 \#define CEC\_OP\_UI\_BCAST\_TYPE\_DIGITAL\_COM\_SAT 0x90 \#define CEC\_OP\_UI\_BCAST\_TYPE\_DIGITAL\_COM\_SAT2 0x91 \#define CEC\_OP\_UI\_BCAST\_TYPE\_IP 0xa0 \/\* UI Sound Presentation Control Operand (ui\_snd\_pres\_ctl) \*\/ \#define CEC\_OP\_UI\_SND\_PRES\_CTL\_DUAL\_MONO 0x10 \#define CEC\_OP\_UI\_SND\_PRES\_CTL\_KARAOKE 0x20 \#define CEC\_OP\_UI\_SND\_PRES\_CTL\_DOWNMIX 0x80 \#define CEC\_OP\_UI\_SND\_PRES\_CTL\_REVERB 0x90 \#define CEC\_OP\_UI\_SND\_PRES\_CTL\_EQUALIZER 0xa0 \#define CEC\_OP\_UI\_SND\_PRES\_CTL\_BASS\_UP 0xb1 \#define CEC\_OP\_UI\_SND\_PRES\_CTL\_BASS\_NEUTRAL 0xb2 \#define CEC\_OP\_UI\_SND\_PRES\_CTL\_BASS\_DOWN 0xb3 \#define CEC\_OP\_UI\_SND\_PRES\_CTL\_TREBLE\_UP 0xc1 \#define CEC\_OP\_UI\_SND\_PRES\_CTL\_TREBLE\_NEUTRAL 0xc2 \#define CEC\_OP\_UI\_SND\_PRES\_CTL\_TREBLE\_DOWN 0xc3 \#define CEC\_MSG\_USER\_CONTROL\_RELEASED 0x45 \/\* Remote Control Passthrough Feature \*\/ \/\* \* Has also\: \* CEC\_MSG\_USER\_CONTROL\_PRESSED \* CEC\_MSG\_USER\_CONTROL\_RELEASED \*\/ \/\* Power Status Feature \*\/ \#define CEC\_MSG\_GIVE\_DEVICE\_POWER\_STATUS 0x8f \#define CEC\_MSG\_REPORT\_POWER\_STATUS 0x90 \/\* Power Status Operand (pwr\_state) \*\/ \#define CEC\_OP\_POWER\_STATUS\_ON 0 \#define CEC\_OP\_POWER\_STATUS\_STANDBY 1 \#define CEC\_OP\_POWER\_STATUS\_TO\_ON 2 \#define CEC\_OP\_POWER\_STATUS\_TO\_STANDBY 3 \/\* General Protocol Messages \*\/ \#define CEC\_MSG\_FEATURE\_ABORT 0x00 \/\* Abort Reason Operand (reason) \*\/ \#define CEC\_OP\_ABORT\_UNRECOGNIZED\_OP 0 \#define CEC\_OP\_ABORT\_INCORRECT\_MODE 1 \#define CEC\_OP\_ABORT\_NO\_SOURCE 2 \#define CEC\_OP\_ABORT\_INVALID\_OP 3 \#define CEC\_OP\_ABORT\_REFUSED 4 \#define CEC\_OP\_ABORT\_UNDETERMINED 5 \#define CEC\_MSG\_ABORT 0xff \/\* System Audio Control Feature \*\/ \/\* \* Has also\: \* CEC\_MSG\_USER\_CONTROL\_PRESSED \* CEC\_MSG\_USER\_CONTROL\_RELEASED \*\/ \#define CEC\_MSG\_GIVE\_AUDIO\_STATUS 0x71 \#define CEC\_MSG\_GIVE\_SYSTEM\_AUDIO\_MODE\_STATUS 0x7d \#define CEC\_MSG\_REPORT\_AUDIO\_STATUS 0x7a \/\* Audio Mute Status Operand (aud\_mute\_status) \*\/ \#define CEC\_OP\_AUD\_MUTE\_STATUS\_OFF 0 \#define CEC\_OP\_AUD\_MUTE\_STATUS\_ON 1 \#define CEC\_MSG\_REPORT\_SHORT\_AUDIO\_DESCRIPTOR 0xa3 \#define CEC\_MSG\_REQUEST\_SHORT\_AUDIO\_DESCRIPTOR 0xa4 \#define CEC\_MSG\_SET\_SYSTEM\_AUDIO\_MODE 0x72 \/\* System Audio Status Operand (sys\_aud\_status) \*\/ \#define CEC\_OP\_SYS\_AUD\_STATUS\_OFF 0 \#define CEC\_OP\_SYS\_AUD\_STATUS\_ON 1 \#define CEC\_MSG\_SYSTEM\_AUDIO\_MODE\_REQUEST 0x70 \#define CEC\_MSG\_SYSTEM\_AUDIO\_MODE\_STATUS 0x7e \/\* Audio Format ID Operand (audio\_format\_id) \*\/ \#define CEC\_OP\_AUD\_FMT\_ID\_CEA861 0 \#define CEC\_OP\_AUD\_FMT\_ID\_CEA861\_CXT 1 \#define CEC\_MSG\_SET\_AUDIO\_VOLUME\_LEVEL 0x73 \/\* Audio Rate Control Feature \*\/ \#define CEC\_MSG\_SET\_AUDIO\_RATE 0x9a \/\* Audio Rate Operand (audio\_rate) \*\/ \#define CEC\_OP\_AUD\_RATE\_OFF 0 \#define CEC\_OP\_AUD\_RATE\_WIDE\_STD 1 \#define CEC\_OP\_AUD\_RATE\_WIDE\_FAST 2 \#define CEC\_OP\_AUD\_RATE\_WIDE\_SLOW 3 \#define CEC\_OP\_AUD\_RATE\_NARROW\_STD 4 \#define CEC\_OP\_AUD\_RATE\_NARROW\_FAST 5 \#define CEC\_OP\_AUD\_RATE\_NARROW\_SLOW 6 \/\* Audio Return Channel Control Feature \*\/ \#define CEC\_MSG\_INITIATE\_ARC 0xc0 \#define CEC\_MSG\_REPORT\_ARC\_INITIATED 0xc1 \#define CEC\_MSG\_REPORT\_ARC\_TERMINATED 0xc2 \#define CEC\_MSG\_REQUEST\_ARC\_INITIATION 0xc3 \#define CEC\_MSG\_REQUEST\_ARC\_TERMINATION 0xc4 \#define CEC\_MSG\_TERMINATE\_ARC 0xc5 \/\* Dynamic Audio Lipsync Feature \*\/ \/\* Only for CEC 2.0 and up \*\/ \#define CEC\_MSG\_REQUEST\_CURRENT\_LATENCY 0xa7 \#define CEC\_MSG\_REPORT\_CURRENT\_LATENCY 0xa8 \/\* Low Latency Mode Operand (low\_latency\_mode) \*\/ \#define CEC\_OP\_LOW\_LATENCY\_MODE\_OFF 0 \#define CEC\_OP\_LOW\_LATENCY\_MODE\_ON 1 \/\* Audio Output Compensated Operand (audio\_out\_compensated) \*\/ \#define CEC\_OP\_AUD\_OUT\_COMPENSATED\_NA 0 \#define CEC\_OP\_AUD\_OUT\_COMPENSATED\_DELAY 1 \#define CEC\_OP\_AUD\_OUT\_COMPENSATED\_NO\_DELAY 2 \#define CEC\_OP\_AUD\_OUT\_COMPENSATED\_PARTIAL\_DELAY 3 \/\* Capability Discovery and Control Feature \*\/ \#define CEC\_MSG\_CDC\_MESSAGE 0xf8 \/\* Ethernet-over-HDMI\: nobody ever does this... \*\/ \#define CEC\_MSG\_CDC\_HEC\_INQUIRE\_STATE 0x00 \#define CEC\_MSG\_CDC\_HEC\_REPORT\_STATE 0x01 \/\* HEC Functionality State Operand (hec\_func\_state) \*\/ \#define CEC\_OP\_HEC\_FUNC\_STATE\_NOT\_SUPPORTED 0 \#define CEC\_OP\_HEC\_FUNC\_STATE\_INACTIVE 1 \#define CEC\_OP\_HEC\_FUNC\_STATE\_ACTIVE 2 \#define CEC\_OP\_HEC\_FUNC\_STATE\_ACTIVATION\_FIELD 3 \/\* Host Functionality State Operand (host\_func\_state) \*\/ \#define CEC\_OP\_HOST\_FUNC\_STATE\_NOT\_SUPPORTED 0 \#define CEC\_OP\_HOST\_FUNC\_STATE\_INACTIVE 1 \#define CEC\_OP\_HOST\_FUNC\_STATE\_ACTIVE 2 \/\* ENC Functionality State Operand (enc\_func\_state) \*\/ \#define CEC\_OP\_ENC\_FUNC\_STATE\_EXT\_CON\_NOT\_SUPPORTED 0 \#define CEC\_OP\_ENC\_FUNC\_STATE\_EXT\_CON\_INACTIVE 1 \#define CEC\_OP\_ENC\_FUNC\_STATE\_EXT\_CON\_ACTIVE 2 \/\* CDC Error Code Operand (cdc\_errcode) \*\/ \#define CEC\_OP\_CDC\_ERROR\_CODE\_NONE 0 \#define CEC\_OP\_CDC\_ERROR\_CODE\_CAP\_UNSUPPORTED 1 \#define CEC\_OP\_CDC\_ERROR\_CODE\_WRONG\_STATE 2 \#define CEC\_OP\_CDC\_ERROR\_CODE\_OTHER 3 \/\* HEC Support Operand (hec\_support) \*\/ \#define CEC\_OP\_HEC\_SUPPORT\_NO 0 \#define CEC\_OP\_HEC\_SUPPORT\_YES 1 \/\* HEC Activation Operand (hec\_activation) \*\/ \#define CEC\_OP\_HEC\_ACTIVATION\_ON 0 \#define CEC\_OP\_HEC\_ACTIVATION\_OFF 1 \#define CEC\_MSG\_CDC\_HEC\_SET\_STATE\_ADJACENT 0x02 \#define CEC\_MSG\_CDC\_HEC\_SET\_STATE 0x03 \/\* HEC Set State Operand (hec\_set\_state) \*\/ \#define CEC\_OP\_HEC\_SET\_STATE\_DEACTIVATE 0 \#define CEC\_OP\_HEC\_SET\_STATE\_ACTIVATE 1 \#define CEC\_MSG\_CDC\_HEC\_REQUEST\_DEACTIVATION 0x04 \#define CEC\_MSG\_CDC\_HEC\_NOTIFY\_ALIVE 0x05 \#define CEC\_MSG\_CDC\_HEC\_DISCOVER 0x06 \/\* Hotplug Detect messages \*\/ \#define CEC\_MSG\_CDC\_HPD\_SET\_STATE 0x10 \/\* HPD State Operand (hpd\_state) \*\/ \#define CEC\_OP\_HPD\_STATE\_CP\_EDID\_DISABLE 0 \#define CEC\_OP\_HPD\_STATE\_CP\_EDID\_ENABLE 1 \#define CEC\_OP\_HPD\_STATE\_CP\_EDID\_DISABLE\_ENABLE 2 \#define CEC\_OP\_HPD\_STATE\_EDID\_DISABLE 3 \#define CEC\_OP\_HPD\_STATE\_EDID\_ENABLE 4 \#define CEC\_OP\_HPD\_STATE\_EDID\_DISABLE\_ENABLE 5 \#define CEC\_MSG\_CDC\_HPD\_REPORT\_STATE 0x11 \/\* HPD Error Code Operand (hpd\_error) \*\/ \#define CEC\_OP\_HPD\_ERROR\_NONE 0 \#define CEC\_OP\_HPD\_ERROR\_INITIATOR\_NOT\_CAPABLE 1 \#define CEC\_OP\_HPD\_ERROR\_INITIATOR\_WRONG\_STATE 2 \#define CEC\_OP\_HPD\_ERROR\_OTHER 3 \#define CEC\_OP\_HPD\_ERROR\_NONE\_NO\_VIDEO 4 \/\* End of Messages \*\/ \/\* Helper functions to identify the 'special' CEC devices \*\/ static inline int cec\_is\_2nd\_tv(const struct cec_log_addrs \*las) \{ \/\* \* It is a second TV if the logical address is 14 or 15 and the \* primary device type is a TV. \*\/ return las-\>num\_log\_addrs \&\& las-\>log\_addr[0] \>= CEC\_LOG\_ADDR\_SPECIFIC \&\& las-\>primary\_device\_type[0] == CEC\_OP\_PRIM\_DEVTYPE\_TV; \} static inline int cec\_is\_processor(const struct cec_log_addrs \*las) \{ \/\* \* It is a processor if the logical address is 12-15 and the \* primary device type is a Processor. \*\/ return las-\>num\_log\_addrs \&\& las-\>log\_addr[0] \>= CEC\_LOG\_ADDR\_BACKUP\_1 \&\& las-\>primary\_device\_type[0] == CEC\_OP\_PRIM\_DEVTYPE\_PROCESSOR; \} static inline int cec\_is\_switch(const struct cec_log_addrs \*las) \{ \/\* \* It is a switch if the logical address is 15 and the \* primary device type is a Switch and the CDC-Only flag is not set. \*\/ return las-\>num\_log\_addrs == 1 \&\& las-\>log\_addr[0] == CEC\_LOG\_ADDR\_UNREGISTERED \&\& las-\>primary\_device\_type[0] == CEC\_OP\_PRIM\_DEVTYPE\_SWITCH \&\& !(las-\>flags \& \ :ref:`CEC_LOG_ADDRS_FL_CDC_ONLY `\ ); \} static inline int cec\_is\_cdc\_only(const struct cec_log_addrs \*las) \{ \/\* \* It is a CDC-only device if the logical address is 15 and the \* primary device type is a Switch and the CDC-Only flag is set. \*\/ return las-\>num\_log\_addrs == 1 \&\& las-\>log\_addr[0] == CEC\_LOG\_ADDR\_UNREGISTERED \&\& las-\>primary\_device\_type[0] == CEC\_OP\_PRIM\_DEVTYPE\_SWITCH \&\& (las-\>flags \& \ :ref:`CEC_LOG_ADDRS_FL_CDC_ONLY `\ ); \} \#endif”h]”(hXÂ/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ /* * cec - HDMI Consumer Electronics Control public header * * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved. */ #ifndef _CEC_UAPI_H #define _CEC_UAPI_H #include #include #define CEC_MAX_MSG_SIZE 16 /** * struct cec_msg - CEC message structure. * @tx_ts: Timestamp in nanoseconds using CLOCK_MONOTONIC. Set by the * driver when the message transmission has finished. * @rx_ts: Timestamp in nanoseconds using CLOCK_MONOTONIC. Set by the * driver when the message was received. * @len: Length in bytes of the message. * @timeout: The timeout (in ms) that is used to timeout CEC_RECEIVE. * Set to 0 if you want to wait forever. This timeout can also be * used with ”…””}”hhùsbh)”}”(hŒ":ref:`CEC_TRANSMIT `”h]”hŒinline”“”)”}”(hjh]”hŒ CEC_TRANSMIT”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(Œxref”Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œ"userspace-api/media/cec/cec-header”Œ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆŒ reftarget”Œ cec_transmit”uh1hhŸhåh KhhùubhXÖ as the timeout for waiting for a reply. * If 0, then it will use a 1 second timeout instead of waiting * forever as is done with CEC_RECEIVE. * @sequence: The framework assigns a sequence number to messages that are * sent. This can be used to track replies to previously sent * messages. * @flags: Set to 0. * @msg: The message payload. * @reply: This field is ignored with ”…””}”hhùsbh)”}”(hŒ :ref:`CEC_RECEIVE `”h]”j)”}”(hj,h]”hŒ CEC_RECEIVE”…””}”(hj.hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj*ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j8Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œ cec_receive”uh1hhŸhåh KhhùubhXÞ and is only used by * CEC_TRANSMIT. If non-zero, then wait for a reply with this * opcode. Set to CEC_MSG_FEATURE_ABORT if you want to wait for * a possible ABORT reply. If there was an error when sending the * msg or FeatureAbort was returned, then reply is set to 0. * If reply is non-zero upon return, then len/msg are set to * the received message. * If reply is zero upon return and status has the * CEC_TX_STATUS_FEATURE_ABORT bit set, then len/msg are set to * the received feature abort message. * If reply is zero upon return and status has the * ”…””}”hhùsbh)”}”(hŒ<:ref:`CEC_TX_STATUS_MAX_RETRIES `”h]”j)”}”(hjPh]”hŒCEC_TX_STATUS_MAX_RETRIES”…””}”(hjRhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjNubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j\Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-tx-status-max-retries”uh1hhŸhåh KhhùubhŒU bit set, then no reply was seen at * all. If reply is non-zero for ”…””}”hhùsbh)”}”(hŒ":ref:`CEC_TRANSMIT `”h]”j)”}”(hjth]”hŒ CEC_TRANSMIT”…””}”(hjvhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”e•=h"]”h$]”h&]”uh1jhjrubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j€Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œ cec_transmit”uh1hhŸhåh KhhùubhX± and the message is a * broadcast, then -EINVAL is returned. * if reply is non-zero, then timeout is set to 1000 (the required * maximum response time). * @rx_status: The message receive status bits. Set by the driver. * @tx_status: The message transmit status bits. Set by the driver. * @tx_arb_lost_cnt: The number of 'Arbitration Lost' events. Set by the driver. * @tx_nack_cnt: The number of 'Not Acknowledged' events. Set by the driver. * @tx_low_drive_cnt: The number of 'Low Drive Detected' events. Set by the * driver. * @tx_error_cnt: The number of 'Error' events. Set by the driver. */ struct cec_msg { __u64 tx_ts; __u64 rx_ts; __u32 len; __u32 timeout; __u32 sequence; __u32 flags; __u8 msg[CEC_MAX_MSG_SIZE]; __u8 reply; __u8 rx_status; __u8 tx_status; __u8 tx_arb_lost_cnt; __u8 tx_nack_cnt; __u8 tx_low_drive_cnt; __u8 tx_error_cnt; }; /** * cec_msg_initiator - return the initiator's logical address. * @msg: the message structure */ static inline __u8 cec_msg_initiator(const struct cec_msg *msg) { return msg->msg[0] >> 4; } /** * cec_msg_destination - return the destination's logical address. * @msg: the message structure */ static inline __u8 cec_msg_destination(const struct cec_msg *msg) { return msg->msg[0] & 0xf; } /** * cec_msg_opcode - return the opcode of the message, -1 for poll * @msg: the message structure */ static inline int cec_msg_opcode(const struct cec_msg *msg) { return msg->len > 1 ? msg->msg[1] : -1; } /** * cec_msg_is_broadcast - return true if this is a broadcast message. * @msg: the message structure */ static inline int cec_msg_is_broadcast(const struct cec_msg *msg) { return (msg->msg[0] & 0xf) == 0xf; } /** * cec_msg_init - initialize the message structure. * @msg: the message structure * @initiator: the logical address of the initiator * @destination:the logical address of the destination (0xf for broadcast) * * The whole structure is zeroed, the len field is set to 1 (i.e. a poll * message) and the initiator and destination are filled in. */ static inline void cec_msg_init(struct cec_msg *msg, __u8 initiator, __u8 destination) { memset(msg, 0, sizeof(*msg)); msg->msg[0] = (initiator << 4) | destination; msg->len = 1; } /** * cec_msg_set_reply_to - fill in destination/initiator in a reply message. * @msg: the message structure for the reply * @orig: the original message structure * * Set the msg destination to the orig initiator and the msg initiator to the * orig destination. Note that msg and orig may be the same pointer, in which * case the change is done in place. * * It also zeroes the reply, timeout and flags fields. */ static inline void cec_msg_set_reply_to(struct cec_msg *msg, struct cec_msg *orig) { /* The destination becomes the initiator and vice versa */ msg->msg[0] = (cec_msg_destination(orig) << 4) | cec_msg_initiator(orig); msg->reply = 0; msg->timeout = 0; msg->flags = 0; } /** * cec_msg_recv_is_tx_result - return true if this message contains the * result of an earlier non-blocking transmit * @msg: the message structure from ”…””}”hhùsbh)”}”(hŒ :ref:`CEC_RECEIVE `”h]”j)”}”(hj˜h]”hŒ CEC_RECEIVE”…””}”(hjšhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj–ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j¤Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œ cec_receive”uh1hhŸhåh KhhùubhXu */ static inline int cec_msg_recv_is_tx_result(const struct cec_msg *msg) { return msg->sequence && msg->tx_status && !msg->rx_status; } /** * cec_msg_recv_is_rx_result - return true if this message contains the * reply of an earlier non-blocking transmit * @msg: the message structure from ”…””}”hhùsbh)”}”(hŒ :ref:`CEC_RECEIVE `”h]”j)”}”(hj¼h]”hŒ CEC_RECEIVE”…””}”(hj¾hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjºubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jÈŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œ cec_receive”uh1hhŸhåh KhhùubhŒÑ */ static inline int cec_msg_recv_is_rx_result(const struct cec_msg *msg) { return msg->sequence && !msg->tx_status && msg->rx_status; } /* cec_msg flags field */ #define ”…””}”hhùsbh)”}”(hŒD:ref:`CEC_MSG_FL_REPLY_TO_FOLLOWERS `”h]”j)”}”(hjàh]”hŒCEC_MSG_FL_REPLY_TO_FOLLOWERS”…””}”(hjâhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÞubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jìŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-msg-fl-reply-to-followers”uh1hhŸhåh KhhùubhŒ (1 << 0) #define ”…””}”hhùsbh)”}”(hŒ&:ref:`CEC_MSG_FL_RAW `”h]”j)”}”(hjh]”hŒCEC_MSG_FL_RAW”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-msg-fl-raw”uh1hhŸhåh KhhùubhŒ( (1 << 1) #define ”…””}”hhùsbh)”}”(hŒ>:ref:`CEC_MSG_FL_REPLY_VENDOR_ID `”h]”j)”}”(hj(h]”hŒCEC_MSG_FL_REPLY_VENDOR_ID”…””}”(hj*hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj&ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j4Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-msg-fl-reply-vendor-id”uh1hhŸhåh KhhùubhŒE (1 << 2) /* cec_msg tx/rx_status field */ #define ”…””}”hhùsbh)”}”(hŒ*:ref:`CEC_TX_STATUS_OK `”h]”j)”}”(hjLh]”hŒCEC_TX_STATUS_OK”…””}”(hjNhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjJubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jXŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-tx-status-ok”uh1hhŸhåh KhhùubhŒ& (1 << 0) #define ”…””}”hhùsbh)”}”(hŒ6:ref:`CEC_TX_STATUS_ARB_LOST `”h]”j)”}”(hjph]”hŒCEC_TX_STATUS_ARB_LOST”…””}”(hjrhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjnubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j|Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-tx-status-arb-lost”uh1hhŸhåh KhhùubhŒ (1 << 1) #define ”…””}”hhùsbh)”}”(hŒ.:ref:`CEC_TX_STATUS_NACK `”h]”j)”}”(hj”h]”hŒCEC_TX_STATUS_NACK”…””}”(hj–hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj’ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-tx-status-nack”uh1hhŸhåh KhhùubhŒ$ (1 << 2) #define ”…””}”hhùsbh)”}”(hŒ8:ref:`CEC_TX_STATUS_LOW_DRIVE `”h]”j)”}”(hj¸h]”hŒCEC_TX_STATUS_LOW_DRIVE”…””}”(hjºhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj¶ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jÄŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-tx-status-low-drive”uh1hhŸhåh KhhùubhŒ (1 << 3) #define ”…””}”hhùsbh)”}”(hŒ0:ref:`CEC_TX_STATUS_ERROR `”h]”j)”}”(hjÜh]”hŒCEC_TX_STATUS_ERROR”…””}”(hjÞhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÚubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jèŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-tx-status-error”uh1hhŸhåh KhhùubhŒ# (1 << 4) #define ”…””}”hhùsbh)”}”(hŒ<:ref:`CEC_TX_STATUS_MAX_RETRIES `”h]”j)”}”(hjh]”hŒCEC_TX_STATUS_MAX_RETRIES”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjþubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-tx-status-max-retries”uh1hhŸhåh KhhùubhŒ (1 << 5) #define ”…””}”hhùsbh)”}”(hŒ4:ref:`CEC_TX_STATUS_ABORTED `”h]”j)”}”(hj$h]”hŒCEC_TX_STATUS_ABORTED”…””}”(hj&hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj"ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j0Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-tx-status-aborted”uh1hhŸhåh KhhùubhŒ! (1 << 6) #define ”…””}”hhùsbh)”}”(hŒ4:ref:`CEC_TX_STATUS_TIMEOUT `”h]”j)”}”(hjHh]”hŒCEC_TX_STATUS_TIMEOUT”…””}”(hjJhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjFubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jTŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-tx-status-timeout”uh1hhŸhåh KhhùubhŒ" (1 << 7) #define ”…””}”hhùsbh)”}”(hŒ*:ref:`CEC_RX_STATUS_OK `”h]”j)”}”(hjlh]”hŒCEC_RX_STATUS_OK”…””}”(hjnhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jxŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-rx-status-ok”uh1hhŸhåh KhhùubhŒ& (1 << 0) #define ”…””}”hhùsbh)”}”(hŒ4:ref:`CEC_RX_STATUS_TIMEOUT `”h]”j)”}”(hjh]”hŒCEC_RX_STATUS_TIMEOUT”…””}”(hj’hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjŽubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jœŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-rx-status-timeout”uh1hhŸhåh KhhùubhŒ! (1 << 1) #define ”…””}”hhùsbh)”}”(hŒ@:ref:`CEC_RX_STATUS_FEATURE_ABORT `”h]”j)”}”(hj´h]”hŒCEC_RX_STATUS_FEATURE_ABORT”…””}”(hj¶hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj²ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jÀŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-rx-status-feature-abort”uh1hhŸhåh KhhùubhŒ (1 << 2) #define ”…””}”hhùsbh)”}”(hŒ4:ref:`CEC_RX_STATUS_ABORTED `”h]”j)”}”(hjØh]”hŒCEC_RX_STATUS_ABORTED”…””}”(hjÚhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÖubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jäŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-rx-status-aborted”uh1hhŸhåh KhhùubhŒ› (1 << 3) static inline int cec_msg_status_is_ok(const struct cec_msg *msg) { if (msg->tx_status && !(msg->tx_status & ”…””}”hhùsbh)”}”(hŒ*:ref:`CEC_TX_STATUS_OK `”h]”j)”}”(hjüh]”hŒCEC_TX_STATUS_OK”…””}”(hjþhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjúubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-tx-status-ok”uh1hhŸhåh KhhùubhŒY )) return 0; if (msg->rx_status && !(msg->rx_status & ”…””}”hhùsbh)”}”(hŒ*:ref:`CEC_RX_STATUS_OK `”h]”j)”}”(hj h]”hŒCEC_RX_STATUS_OK”…””}”(hj"hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j,Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-rx-status-ok”uh1hhŸhåh KhhùubhŒ– )) return 0; if (!msg->tx_status && !msg->rx_status) return 0; return !(msg->rx_status & ”…””}”hhùsbh)”}”(hŒ@:ref:`CEC_RX_STATUS_FEATURE_ABORT `”h]”j)”}”(hjDh]”hŒCEC_RX_STATUS_FEATURE_ABORT”…””}”(hjFhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjBubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jPŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-rx-status-feature-abort”uh1hhŸhåh KhhùubhXc ); } #define CEC_LOG_ADDR_INVALID 0xff #define CEC_PHYS_ADDR_INVALID 0xffff /* * The maximum number of logical addresses one device can be assigned to. * The CEC 2.0 spec allows for only 2 logical addresses at the moment. The * Analog Devices CEC hardware supports 3. So let's go wild and go for 4. */ #define CEC_MAX_LOG_ADDRS 4 /* The logical addresses defined by CEC 2.0 */ #define CEC_LOG_ADDR_TV 0 #define CEC_LOG_ADDR_RECORD_1 1 #define CEC_LOG_ADDR_RECORD_2 2 #define CEC_LOG_ADDR_TUNER_1 3 #define CEC_LOG_ADDR_PLAYBACK_1 4 #define CEC_LOG_ADDR_AUDIOSYSTEM 5 #define CEC_LOG_ADDR_TUNER_2 6 #define CEC_LOG_ADDR_TUNER_3 7 #define CEC_LOG_ADDR_PLAYBACK_2 8 #define CEC_LOG_ADDR_RECORD_3 9 #define CEC_LOG_ADDR_TUNER_4 10 #define CEC_LOG_ADDR_PLAYBACK_3 11 #define CEC_LOG_ADDR_BACKUP_1 12 #define CEC_LOG_ADDR_BACKUP_2 13 #define CEC_LOG_ADDR_SPECIFIC 14 #define CEC_LOG_ADDR_UNREGISTERED 15 /* as initiator address */ #define CEC_LOG_ADDR_BROADCAST 15 /* as destination address */ /* The logical address types that the CEC device wants to claim */ #define ”…””}”hhùsbh)”}”(hŒ2:ref:`CEC_LOG_ADDR_TYPE_TV `”h]”j)”}”(hjhh]”hŒCEC_LOG_ADDR_TYPE_TV”…””}”(hjjhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjfubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jtŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-log-addr-type-tv”uh1hhŸhåh KhhùubhŒ 0 #define ”…””}”hhùsbh)”}”(hŒ::ref:`CEC_LOG_ADDR_TYPE_RECORD `”h]”j)”}”(hjŒh]”hŒCEC_LOG_ADDR_TYPE_RECORD”…””}”(hjŽhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjŠubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j˜Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-log-addr-type-record”uh1hhŸhåh KhhùubhŒ 1 #define ”…””}”hhùsbh)”}”(hŒ8:ref:`CEC_LOG_ADDR_TYPE_TUNER `”h]”j)”}”(hj°h]”hŒCEC_LOG_ADDR_TYPE_TUNER”…””}”(hj²hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj®ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j¼Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-log-addr-type-tuner”uh1hhŸhåh KhhùubhŒ 2 #define ”…””}”hhùsbh)”}”(hŒ>:ref:`CEC_LOG_ADDR_TYPE_PLAYBACK `”h]”j)”}”(hjÔh]”hŒCEC_LOG_ADDR_TYPE_PLAYBACK”…””}”(hjÖhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÒubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jàŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-log-addr-type-playback”uh1hhŸhåh KhhùubhŒ 3 #define ”…””}”hhùsbh)”}”(hŒD:ref:`CEC_LOG_ADDR_TYPE_AUDIOSYSTEM `”h]”j)”}”(hjøh]”hŒCEC_LOG_ADDR_TYPE_AUDIOSYSTEM”…””}”(hjúhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjöubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-log-addr-type-audiosystem”uh1hhŸhåh KhhùubhŒ 4 #define ”…””}”hhùsbh)”}”(hŒ>:ref:`CEC_LOG_ADDR_TYPE_SPECIFIC `”h]”j)”}”(hjh]”hŒCEC_LOG_ADDR_TYPE_SPECIFIC”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j(Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-log-addr-type-specific”uh1hhŸhåh KhhùubhŒ 5 #define ”…””}”hhùsbh)”}”(hŒF:ref:`CEC_LOG_ADDR_TYPE_UNREGISTERED `”h]”j)”}”(hj@h]”hŒCEC_LOG_ADDR_TYPE_UNREGISTERED”…””}”(hjBhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj>ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jLŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-log-addr-type-unregistered”uh1hhŸhåh KhhùubhX 6 /* * Switches should use UNREGISTERED. * Processors should use SPECIFIC. */ #define CEC_LOG_ADDR_MASK_TV (1 << CEC_LOG_ADDR_TV) #define CEC_LOG_ADDR_MASK_RECORD ((1 << CEC_LOG_ADDR_RECORD_1) | \ (1 << CEC_LOG_ADDR_RECORD_2) | \ (1 << CEC_LOG_ADDR_RECORD_3)) #define CEC_LOG_ADDR_MASK_TUNER ((1 << CEC_LOG_ADDR_TUNER_1) | \ (1 << CEC_LOG_ADDR_TUNER_2) | \ (1 << CEC_LOG_ADDR_TUNER_3) | \ (1 << CEC_LOG_ADDR_TUNER_4)) #define CEC_LOG_ADDR_MASK_PLAYBACK ((1 << CEC_LOG_ADDR_PLAYBACK_1) | \ (1 << CEC_LOG_ADDR_PLAYBACK_2) | \ (1 << CEC_LOG_ADDR_PLAYBACK_3)) #define CEC_LOG_ADDR_MASK_AUDIOSYSTEM (1 << CEC_LOG_ADDR_AUDIOSYSTEM) #define CEC_LOG_ADDR_MASK_BACKUP ((1 << CEC_LOG_ADDR_BACKUP_1) | \ (1 << CEC_LOG_ADDR_BACKUP_2)) #define CEC_LOG_ADDR_MASK_SPECIFIC (1 << CEC_LOG_ADDR_SPECIFIC) #define CEC_LOG_ADDR_MASK_UNREGISTERED (1 << CEC_LOG_ADDR_UNREGISTERED) static inline int cec_has_tv(__u16 log_addr_mask) { return log_addr_mask & CEC_LOG_ADDR_MASK_TV; } static inline int cec_has_record(__u16 log_addr_mask) { return log_addr_mask & CEC_LOG_ADDR_MASK_RECORD; } static inline int cec_has_tuner(__u16 log_addr_mask) { return log_addr_mask & CEC_LOG_ADDR_MASK_TUNER; } static inline int cec_has_playback(__u16 log_addr_mask) { return log_addr_mask & CEC_LOG_ADDR_MASK_PLAYBACK; } static inline int cec_has_audiosystem(__u16 log_addr_mask) { return log_addr_mask & CEC_LOG_ADDR_MASK_AUDIOSYSTEM; } static inline int cec_has_backup(__u16 log_addr_mask) { return log_addr_mask & CEC_LOG_ADDR_MASK_BACKUP; } static inline int cec_has_specific(__u16 log_addr_mask) { return log_addr_mask & CEC_LOG_ADDR_MASK_SPECIFIC; } static inline int cec_is_unregistered(__u16 log_addr_mask) { return log_addr_mask & CEC_LOG_ADDR_MASK_UNREGISTERED; } static inline int cec_is_unconfigured(__u16 log_addr_mask) { return log_addr_mask == 0; } /* * Use this if there is no vendor ID (CEC_G_VENDOR_ID) or if the vendor ID * should be disabled (CEC_S_VENDOR_ID) */ #define CEC_VENDOR_ID_NONE 0xffffffff /* The message handling modes */ /* Modes for initiator */ #define ”…””}”hhùsbh)”}”(hŒ4:ref:`CEC_MODE_NO_INITIATOR `”h]”j)”}”(hjdh]”hŒCEC_MODE_NO_INITIATOR”…””}”(hjfhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjbubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jpŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-mode-no-initiator”uh1hhŸhåh KhhùubhŒ# (0x0 << 0) #define ”…””}”hhùsbh)”}”(hŒ.:ref:`CEC_MODE_INITIATOR `”h]”j)”}”(hjˆh]”hŒCEC_MODE_INITIATOR”…””}”(hjŠhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj†ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j”Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-mode-initiator”uh1hhŸhåh KhhùubhŒ& (0x1 << 0) #define ”…””}”hhùsbh)”}”(hŒ8:ref:`CEC_MODE_EXCL_INITIATOR `”h]”j)”}”(hj¬h]”hŒCEC_MODE_EXCL_INITIATOR”…””}”(hj®hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjªubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j¸Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-mode-excl-initiator”uh1hhŸhåh KhhùubhŒp (0x2 << 0) #define CEC_MODE_INITIATOR_MSK 0x0f /* Modes for follower */ #define ”…””}”hhùsbh)”}”(hŒ2:ref:`CEC_MODE_NO_FOLLOWER `”h]”j)”}”(hjÐh]”hŒCEC_MODE_NO_FOLLOWER”…””}”(hjÒhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÎubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jÜŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-mode-no-follower”uh1hhŸhåh KhhùubhŒ$ (0x0 << 4) #define ”…””}”hhùsbh)”}”(hŒ,:ref:`CEC_MODE_FOLLOWER `”h]”j)”}”(hjôh]”hŒCEC_MODE_FOLLOWER”…””}”(hjöhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjòubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-mode-follower”uh1hhŸhåh KhhùubhŒ' (0x1 << 4) #define ”…””}”hhùsbh)”}”(hŒ6:ref:`CEC_MODE_EXCL_FOLLOWER `”h]”j)”}”(hjh]”hŒCEC_MODE_EXCL_FOLLOWER”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j$Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-mode-excl-follower”uh1hhŸhåh KhhùubhŒ" (0x2 << 4) #define ”…””}”hhùsbh)”}”(hŒH:ref:`CEC_MODE_EXCL_FOLLOWER_PASSTHRU `”h]”j)”}”(hj<h]”hŒCEC_MODE_EXCL_FOLLOWER_PASSTHRU”…””}”(hj>hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj:ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jHŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-mode-excl-follower-passthru”uh1hhŸhåh KhhùubhŒ (0x3 << 4) #define ”…””}”hhùsbh)”}”(hŒ2:ref:`CEC_MODE_MONITOR_PIN `”h]”j)”}”(hj`h]”hŒCEC_MODE_MONITOR_PIN”…””}”(hjbhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj^ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jlŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-mode-monitor-pin”uh1hhŸhåh KhhùubhŒ$ (0xd << 4) #define ”…””}”hhùsbh)”}”(hŒ*:ref:`CEC_MODE_MONITOR `”h]”j)”}”(hj„h]”hŒCEC_MODE_MONITOR”…””}”(hj†hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj‚ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-mode-monitor”uh1hhŸhåh KhhùubhŒ( (0xe << 4) #define ”…””}”hhùsbh)”}”(hŒ2:ref:`CEC_MODE_MONITOR_ALL `”h]”j)”}”(hj¨h]”hŒCEC_MODE_MONITOR_ALL”…””}”(hjªhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj¦ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j´Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-mode-monitor-all”uh1hhŸhåh KhhùubhŒ (0xf << 4) #define CEC_MODE_FOLLOWER_MSK 0xf0 /* Userspace has to configure the physical address */ #define ”…””}”hhùsbh)”}”(hŒ,:ref:`CEC_CAP_PHYS_ADDR `”h]”j)”}”(hjÌh]”hŒCEC_CAP_PHYS_ADDR”…””}”(hjÎhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÊubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jØŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-cap-phys-addr”uh1hhŸhåh KhhùubhŒX (1 << 0) /* Userspace has to configure the logical addresses */ #define ”…””}”hhùsbh)”}”(hŒ,:ref:`CEC_CAP_LOG_ADDRS `”h]”j)”}”(hjðh]”hŒCEC_CAP_LOG_ADDRS”…””}”(hjòhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjîubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jüŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-cap-log-addrs”uh1hhŸhåh KhhùubhŒj (1 << 1) /* Userspace can transmit messages (and thus become follower as well) */ #define ”…””}”hhùsbh)”}”(hŒ*:ref:`CEC_CAP_TRANSMIT `”h]”j)”}”(hjh]”hŒCEC_CAP_TRANSMIT”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-cap-transmit”uh1hhŸhåh KhhùubhŒb (1 << 2) /* * Passthrough all messages instead of processing them. */ #define ”…””}”hhùsbh)”}”(hŒ0:ref:`CEC_CAP_PASSTHROUGH `”h]”j)”}”(hj8h]”hŒCEC_CAP_PASSTHROUGH”…””}”(hj:hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj6ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jDŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-cap-passthrough”uh1hhŸhåh KhhùubhŒ= (1 << 3) /* Supports remote control */ #define ”…””}”hhùsbh)”}”(hŒ:ref:`CEC_CAP_RC `”h]”j)”}”(hj\h]”hŒ CEC_CAP_RC”…””}”(hj^hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjZubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jhŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œ cec-cap-rc”uh1hhŸhåh KhhùubhŒr (1 << 4) /* Hardware can monitor all messages, not just directed and broadcast. */ #define ”…””}”hhùsbh)”}”(hŒ0:ref:`CEC_CAP_MONITOR_ALL `”h]”j)”}”(hj€h]”hŒCEC_CAP_MONITOR_ALL”…””}”(hj‚hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj~ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-cap-monitor-all”uh1hhŸhåh KhhùubhŒ\ (1 << 5) /* Hardware can use CEC only if the HDMI HPD pin is high. */ #define ”…””}”hhùsbh)”}”(hŒ,:ref:`CEC_CAP_NEEDS_HPD `”h]”j)”}”(hj¤h]”hŒCEC_CAP_NEEDS_HPD”…””}”(hj¦hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj¢ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j°Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-cap-needs-hpd”uh1hhŸhåh KhhùubhŒP (1 << 6) /* Hardware can monitor CEC pin transitions */ #define ”…””}”hhùsbh)”}”(hŒ0:ref:`CEC_CAP_MONITOR_PIN `”h]”j)”}”(hjÈh]”hŒCEC_CAP_MONITOR_PIN”…””}”(hjÊhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÆubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jÔŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-cap-monitor-pin”uh1hhŸhåh KhhùubhŒ (1 << 7) /* ”…””}”hhùsbh)”}”(hŒ<:ref:`CEC_ADAP_G_CONNECTOR_INFO `”h]”j)”}”(hjìh]”hŒCEC_ADAP_G_CONNECTOR_INFO”…””}”(hjîhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjêubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jøŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec_adap_g_connector_info”uh1hhŸhåh KhhùubhŒ is available */ #define ”…””}”hhùsbh)”}”(hŒ6:ref:`CEC_CAP_CONNECTOR_INFO `”h]”j)”}”(hjh]”hŒCEC_CAP_CONNECTOR_INFO”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-cap-connector-info”uh1hhŸhåh KhhùubhŒ (1 << 8) /* ”…””}”hhùsbh)”}”(hŒ>:ref:`CEC_MSG_FL_REPLY_VENDOR_ID `”h]”j)”}”(hj4h]”hŒCEC_MSG_FL_REPLY_VENDOR_ID”…””}”(hj6hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj2ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j@Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-msg-fl-reply-vendor-id”uh1hhŸhåh KhhùubhŒ is available */ #define ”…””}”hhùsbh)”}”(hŒ8:ref:`CEC_CAP_REPLY_VENDOR_ID `”h]”j)”}”(hjXh]”hŒCEC_CAP_REPLY_VENDOR_ID”…””}”(hjZhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjVubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jdŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-cap-reply-vendor-id”uh1hhŸhåh KhhùubhXÚ (1 << 9) /** * struct cec_caps - CEC capabilities structure. * @driver: name of the CEC device driver. * @name: name of the CEC device. @driver + @name must be unique. * @available_log_addrs: number of available logical addresses. * @capabilities: capabilities of the CEC adapter. * @version: version of the CEC adapter framework. */ struct cec_caps { char driver[32]; char name[32]; __u32 available_log_addrs; __u32 capabilities; __u32 version; }; /** * struct cec_log_addrs - CEC logical addresses structure. * @log_addr: the claimed logical addresses. Set by the driver. * @log_addr_mask: current logical address mask. Set by the driver. * @cec_version: the CEC version that the adapter should implement. Set by the * caller. * @num_log_addrs: how many logical addresses should be claimed. Set by the * caller. * @vendor_id: the vendor ID of the device. Set by the caller. * @flags: flags. * @osd_name: the OSD name of the device. Set by the caller. * @primary_device_type: the primary device type for each logical address. * Set by the caller. * @log_addr_type: the logical address types. Set by the caller. * @all_device_types: CEC 2.0: all device types represented by the logical * address. Set by the caller. * @features: CEC 2.0: The logical address features. Set by the caller. */ struct cec_log_addrs { __u8 log_addr[CEC_MAX_LOG_ADDRS]; __u16 log_addr_mask; __u8 cec_version; __u8 num_log_addrs; __u32 vendor_id; __u32 flags; char osd_name[15]; __u8 primary_device_type[CEC_MAX_LOG_ADDRS]; __u8 log_addr_type[CEC_MAX_LOG_ADDRS]; /* CEC 2.0 */ __u8 all_device_types[CEC_MAX_LOG_ADDRS]; __u8 features[CEC_MAX_LOG_ADDRS][12]; }; /* Allow a fallback to unregistered */ #define ”…””}”hhùsbh)”}”(hŒT:ref:`CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK `”h]”j)”}”(hj|h]”hŒ%CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK”…””}”(hj~hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjzubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jˆŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œ%cec-log-addrs-fl-allow-unreg-fallback”uh1hhŸhåh KhhùubhŒR (1 << 0) /* Passthrough RC messages to the input subsystem */ #define ”…””}”hhùsbh)”}”(hŒN:ref:`CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU `”h]”j)”}”(hj h]”hŒ"CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU”…””}”(hj¢hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjžubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j¬Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œ"cec-log-addrs-fl-allow-rc-passthru”uh1hhŸhåh KhhùubhŒS (1 << 1) /* CDC-Only device: supports only CDC messages */ #define ”…””}”hhùsbh)”}”(hŒ<:ref:`CEC_LOG_ADDRS_FL_CDC_ONLY `”h]”j)”}”(hjÄh]”hŒCEC_LOG_ADDRS_FL_CDC_ONLY”…””}”(hjÆhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÂubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jÐŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-log-addrs-fl-cdc-only”uh1hhŸhåh KhhùubhX> (1 << 2) /** * struct cec_drm_connector_info - tells which drm connector is * associated with the CEC adapter. * @card_no: drm card number * @connector_id: drm connector ID */ struct cec_drm_connector_info { __u32 card_no; __u32 connector_id; }; #define ”…””}”hhùsbh)”}”(hŒH:ref:`CEC_CONNECTOR_TYPE_NO_CONNECTOR `”h]”j)”}”(hjèh]”hŒCEC_CONNECTOR_TYPE_NO_CONNECTOR”…””}”(hjêhžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjæubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jôŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-connector-type-no-connector”uh1hhŸhåh KhhùubhŒ 0 #define ”…””}”hhùsbh)”}”(hŒ6:ref:`CEC_CONNECTOR_TYPE_DRM `”h]”j)”}”(hj h]”hŒCEC_CONNECTOR_TYPE_DRM”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-connector-type-drm”uh1hhŸhåh KhhùubhXä 1 /** * struct cec_connector_info - tells if and which connector is * associated with the CEC adapter. * @type: connector type (if any) * @drm: drm connector info * @raw: array to pad the union */ struct cec_connector_info { __u32 type; union { struct cec_drm_connector_info drm; __u32 raw[16]; }; }; /* Events */ /* Event that occurs when the adapter state changes */ #define ”…””}”hhùsbh)”}”(hŒ6:ref:`CEC_EVENT_STATE_CHANGE `”h]”j)”}”(hj0 h]”hŒCEC_EVENT_STATE_CHANGE”…””}”(hj2 hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj. ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j< Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-event-state-change”uh1hhŸhåh KhhùubhŒ“ 1 /* * This event is sent when messages are lost because the application * didn't empty the message queue in time */ #define ”…””}”hhùsbh)”}”(hŒ0:ref:`CEC_EVENT_LOST_MSGS `”h]”j)”}”(hjT h]”hŒCEC_EVENT_LOST_MSGS”…””}”(hjV hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjR ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j` Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-event-lost-msgs”uh1hhŸhåh KhhùubhŒ 2 #define ”…””}”hhùsbh)”}”(hŒ4:ref:`CEC_EVENT_PIN_CEC_LOW `”h]”j)”}”(hjx h]”hŒCEC_EVENT_PIN_CEC_LOW”…””}”(hjz hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjv ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j„ Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-event-pin-cec-low”uh1hhŸhåh KhhùubhŒ 3 #define ”…””}”hhùsbh)”}”(hŒ6:ref:`CEC_EVENT_PIN_CEC_HIGH `”h]”j)”}”(hjœ h]”hŒCEC_EVENT_PIN_CEC_HIGH”…””}”(hjž hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjš ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j¨ Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-event-pin-cec-high”uh1hhŸhåh KhhùubhŒ 4 #define ”…””}”hhùsbh)”}”(hŒ4:ref:`CEC_EVENT_PIN_HPD_LOW `”h]”j)”}”(hjÀ h]”hŒCEC_EVENT_PIN_HPD_LOW”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj¾ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jÌ Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-event-pin-hpd-low”uh1hhŸhåh KhhùubhŒ 5 #define ”…””}”hhùsbh)”}”(hŒ6:ref:`CEC_EVENT_PIN_HPD_HIGH `”h]”j)”}”(hjä h]”hŒCEC_EVENT_PIN_HPD_HIGH”…””}”(hjæ hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjâ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jð Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-event-pin-hpd-high”uh1hhŸhåh KhhùubhŒ 6 #define ”…””}”hhùsbh)”}”(hŒ2:ref:`CEC_EVENT_PIN_5V_LOW `”h]”j)”}”(hj h]”hŒCEC_EVENT_PIN_5V_LOW”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-event-pin-5v-low”uh1hhŸhåh KhhùubhŒ 7 #define ”…””}”hhùsbh)”}”(hŒ4:ref:`CEC_EVENT_PIN_5V_HIGH `”h]”j)”}”(hj, h]”hŒCEC_EVENT_PIN_5V_HIGH”…””}”(hj. hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj* ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j8 Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-event-pin-5v-high”uh1hhŸhåh KhhùubhŒ 8 #define ”…””}”hhùsbh)”}”(hŒ>:ref:`CEC_EVENT_FL_INITIAL_STATE `”h]”j)”}”(hjP h]”hŒCEC_EVENT_FL_INITIAL_STATE”…””}”(hjR hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjN ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j\ Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-event-fl-initial-state”uh1hhŸhåh KhhùubhŒ (1 << 0) #define ”…””}”hhùsbh)”}”(hŒ@:ref:`CEC_EVENT_FL_DROPPED_EVENTS `”h]”j)”}”(hjt h]”hŒCEC_EVENT_FL_DROPPED_EVENTS”…””}”(hjv hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjr ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j€ Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-event-fl-dropped-events”uh1hhŸhåh KhhùubhXF (1 << 1) /** * struct cec_event_state_change - used when the CEC adapter changes state. * @phys_addr: the current physical address * @log_addr_mask: the current logical address mask * @have_conn_info: if non-zero, then HDMI connector information is available. * This field is only valid if ”…””}”hhùsbh)”}”(hŒ6:ref:`CEC_CAP_CONNECTOR_INFO `”h]”j)”}”(hj˜ h]”hŒCEC_CAP_CONNECTOR_INFO”…””}”(hjš hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj– ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j¤ Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-cap-connector-info”uh1hhŸhåh KhhùubhXó is set. If that * capability is set and @have_conn_info is zero, then that indicates * that the HDMI connector device is not instantiated, either because * the HDMI driver is still configuring the device or because the HDMI * device was unbound. */ struct cec_event_state_change { __u16 phys_addr; __u16 log_addr_mask; __u16 have_conn_info; }; /** * struct cec_event_lost_msgs - tells you how many messages were lost. * @lost_msgs: how many messages were lost. */ struct cec_event_lost_msgs { __u32 lost_msgs; }; /** * struct cec_event - CEC event structure * @ts: the timestamp of when the event was sent. * @event: the event. * @flags: event flags. * @state_change: the event payload for CEC_EVENT_STATE_CHANGE. * @lost_msgs: the event payload for CEC_EVENT_LOST_MSGS. * @raw: array to pad the union. */ struct cec_event { __u64 ts; __u32 event; __u32 flags; union { struct cec_event_state_change state_change; struct cec_event_lost_msgs lost_msgs; __u32 raw[16]; }; }; /* ioctls */ /* Adapter capabilities */ #define ”…””}”hhùsbh)”}”(hŒ(:ref:`CEC_ADAP_G_CAPS `”h]”j)”}”(hj¼ h]”hŒCEC_ADAP_G_CAPS”…””}”(hj¾ hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjº ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jÈ Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec_adap_g_caps”uh1hhŸhåh KhhùubhXÆ _IOWR('a', 0, struct cec_caps ) /* * phys_addr is either 0 (if this is the CEC root device) * or a valid physical address obtained from the sink's EDID * as read by this CEC device (if this is a source device) * or a physical address obtained and modified from a sink * EDID and used for a sink CEC device. * If nothing is connected, then phys_addr is 0xffff. * See HDMI 1.4b, section 8.7 (Physical Address). * * The ”…””}”hhùsbh)”}”(hŒ2:ref:`CEC_ADAP_S_PHYS_ADDR `”h]”j)”}”(hjà h]”hŒCEC_ADAP_S_PHYS_ADDR”…””}”(hjâ hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÞ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jì Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec_adap_s_phys_addr”uh1hhŸhåh KhhùubhŒP ioctl may not be available if that is handled * internally. */ #define ”…””}”hhùsbh)”}”(hŒ2:ref:`CEC_ADAP_G_PHYS_ADDR `”h]”j)”}”(hj h]”hŒCEC_ADAP_G_PHYS_ADDR”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec_adap_g_phys_addr”uh1hhŸhåh KhhùubhŒ' _IOR('a', 1, __u16) #define ”…””}”hhùsbh)”}”(hŒ2:ref:`CEC_ADAP_S_PHYS_ADDR `”h]”j)”}”(hj( h]”hŒCEC_ADAP_S_PHYS_ADDR”…””}”(hj* hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj& ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j4 Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec_adap_s_phys_addr”uh1hhŸhåh KhhùubhXF _IOW('a', 2, __u16) /* * Configure the CEC adapter. It sets the device type and which * logical types it will try to claim. It will return which * logical addresses it could actually claim. * An error is returned if the adapter is disabled or if there * is no physical address assigned. */ #define ”…””}”hhùsbh)”}”(hŒ2:ref:`CEC_ADAP_G_LOG_ADDRS `”h]”j)”}”(hjL h]”hŒCEC_ADAP_G_LOG_ADDRS”…””}”(hjN hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjJ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jX Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec_adap_g_log_addrs”uh1hhŸhåh KhhùubhŒ6 _IOR('a', 3, struct cec_log_addrs ) #define ”…””}”hhùsbh)”}”(hŒ2:ref:`CEC_ADAP_S_LOG_ADDRS `”h]”j)”}”(hjp h]”hŒCEC_ADAP_S_LOG_ADDRS”…””}”(hjr hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjn ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j| Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec_adap_s_log_addrs”uh1hhŸhåh KhhùubhŒb _IOWR('a', 4, struct cec_log_addrs ) /* Transmit/receive a CEC command */ #define ”…””}”hhùsbh)”}”(hŒ":ref:`CEC_TRANSMIT `”h]”j)”}”(hj” h]”hŒ CEC_TRANSMIT”…””}”(hj– hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj’ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j  Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œ cec_transmit”uh1hhŸhåh KhhùubhŒ9 _IOWR('a', 5, struct cec_msg ) #define ”…””}”hhùsbh)”}”(hŒ :ref:`CEC_RECEIVE `”h]”j)”}”(hj¸ h]”hŒ CEC_RECEIVE”…””}”(hjº hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj¶ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jÄ Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œ cec_receive”uh1hhŸhåh KhhùubhŒX _IOWR('a', 6, struct cec_msg ) /* Dequeue CEC events */ #define ”…””}”hhùsbh)”}”(hŒ :ref:`CEC_DQEVENT `”h]”j)”}”(hjÜ h]”hŒ CEC_DQEVENT”…””}”(hjÞ hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÚ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jè Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œ cec_dqevent”uh1hhŸhåh KhhùubhŒ‡ _IOWR('a', 7, struct cec_event ) /* * Get and set the message handling mode for this filehandle. */ #define ”…””}”hhùsbh)”}”(hŒ:ref:`CEC_G_MODE `”h]”j)”}”(hj h]”hŒ CEC_G_MODE”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjþ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œ cec_g_mode”uh1hhŸhåh KhhùubhŒ1 _IOR('a', 8, __u32) #define ”…””}”hhùsbh)”}”(hŒ:ref:`CEC_S_MODE `”h]”j)”}”(hj$ h]”hŒ CEC_S_MODE”…””}”(hj& hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj" ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j0 Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œ cec_s_mode”uh1hhŸhåh KhhùubhŒS _IOW('a', 9, __u32) /* Get the connector info */ #define ”…””}”hhùsbh)”}”(hŒ<:ref:`CEC_ADAP_G_CONNECTOR_INFO `”h]”j)”}”(hjH h]”hŒCEC_ADAP_G_CONNECTOR_INFO”…””}”(hjJ hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjF ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jT Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec_adap_g_connector_info”uh1hhŸhåh KhhùubhXe‰ _IOR('a', 10, struct cec_connector_info ) /* * The remainder of this header defines all CEC messages and operands. * The format matters since it the cec-ctl utility parses it to generate * code for implementing all these messages. * * Comments ending with 'Feature' group messages for each feature. * If messages are part of multiple features, then the "Has also" * comment is used to list the previously defined messages that are * supported by the feature. * * Before operands are defined a comment is added that gives the * name of the operand and in brackets the variable name of the * corresponding argument in the cec-funcs.h function. */ /* Messages */ /* One Touch Play Feature */ #define CEC_MSG_ACTIVE_SOURCE 0x82 #define CEC_MSG_IMAGE_VIEW_ON 0x04 #define CEC_MSG_TEXT_VIEW_ON 0x0d /* Routing Control Feature */ /* * Has also: * CEC_MSG_ACTIVE_SOURCE */ #define CEC_MSG_INACTIVE_SOURCE 0x9d #define CEC_MSG_REQUEST_ACTIVE_SOURCE 0x85 #define CEC_MSG_ROUTING_CHANGE 0x80 #define CEC_MSG_ROUTING_INFORMATION 0x81 #define CEC_MSG_SET_STREAM_PATH 0x86 /* Standby Feature */ #define CEC_MSG_STANDBY 0x36 /* One Touch Record Feature */ #define CEC_MSG_RECORD_OFF 0x0b #define CEC_MSG_RECORD_ON 0x09 /* Record Source Type Operand (rec_src_type) */ #define CEC_OP_RECORD_SRC_OWN 1 #define CEC_OP_RECORD_SRC_DIGITAL 2 #define CEC_OP_RECORD_SRC_ANALOG 3 #define CEC_OP_RECORD_SRC_EXT_PLUG 4 #define CEC_OP_RECORD_SRC_EXT_PHYS_ADDR 5 /* Service Identification Method Operand (service_id_method) */ #define CEC_OP_SERVICE_ID_METHOD_BY_DIG_ID 0 #define CEC_OP_SERVICE_ID_METHOD_BY_CHANNEL 1 /* Digital Service Broadcast System Operand (dig_bcast_system) */ #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ARIB_GEN 0x00 #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ATSC_GEN 0x01 #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_DVB_GEN 0x02 #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ARIB_BS 0x08 #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ARIB_CS 0x09 #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ARIB_T 0x0a #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ATSC_CABLE 0x10 #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ATSC_SAT 0x11 #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ATSC_T 0x12 #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_DVB_C 0x18 #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_DVB_S 0x19 #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_DVB_S2 0x1a #define CEC_OP_DIG_SERVICE_BCAST_SYSTEM_DVB_T 0x1b /* Analogue Broadcast Type Operand (ana_bcast_type) */ #define CEC_OP_ANA_BCAST_TYPE_CABLE 0 #define CEC_OP_ANA_BCAST_TYPE_SATELLITE 1 #define CEC_OP_ANA_BCAST_TYPE_TERRESTRIAL 2 /* Broadcast System Operand (bcast_system) */ #define CEC_OP_BCAST_SYSTEM_PAL_BG 0x00 #define CEC_OP_BCAST_SYSTEM_SECAM_LQ 0x01 /* SECAM L' */ #define CEC_OP_BCAST_SYSTEM_PAL_M 0x02 #define CEC_OP_BCAST_SYSTEM_NTSC_M 0x03 #define CEC_OP_BCAST_SYSTEM_PAL_I 0x04 #define CEC_OP_BCAST_SYSTEM_SECAM_DK 0x05 #define CEC_OP_BCAST_SYSTEM_SECAM_BG 0x06 #define CEC_OP_BCAST_SYSTEM_SECAM_L 0x07 #define CEC_OP_BCAST_SYSTEM_PAL_DK 0x08 #define CEC_OP_BCAST_SYSTEM_OTHER 0x1f /* Channel Number Format Operand (channel_number_fmt) */ #define CEC_OP_CHANNEL_NUMBER_FMT_1_PART 0x01 #define CEC_OP_CHANNEL_NUMBER_FMT_2_PART 0x02 #define CEC_MSG_RECORD_STATUS 0x0a /* Record Status Operand (rec_status) */ #define CEC_OP_RECORD_STATUS_CUR_SRC 0x01 #define CEC_OP_RECORD_STATUS_DIG_SERVICE 0x02 #define CEC_OP_RECORD_STATUS_ANA_SERVICE 0x03 #define CEC_OP_RECORD_STATUS_EXT_INPUT 0x04 #define CEC_OP_RECORD_STATUS_NO_DIG_SERVICE 0x05 #define CEC_OP_RECORD_STATUS_NO_ANA_SERVICE 0x06 #define CEC_OP_RECORD_STATUS_NO_SERVICE 0x07 #define CEC_OP_RECORD_STATUS_INVALID_EXT_PLUG 0x09 #define CEC_OP_RECORD_STATUS_INVALID_EXT_PHYS_ADDR 0x0a #define CEC_OP_RECORD_STATUS_UNSUP_CA 0x0b #define CEC_OP_RECORD_STATUS_NO_CA_ENTITLEMENTS 0x0c #define CEC_OP_RECORD_STATUS_CANT_COPY_SRC 0x0d #define CEC_OP_RECORD_STATUS_NO_MORE_COPIES 0x0e #define CEC_OP_RECORD_STATUS_NO_MEDIA 0x10 #define CEC_OP_RECORD_STATUS_PLAYING 0x11 #define CEC_OP_RECORD_STATUS_ALREADY_RECORDING 0x12 #define CEC_OP_RECORD_STATUS_MEDIA_PROT 0x13 #define CEC_OP_RECORD_STATUS_NO_SIGNAL 0x14 #define CEC_OP_RECORD_STATUS_MEDIA_PROBLEM 0x15 #define CEC_OP_RECORD_STATUS_NO_SPACE 0x16 #define CEC_OP_RECORD_STATUS_PARENTAL_LOCK 0x17 #define CEC_OP_RECORD_STATUS_TERMINATED_OK 0x1a #define CEC_OP_RECORD_STATUS_ALREADY_TERM 0x1b #define CEC_OP_RECORD_STATUS_OTHER 0x1f #define CEC_MSG_RECORD_TV_SCREEN 0x0f /* Timer Programming Feature */ #define CEC_MSG_CLEAR_ANALOGUE_TIMER 0x33 /* Recording Sequence Operand (recording_seq) */ #define CEC_OP_REC_SEQ_SUNDAY 0x01 #define CEC_OP_REC_SEQ_MONDAY 0x02 #define CEC_OP_REC_SEQ_TUESDAY 0x04 #define CEC_OP_REC_SEQ_WEDNESDAY 0x08 #define CEC_OP_REC_SEQ_THURSDAY 0x10 #define CEC_OP_REC_SEQ_FRIDAY 0x20 #define CEC_OP_REC_SEQ_SATURDAY 0x40 #define CEC_OP_REC_SEQ_ONCE_ONLY 0x00 #define CEC_MSG_CLEAR_DIGITAL_TIMER 0x99 #define CEC_MSG_CLEAR_EXT_TIMER 0xa1 /* External Source Specifier Operand (ext_src_spec) */ #define CEC_OP_EXT_SRC_PLUG 0x04 #define CEC_OP_EXT_SRC_PHYS_ADDR 0x05 #define CEC_MSG_SET_ANALOGUE_TIMER 0x34 #define CEC_MSG_SET_DIGITAL_TIMER 0x97 #define CEC_MSG_SET_EXT_TIMER 0xa2 #define CEC_MSG_SET_TIMER_PROGRAM_TITLE 0x67 #define CEC_MSG_TIMER_CLEARED_STATUS 0x43 /* Timer Cleared Status Data Operand (timer_cleared_status) */ #define CEC_OP_TIMER_CLR_STAT_RECORDING 0x00 #define CEC_OP_TIMER_CLR_STAT_NO_MATCHING 0x01 #define CEC_OP_TIMER_CLR_STAT_NO_INFO 0x02 #define CEC_OP_TIMER_CLR_STAT_CLEARED 0x80 #define CEC_MSG_TIMER_STATUS 0x35 /* Timer Overlap Warning Operand (timer_overlap_warning) */ #define CEC_OP_TIMER_OVERLAP_WARNING_NO_OVERLAP 0 #define CEC_OP_TIMER_OVERLAP_WARNING_OVERLAP 1 /* Media Info Operand (media_info) */ #define CEC_OP_MEDIA_INFO_UNPROT_MEDIA 0 #define CEC_OP_MEDIA_INFO_PROT_MEDIA 1 #define CEC_OP_MEDIA_INFO_NO_MEDIA 2 /* Programmed Indicator Operand (prog_indicator) */ #define CEC_OP_PROG_IND_NOT_PROGRAMMED 0 #define CEC_OP_PROG_IND_PROGRAMMED 1 /* Programmed Info Operand (prog_info) */ #define CEC_OP_PROG_INFO_ENOUGH_SPACE 0x08 #define CEC_OP_PROG_INFO_NOT_ENOUGH_SPACE 0x09 #define CEC_OP_PROG_INFO_MIGHT_NOT_BE_ENOUGH_SPACE 0x0b #define CEC_OP_PROG_INFO_NONE_AVAILABLE 0x0a /* Not Programmed Error Info Operand (prog_error) */ #define CEC_OP_PROG_ERROR_NO_FREE_TIMER 0x01 #define CEC_OP_PROG_ERROR_DATE_OUT_OF_RANGE 0x02 #define CEC_OP_PROG_ERROR_REC_SEQ_ERROR 0x03 #define CEC_OP_PROG_ERROR_INV_EXT_PLUG 0x04 #define CEC_OP_PROG_ERROR_INV_EXT_PHYS_ADDR 0x05 #define CEC_OP_PROG_ERROR_CA_UNSUPP 0x06 #define CEC_OP_PROG_ERROR_INSUF_CA_ENTITLEMENTS 0x07 #define CEC_OP_PROG_ERROR_RESOLUTION_UNSUPP 0x08 #define CEC_OP_PROG_ERROR_PARENTAL_LOCK 0x09 #define CEC_OP_PROG_ERROR_CLOCK_FAILURE 0x0a #define CEC_OP_PROG_ERROR_DUPLICATE 0x0e /* System Information Feature */ #define CEC_MSG_CEC_VERSION 0x9e /* CEC Version Operand (cec_version) */ #define CEC_OP_CEC_VERSION_1_3A 4 #define CEC_OP_CEC_VERSION_1_4 5 #define CEC_OP_CEC_VERSION_2_0 6 #define CEC_MSG_GET_CEC_VERSION 0x9f #define CEC_MSG_GIVE_PHYSICAL_ADDR 0x83 #define CEC_MSG_GET_MENU_LANGUAGE 0x91 #define CEC_MSG_REPORT_PHYSICAL_ADDR 0x84 /* Primary Device Type Operand (prim_devtype) */ #define CEC_OP_PRIM_DEVTYPE_TV 0 #define CEC_OP_PRIM_DEVTYPE_RECORD 1 #define CEC_OP_PRIM_DEVTYPE_TUNER 3 #define CEC_OP_PRIM_DEVTYPE_PLAYBACK 4 #define CEC_OP_PRIM_DEVTYPE_AUDIOSYSTEM 5 #define CEC_OP_PRIM_DEVTYPE_SWITCH 6 #define CEC_OP_PRIM_DEVTYPE_PROCESSOR 7 #define CEC_MSG_SET_MENU_LANGUAGE 0x32 #define CEC_MSG_REPORT_FEATURES 0xa6 /* HDMI 2.0 */ /* All Device Types Operand (all_device_types) */ #define CEC_OP_ALL_DEVTYPE_TV 0x80 #define CEC_OP_ALL_DEVTYPE_RECORD 0x40 #define CEC_OP_ALL_DEVTYPE_TUNER 0x20 #define CEC_OP_ALL_DEVTYPE_PLAYBACK 0x10 #define CEC_OP_ALL_DEVTYPE_AUDIOSYSTEM 0x08 #define CEC_OP_ALL_DEVTYPE_SWITCH 0x04 /* * And if you wondering what happened to PROCESSOR devices: those should * be mapped to a SWITCH. */ /* Valid for RC Profile and Device Feature operands */ #define CEC_OP_FEAT_EXT 0x80 /* Extension bit */ /* RC Profile Operand (rc_profile) */ #define CEC_OP_FEAT_RC_TV_PROFILE_NONE 0x00 #define CEC_OP_FEAT_RC_TV_PROFILE_1 0x02 #define CEC_OP_FEAT_RC_TV_PROFILE_2 0x06 #define CEC_OP_FEAT_RC_TV_PROFILE_3 0x0a #define CEC_OP_FEAT_RC_TV_PROFILE_4 0x0e #define CEC_OP_FEAT_RC_SRC_HAS_DEV_ROOT_MENU 0x50 #define CEC_OP_FEAT_RC_SRC_HAS_DEV_SETUP_MENU 0x48 #define CEC_OP_FEAT_RC_SRC_HAS_CONTENTS_MENU 0x44 #define CEC_OP_FEAT_RC_SRC_HAS_MEDIA_TOP_MENU 0x42 #define CEC_OP_FEAT_RC_SRC_HAS_MEDIA_CONTEXT_MENU 0x41 /* Device Feature Operand (dev_features) */ #define CEC_OP_FEAT_DEV_HAS_RECORD_TV_SCREEN 0x40 #define CEC_OP_FEAT_DEV_HAS_SET_OSD_STRING 0x20 #define CEC_OP_FEAT_DEV_HAS_DECK_CONTROL 0x10 #define CEC_OP_FEAT_DEV_HAS_SET_AUDIO_RATE 0x08 #define CEC_OP_FEAT_DEV_SINK_HAS_ARC_TX 0x04 #define CEC_OP_FEAT_DEV_SOURCE_HAS_ARC_RX 0x02 #define CEC_OP_FEAT_DEV_HAS_SET_AUDIO_VOLUME_LEVEL 0x01 #define CEC_MSG_GIVE_FEATURES 0xa5 /* HDMI 2.0 */ /* Deck Control Feature */ #define CEC_MSG_DECK_CONTROL 0x42 /* Deck Control Mode Operand (deck_control_mode) */ #define CEC_OP_DECK_CTL_MODE_SKIP_FWD 1 #define CEC_OP_DECK_CTL_MODE_SKIP_REV 2 #define CEC_OP_DECK_CTL_MODE_STOP 3 #define CEC_OP_DECK_CTL_MODE_EJECT 4 #define CEC_MSG_DECK_STATUS 0x1b /* Deck Info Operand (deck_info) */ #define CEC_OP_DECK_INFO_PLAY 0x11 #define CEC_OP_DECK_INFO_RECORD 0x12 #define CEC_OP_DECK_INFO_PLAY_REV 0x13 #define CEC_OP_DECK_INFO_STILL 0x14 #define CEC_OP_DECK_INFO_SLOW 0x15 #define CEC_OP_DECK_INFO_SLOW_REV 0x16 #define CEC_OP_DECK_INFO_FAST_FWD 0x17 #define CEC_OP_DECK_INFO_FAST_REV 0x18 #define CEC_OP_DECK_INFO_NO_MEDIA 0x19 #define CEC_OP_DECK_INFO_STOP 0x1a #define CEC_OP_DECK_INFO_SKIP_FWD 0x1b #define CEC_OP_DECK_INFO_SKIP_REV 0x1c #define CEC_OP_DECK_INFO_INDEX_SEARCH_FWD 0x1d #define CEC_OP_DECK_INFO_INDEX_SEARCH_REV 0x1e #define CEC_OP_DECK_INFO_OTHER 0x1f #define CEC_MSG_GIVE_DECK_STATUS 0x1a /* Status Request Operand (status_req) */ #define CEC_OP_STATUS_REQ_ON 1 #define CEC_OP_STATUS_REQ_OFF 2 #define CEC_OP_STATUS_REQ_ONCE 3 #define CEC_MSG_PLAY 0x41 /* Play Mode Operand (play_mode) */ #define CEC_OP_PLAY_MODE_PLAY_FWD 0x24 #define CEC_OP_PLAY_MODE_PLAY_REV 0x20 #define CEC_OP_PLAY_MODE_PLAY_STILL 0x25 #define CEC_OP_PLAY_MODE_PLAY_FAST_FWD_MIN 0x05 #define CEC_OP_PLAY_MODE_PLAY_FAST_FWD_MED 0x06 #define CEC_OP_PLAY_MODE_PLAY_FAST_FWD_MAX 0x07 #define CEC_OP_PLAY_MODE_PLAY_FAST_REV_MIN 0x09 #define CEC_OP_PLAY_MODE_PLAY_FAST_REV_MED 0x0a #define CEC_OP_PLAY_MODE_PLAY_FAST_REV_MAX 0x0b #define CEC_OP_PLAY_MODE_PLAY_SLOW_FWD_MIN 0x15 #define CEC_OP_PLAY_MODE_PLAY_SLOW_FWD_MED 0x16 #define CEC_OP_PLAY_MODE_PLAY_SLOW_FWD_MAX 0x17 #define CEC_OP_PLAY_MODE_PLAY_SLOW_REV_MIN 0x19 #define CEC_OP_PLAY_MODE_PLAY_SLOW_REV_MED 0x1a #define CEC_OP_PLAY_MODE_PLAY_SLOW_REV_MAX 0x1b /* Tuner Control Feature */ #define CEC_MSG_GIVE_TUNER_DEVICE_STATUS 0x08 #define CEC_MSG_SELECT_ANALOGUE_SERVICE 0x92 #define CEC_MSG_SELECT_DIGITAL_SERVICE 0x93 #define CEC_MSG_TUNER_DEVICE_STATUS 0x07 /* Recording Flag Operand (rec_flag) */ #define CEC_OP_REC_FLAG_NOT_USED 0 #define CEC_OP_REC_FLAG_USED 1 /* Tuner Display Info Operand (tuner_display_info) */ #define CEC_OP_TUNER_DISPLAY_INFO_DIGITAL 0 #define CEC_OP_TUNER_DISPLAY_INFO_NONE 1 #define CEC_OP_TUNER_DISPLAY_INFO_ANALOGUE 2 #define CEC_MSG_TUNER_STEP_DECREMENT 0x06 #define CEC_MSG_TUNER_STEP_INCREMENT 0x05 /* Vendor Specific Commands Feature */ /* * Has also: * CEC_MSG_CEC_VERSION * CEC_MSG_GET_CEC_VERSION */ #define CEC_MSG_DEVICE_VENDOR_ID 0x87 #define CEC_MSG_GIVE_DEVICE_VENDOR_ID 0x8c #define CEC_MSG_VENDOR_COMMAND 0x89 #define CEC_MSG_VENDOR_COMMAND_WITH_ID 0xa0 #define CEC_MSG_VENDOR_REMOTE_BUTTON_DOWN 0x8a #define CEC_MSG_VENDOR_REMOTE_BUTTON_UP 0x8b /* OSD Display Feature */ #define CEC_MSG_SET_OSD_STRING 0x64 /* Display Control Operand (disp_ctl) */ #define CEC_OP_DISP_CTL_DEFAULT 0x00 #define CEC_OP_DISP_CTL_UNTIL_CLEARED 0x40 #define CEC_OP_DISP_CTL_CLEAR 0x80 /* Device OSD Transfer Feature */ #define CEC_MSG_GIVE_OSD_NAME 0x46 #define CEC_MSG_SET_OSD_NAME 0x47 /* Device Menu Control Feature */ #define CEC_MSG_MENU_REQUEST 0x8d /* Menu Request Type Operand (menu_req) */ #define CEC_OP_MENU_REQUEST_ACTIVATE 0x00 #define CEC_OP_MENU_REQUEST_DEACTIVATE 0x01 #define CEC_OP_MENU_REQUEST_QUERY 0x02 #define CEC_MSG_MENU_STATUS 0x8e /* Menu State Operand (menu_state) */ #define CEC_OP_MENU_STATE_ACTIVATED 0x00 #define CEC_OP_MENU_STATE_DEACTIVATED 0x01 #define CEC_MSG_USER_CONTROL_PRESSED 0x44 /* UI Command Operand (ui_cmd) */ #define CEC_OP_UI_CMD_SELECT 0x00 #define CEC_OP_UI_CMD_UP 0x01 #define CEC_OP_UI_CMD_DOWN 0x02 #define CEC_OP_UI_CMD_LEFT 0x03 #define CEC_OP_UI_CMD_RIGHT 0x04 #define CEC_OP_UI_CMD_RIGHT_UP 0x05 #define CEC_OP_UI_CMD_RIGHT_DOWN 0x06 #define CEC_OP_UI_CMD_LEFT_UP 0x07 #define CEC_OP_UI_CMD_LEFT_DOWN 0x08 #define CEC_OP_UI_CMD_DEVICE_ROOT_MENU 0x09 #define CEC_OP_UI_CMD_DEVICE_SETUP_MENU 0x0a #define CEC_OP_UI_CMD_CONTENTS_MENU 0x0b #define CEC_OP_UI_CMD_FAVORITE_MENU 0x0c #define CEC_OP_UI_CMD_BACK 0x0d #define CEC_OP_UI_CMD_MEDIA_TOP_MENU 0x10 #define CEC_OP_UI_CMD_MEDIA_CONTEXT_SENSITIVE_MENU 0x11 #define CEC_OP_UI_CMD_NUMBER_ENTRY_MODE 0x1d #define CEC_OP_UI_CMD_NUMBER_11 0x1e #define CEC_OP_UI_CMD_NUMBER_12 0x1f #define CEC_OP_UI_CMD_NUMBER_0_OR_NUMBER_10 0x20 #define CEC_OP_UI_CMD_NUMBER_1 0x21 #define CEC_OP_UI_CMD_NUMBER_2 0x22 #define CEC_OP_UI_CMD_NUMBER_3 0x23 #define CEC_OP_UI_CMD_NUMBER_4 0x24 #define CEC_OP_UI_CMD_NUMBER_5 0x25 #define CEC_OP_UI_CMD_NUMBER_6 0x26 #define CEC_OP_UI_CMD_NUMBER_7 0x27 #define CEC_OP_UI_CMD_NUMBER_8 0x28 #define CEC_OP_UI_CMD_NUMBER_9 0x29 #define CEC_OP_UI_CMD_DOT 0x2a #define CEC_OP_UI_CMD_ENTER 0x2b #define CEC_OP_UI_CMD_CLEAR 0x2c #define CEC_OP_UI_CMD_NEXT_FAVORITE 0x2f #define CEC_OP_UI_CMD_CHANNEL_UP 0x30 #define CEC_OP_UI_CMD_CHANNEL_DOWN 0x31 #define CEC_OP_UI_CMD_PREVIOUS_CHANNEL 0x32 #define CEC_OP_UI_CMD_SOUND_SELECT 0x33 #define CEC_OP_UI_CMD_INPUT_SELECT 0x34 #define CEC_OP_UI_CMD_DISPLAY_INFORMATION 0x35 #define CEC_OP_UI_CMD_HELP 0x36 #define CEC_OP_UI_CMD_PAGE_UP 0x37 #define CEC_OP_UI_CMD_PAGE_DOWN 0x38 #define CEC_OP_UI_CMD_POWER 0x40 #define CEC_OP_UI_CMD_VOLUME_UP 0x41 #define CEC_OP_UI_CMD_VOLUME_DOWN 0x42 #define CEC_OP_UI_CMD_MUTE 0x43 #define CEC_OP_UI_CMD_PLAY 0x44 #define CEC_OP_UI_CMD_STOP 0x45 #define CEC_OP_UI_CMD_PAUSE 0x46 #define CEC_OP_UI_CMD_RECORD 0x47 #define CEC_OP_UI_CMD_REWIND 0x48 #define CEC_OP_UI_CMD_FAST_FORWARD 0x49 #define CEC_OP_UI_CMD_EJECT 0x4a #define CEC_OP_UI_CMD_SKIP_FORWARD 0x4b #define CEC_OP_UI_CMD_SKIP_BACKWARD 0x4c #define CEC_OP_UI_CMD_STOP_RECORD 0x4d #define CEC_OP_UI_CMD_PAUSE_RECORD 0x4e #define CEC_OP_UI_CMD_ANGLE 0x50 #define CEC_OP_UI_CMD_SUB_PICTURE 0x51 #define CEC_OP_UI_CMD_VIDEO_ON_DEMAND 0x52 #define CEC_OP_UI_CMD_ELECTRONIC_PROGRAM_GUIDE 0x53 #define CEC_OP_UI_CMD_TIMER_PROGRAMMING 0x54 #define CEC_OP_UI_CMD_INITIAL_CONFIGURATION 0x55 #define CEC_OP_UI_CMD_SELECT_BROADCAST_TYPE 0x56 #define CEC_OP_UI_CMD_SELECT_SOUND_PRESENTATION 0x57 #define CEC_OP_UI_CMD_AUDIO_DESCRIPTION 0x58 #define CEC_OP_UI_CMD_INTERNET 0x59 #define CEC_OP_UI_CMD_3D_MODE 0x5a #define CEC_OP_UI_CMD_PLAY_FUNCTION 0x60 #define CEC_OP_UI_CMD_PAUSE_PLAY_FUNCTION 0x61 #define CEC_OP_UI_CMD_RECORD_FUNCTION 0x62 #define CEC_OP_UI_CMD_PAUSE_RECORD_FUNCTION 0x63 #define CEC_OP_UI_CMD_STOP_FUNCTION 0x64 #define CEC_OP_UI_CMD_MUTE_FUNCTION 0x65 #define CEC_OP_UI_CMD_RESTORE_VOLUME_FUNCTION 0x66 #define CEC_OP_UI_CMD_TUNE_FUNCTION 0x67 #define CEC_OP_UI_CMD_SELECT_MEDIA_FUNCTION 0x68 #define CEC_OP_UI_CMD_SELECT_AV_INPUT_FUNCTION 0x69 #define CEC_OP_UI_CMD_SELECT_AUDIO_INPUT_FUNCTION 0x6a #define CEC_OP_UI_CMD_POWER_TOGGLE_FUNCTION 0x6b #define CEC_OP_UI_CMD_POWER_OFF_FUNCTION 0x6c #define CEC_OP_UI_CMD_POWER_ON_FUNCTION 0x6d #define CEC_OP_UI_CMD_F1_BLUE 0x71 #define CEC_OP_UI_CMD_F2_RED 0x72 #define CEC_OP_UI_CMD_F3_GREEN 0x73 #define CEC_OP_UI_CMD_F4_YELLOW 0x74 #define CEC_OP_UI_CMD_F5 0x75 #define CEC_OP_UI_CMD_DATA 0x76 /* UI Broadcast Type Operand (ui_bcast_type) */ #define CEC_OP_UI_BCAST_TYPE_TOGGLE_ALL 0x00 #define CEC_OP_UI_BCAST_TYPE_TOGGLE_DIG_ANA 0x01 #define CEC_OP_UI_BCAST_TYPE_ANALOGUE 0x10 #define CEC_OP_UI_BCAST_TYPE_ANALOGUE_T 0x20 #define CEC_OP_UI_BCAST_TYPE_ANALOGUE_CABLE 0x30 #define CEC_OP_UI_BCAST_TYPE_ANALOGUE_SAT 0x40 #define CEC_OP_UI_BCAST_TYPE_DIGITAL 0x50 #define CEC_OP_UI_BCAST_TYPE_DIGITAL_T 0x60 #define CEC_OP_UI_BCAST_TYPE_DIGITAL_CABLE 0x70 #define CEC_OP_UI_BCAST_TYPE_DIGITAL_SAT 0x80 #define CEC_OP_UI_BCAST_TYPE_DIGITAL_COM_SAT 0x90 #define CEC_OP_UI_BCAST_TYPE_DIGITAL_COM_SAT2 0x91 #define CEC_OP_UI_BCAST_TYPE_IP 0xa0 /* UI Sound Presentation Control Operand (ui_snd_pres_ctl) */ #define CEC_OP_UI_SND_PRES_CTL_DUAL_MONO 0x10 #define CEC_OP_UI_SND_PRES_CTL_KARAOKE 0x20 #define CEC_OP_UI_SND_PRES_CTL_DOWNMIX 0x80 #define CEC_OP_UI_SND_PRES_CTL_REVERB 0x90 #define CEC_OP_UI_SND_PRES_CTL_EQUALIZER 0xa0 #define CEC_OP_UI_SND_PRES_CTL_BASS_UP 0xb1 #define CEC_OP_UI_SND_PRES_CTL_BASS_NEUTRAL 0xb2 #define CEC_OP_UI_SND_PRES_CTL_BASS_DOWN 0xb3 #define CEC_OP_UI_SND_PRES_CTL_TREBLE_UP 0xc1 #define CEC_OP_UI_SND_PRES_CTL_TREBLE_NEUTRAL 0xc2 #define CEC_OP_UI_SND_PRES_CTL_TREBLE_DOWN 0xc3 #define CEC_MSG_USER_CONTROL_RELEASED 0x45 /* Remote Control Passthrough Feature */ /* * Has also: * CEC_MSG_USER_CONTROL_PRESSED * CEC_MSG_USER_CONTROL_RELEASED */ /* Power Status Feature */ #define CEC_MSG_GIVE_DEVICE_POWER_STATUS 0x8f #define CEC_MSG_REPORT_POWER_STATUS 0x90 /* Power Status Operand (pwr_state) */ #define CEC_OP_POWER_STATUS_ON 0 #define CEC_OP_POWER_STATUS_STANDBY 1 #define CEC_OP_POWER_STATUS_TO_ON 2 #define CEC_OP_POWER_STATUS_TO_STANDBY 3 /* General Protocol Messages */ #define CEC_MSG_FEATURE_ABORT 0x00 /* Abort Reason Operand (reason) */ #define CEC_OP_ABORT_UNRECOGNIZED_OP 0 #define CEC_OP_ABORT_INCORRECT_MODE 1 #define CEC_OP_ABORT_NO_SOURCE 2 #define CEC_OP_ABORT_INVALID_OP 3 #define CEC_OP_ABORT_REFUSED 4 #define CEC_OP_ABORT_UNDETERMINED 5 #define CEC_MSG_ABORT 0xff /* System Audio Control Feature */ /* * Has also: * CEC_MSG_USER_CONTROL_PRESSED * CEC_MSG_USER_CONTROL_RELEASED */ #define CEC_MSG_GIVE_AUDIO_STATUS 0x71 #define CEC_MSG_GIVE_SYSTEM_AUDIO_MODE_STATUS 0x7d #define CEC_MSG_REPORT_AUDIO_STATUS 0x7a /* Audio Mute Status Operand (aud_mute_status) */ #define CEC_OP_AUD_MUTE_STATUS_OFF 0 #define CEC_OP_AUD_MUTE_STATUS_ON 1 #define CEC_MSG_REPORT_SHORT_AUDIO_DESCRIPTOR 0xa3 #define CEC_MSG_REQUEST_SHORT_AUDIO_DESCRIPTOR 0xa4 #define CEC_MSG_SET_SYSTEM_AUDIO_MODE 0x72 /* System Audio Status Operand (sys_aud_status) */ #define CEC_OP_SYS_AUD_STATUS_OFF 0 #define CEC_OP_SYS_AUD_STATUS_ON 1 #define CEC_MSG_SYSTEM_AUDIO_MODE_REQUEST 0x70 #define CEC_MSG_SYSTEM_AUDIO_MODE_STATUS 0x7e /* Audio Format ID Operand (audio_format_id) */ #define CEC_OP_AUD_FMT_ID_CEA861 0 #define CEC_OP_AUD_FMT_ID_CEA861_CXT 1 #define CEC_MSG_SET_AUDIO_VOLUME_LEVEL 0x73 /* Audio Rate Control Feature */ #define CEC_MSG_SET_AUDIO_RATE 0x9a /* Audio Rate Operand (audio_rate) */ #define CEC_OP_AUD_RATE_OFF 0 #define CEC_OP_AUD_RATE_WIDE_STD 1 #define CEC_OP_AUD_RATE_WIDE_FAST 2 #define CEC_OP_AUD_RATE_WIDE_SLOW 3 #define CEC_OP_AUD_RATE_NARROW_STD 4 #define CEC_OP_AUD_RATE_NARROW_FAST 5 #define CEC_OP_AUD_RATE_NARROW_SLOW 6 /* Audio Return Channel Control Feature */ #define CEC_MSG_INITIATE_ARC 0xc0 #define CEC_MSG_REPORT_ARC_INITIATED 0xc1 #define CEC_MSG_REPORT_ARC_TERMINATED 0xc2 #define CEC_MSG_REQUEST_ARC_INITIATION 0xc3 #define CEC_MSG_REQUEST_ARC_TERMINATION 0xc4 #define CEC_MSG_TERMINATE_ARC 0xc5 /* Dynamic Audio Lipsync Feature */ /* Only for CEC 2.0 and up */ #define CEC_MSG_REQUEST_CURRENT_LATENCY 0xa7 #define CEC_MSG_REPORT_CURRENT_LATENCY 0xa8 /* Low Latency Mode Operand (low_latency_mode) */ #define CEC_OP_LOW_LATENCY_MODE_OFF 0 #define CEC_OP_LOW_LATENCY_MODE_ON 1 /* Audio Output Compensated Operand (audio_out_compensated) */ #define CEC_OP_AUD_OUT_COMPENSATED_NA 0 #define CEC_OP_AUD_OUT_COMPENSATED_DELAY 1 #define CEC_OP_AUD_OUT_COMPENSATED_NO_DELAY 2 #define CEC_OP_AUD_OUT_COMPENSATED_PARTIAL_DELAY 3 /* Capability Discovery and Control Feature */ #define CEC_MSG_CDC_MESSAGE 0xf8 /* Ethernet-over-HDMI: nobody ever does this... */ #define CEC_MSG_CDC_HEC_INQUIRE_STATE 0x00 #define CEC_MSG_CDC_HEC_REPORT_STATE 0x01 /* HEC Functionality State Operand (hec_func_state) */ #define CEC_OP_HEC_FUNC_STATE_NOT_SUPPORTED 0 #define CEC_OP_HEC_FUNC_STATE_INACTIVE 1 #define CEC_OP_HEC_FUNC_STATE_ACTIVE 2 #define CEC_OP_HEC_FUNC_STATE_ACTIVATION_FIELD 3 /* Host Functionality State Operand (host_func_state) */ #define CEC_OP_HOST_FUNC_STATE_NOT_SUPPORTED 0 #define CEC_OP_HOST_FUNC_STATE_INACTIVE 1 #define CEC_OP_HOST_FUNC_STATE_ACTIVE 2 /* ENC Functionality State Operand (enc_func_state) */ #define CEC_OP_ENC_FUNC_STATE_EXT_CON_NOT_SUPPORTED 0 #define CEC_OP_ENC_FUNC_STATE_EXT_CON_INACTIVE 1 #define CEC_OP_ENC_FUNC_STATE_EXT_CON_ACTIVE 2 /* CDC Error Code Operand (cdc_errcode) */ #define CEC_OP_CDC_ERROR_CODE_NONE 0 #define CEC_OP_CDC_ERROR_CODE_CAP_UNSUPPORTED 1 #define CEC_OP_CDC_ERROR_CODE_WRONG_STATE 2 #define CEC_OP_CDC_ERROR_CODE_OTHER 3 /* HEC Support Operand (hec_support) */ #define CEC_OP_HEC_SUPPORT_NO 0 #define CEC_OP_HEC_SUPPORT_YES 1 /* HEC Activation Operand (hec_activation) */ #define CEC_OP_HEC_ACTIVATION_ON 0 #define CEC_OP_HEC_ACTIVATION_OFF 1 #define CEC_MSG_CDC_HEC_SET_STATE_ADJACENT 0x02 #define CEC_MSG_CDC_HEC_SET_STATE 0x03 /* HEC Set State Operand (hec_set_state) */ #define CEC_OP_HEC_SET_STATE_DEACTIVATE 0 #define CEC_OP_HEC_SET_STATE_ACTIVATE 1 #define CEC_MSG_CDC_HEC_REQUEST_DEACTIVATION 0x04 #define CEC_MSG_CDC_HEC_NOTIFY_ALIVE 0x05 #define CEC_MSG_CDC_HEC_DISCOVER 0x06 /* Hotplug Detect messages */ #define CEC_MSG_CDC_HPD_SET_STATE 0x10 /* HPD State Operand (hpd_state) */ #define CEC_OP_HPD_STATE_CP_EDID_DISABLE 0 #define CEC_OP_HPD_STATE_CP_EDID_ENABLE 1 #define CEC_OP_HPD_STATE_CP_EDID_DISABLE_ENABLE 2 #define CEC_OP_HPD_STATE_EDID_DISABLE 3 #define CEC_OP_HPD_STATE_EDID_ENABLE 4 #define CEC_OP_HPD_STATE_EDID_DISABLE_ENABLE 5 #define CEC_MSG_CDC_HPD_REPORT_STATE 0x11 /* HPD Error Code Operand (hpd_error) */ #define CEC_OP_HPD_ERROR_NONE 0 #define CEC_OP_HPD_ERROR_INITIATOR_NOT_CAPABLE 1 #define CEC_OP_HPD_ERROR_INITIATOR_WRONG_STATE 2 #define CEC_OP_HPD_ERROR_OTHER 3 #define CEC_OP_HPD_ERROR_NONE_NO_VIDEO 4 /* End of Messages */ /* Helper functions to identify the 'special' CEC devices */ static inline int cec_is_2nd_tv(const struct cec_log_addrs *las) { /* * It is a second TV if the logical address is 14 or 15 and the * primary device type is a TV. */ return las->num_log_addrs && las->log_addr[0] >= CEC_LOG_ADDR_SPECIFIC && las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_TV; } static inline int cec_is_processor(const struct cec_log_addrs *las) { /* * It is a processor if the logical address is 12-15 and the * primary device type is a Processor. */ return las->num_log_addrs && las->log_addr[0] >= CEC_LOG_ADDR_BACKUP_1 && las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_PROCESSOR; } static inline int cec_is_switch(const struct cec_log_addrs *las) { /* * It is a switch if the logical address is 15 and the * primary device type is a Switch and the CDC-Only flag is not set. */ return las->num_log_addrs == 1 && las->log_addr[0] == CEC_LOG_ADDR_UNREGISTERED && las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_SWITCH && !(las->flags & ”…””•r}”hhùsbh)”}”(hŒ<:ref:`CEC_LOG_ADDRS_FL_CDC_ONLY `”h]”j)”}”(hjl h]”hŒCEC_LOG_ADDRS_FL_CDC_ONLY”…””}”(hjn hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjj ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jx Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-log-addrs-fl-cdc-only”uh1hhŸhåh KhhùubhXí ); } static inline int cec_is_cdc_only(const struct cec_log_addrs *las) { /* * It is a CDC-only device if the logical address is 15 and the * primary device type is a Switch and the CDC-Only flag is set. */ return las->num_log_addrs == 1 && las->log_addr[0] == CEC_LOG_ADDR_UNREGISTERED && las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_SWITCH && (las->flags & ”…””}”hhùsbh)”}”(hŒ<:ref:`CEC_LOG_ADDRS_FL_CDC_ONLY `”h]”j)”}”(hj h]”hŒCEC_LOG_ADDRS_FL_CDC_ONLY”…””}”(hj’ hžhhŸNh Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjŽ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jœ Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œcec-log-addrs-fl-cdc-only”uh1hhŸhåh KhhùubhŒ ); } #endif”…””}”hhùsbeh}”(h]”h ]”h"]”h$]”h&]”h±h²uh1h÷h KhhæhžhhŸŒQinternal padding after /var/lib/git/docbuild/linux/Documentation/output/cec.h.rst”ubeh}”(h]”Œcec-h”ah ]”h"]”Œcec.h”ah$]”h&]”uh1hÂhhÄhžhhŸhåh Kubeh}”(h]”(Œcec-header-file”hÁeh ]”h"]”(Œcec header file”Œ cec_header”eh$]”h&]”uh1hÂhhhžhhŸh³h KŒexpect_referenced_by_name”}”jÇ h¶sŒexpect_referenced_by_id”}”hÁh¶subeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h³uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÇNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jñ Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h³Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”hÁ]”h¶asŒnameids”}”(jÇ hÁjÆ jà j¾ j» uŒ nametypes”}”(jÇ ˆjÆ ‰j¾ ‰uh}”(hÁhÄjà hÄj» hæuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”hŒsystem_message”“”)”}”(hhh]”hŒ paragraph”“”)”}”(hhh]”hŒ0Hyperlink target "cec-header" is not referenced.”…””}”hj] sbah}”(h]”h ]”h"]”h$]”h&]”uh1j[ hjX ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”h³Œline”Kuh1jV ubaŒ transformer”NŒ include_log”]”Œ decoration”Nhžhub.