ioctl CEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS
&manvol;
CEC_ADAP_G_LOG_ADDRSCEC_ADAP_S_LOG_ADDRSGet or set the logical addressesint ioctlint fdint requeststruct cec_log_addrs *argpArgumentsfdFile descriptor returned by
open().requestCEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRSargpDescription
Note: this documents the proposed CEC API. This API is not yet finalized and
is currently only available as a staging kernel module.
To query the current CEC logical addresses, applications call the
CEC_ADAP_G_LOG_ADDRS ioctl with a pointer to a
cec_log_addrs structure where the drivers stores the
logical addresses.To set new logical addresses, applications fill in struct cec_log_addrs
and call the CEC_ADAP_S_LOG_ADDRS ioctl with a pointer to this struct.
The CEC_ADAP_S_LOG_ADDRS ioctl is only available if
CEC_CAP_LOG_ADDRS is set (&ENOTTY; is returned otherwise). This ioctl will block until all
requested logical addresses have been claimed. CEC_ADAP_S_LOG_ADDRS
can only be called by a file handle in initiator mode (see &CEC-S-MODE;).
struct cec_log_addrs
&cs-str;
__u8log_addr[CEC_MAX_LOG_ADDRS]The actual logical addresses that were claimed. This is set by the
driver. If no logical address could be claimed, then it is set to
CEC_LOG_ADDR_INVALID. If this adapter is Unregistered,
then log_addr[0] is set to 0xf and all others to
CEC_LOG_ADDR_INVALID.__u16log_addr_maskThe bitmask of all logical addresses this adapter has claimed.
If this adapter is Unregistered then log_addr_mask
sets bit 15 and clears all other bits. If this adapter is not configured at all, then
log_addr_mask is set to 0. Set by the driver.__u8cec_versionThe CEC version that this adapter shall use. See
.
Used to implement the CEC_MSG_CEC_VERSION and
CEC_MSG_REPORT_FEATURES messages. Note that
CEC_OP_CEC_VERSION_1_3A is not allowed
by the CEC framework.
__u8num_log_addrsNumber of logical addresses to set up. Must be ≤
available_log_addrs as returned by
&CEC-ADAP-G-CAPS;. All arrays in this structure are only filled up to
index available_log_addrs-1. The remaining
array elements will be ignored. Note that the CEC 2.0 standard allows
for a maximum of 2 logical addresses, although some hardware has support
for more. CEC_MAX_LOG_ADDRS is 4. The driver will
return the actual number of logical addresses it could claim, which may
be less than what was requested. If this field is set to 0, then the
CEC adapter shall clear all claimed logical addresses and all other
fields will be ignored.__u32vendor_idThe vendor ID is a 24-bit number that identifies the specific
vendor or entity. Based on this ID vendor specific commands may be
defined. If you do not want a vendor ID then set it to
CEC_VENDOR_ID_NONE.__u32flagsFlags. No flags are defined yet, so set this to 0.charosd_name[15]The On-Screen Display name as is returned by the
CEC_MSG_SET_OSD_NAME message.__u8primary_device_type[CEC_MAX_LOG_ADDRS]Primary device type for each logical address. See
for possible types.__u8log_addr_type[CEC_MAX_LOG_ADDRS]Logical address types. See for
possible types. The driver will update this with the actual logical address
type that it claimed (e.g. it may have to fallback to
CEC_LOG_ADDR_TYPE_UNREGISTERED).__u8all_device_types[CEC_MAX_LOG_ADDRS]CEC 2.0 specific: all device types. See .
Used to implement the CEC_MSG_REPORT_FEATURES message.
This field is ignored if cec_version <
CEC_OP_CEC_VERSION_2_0.__u8features[CEC_MAX_LOG_ADDRS][12]Features for each logical address. Used to implement the
CEC_MSG_REPORT_FEATURES message. The 12 bytes include
both the RC Profile and the Device Features.
This field is ignored if cec_version <
CEC_OP_CEC_VERSION_2_0.
CEC Versions
&cs-def;
CEC_OP_CEC_VERSION_1_3A4CEC version according to the HDMI 1.3a standard.CEC_OP_CEC_VERSION_1_4B5CEC version according to the HDMI 1.4b standard.CEC_OP_CEC_VERSION_2_06CEC version according to the HDMI 2.0 standard.
CEC Primary Device Types
&cs-def;
CEC_OP_PRIM_DEVTYPE_TV0Use for a TV.CEC_OP_PRIM_DEVTYPE_RECORD1Use for a recording device.CEC_OP_PRIM_DEVTYPE_TUNER3Use for a device with a tuner.CEC_OP_PRIM_DEVTYPE_PLAYBACK4Use for a playback device.CEC_OP_PRIM_DEVTYPE_AUDIOSYSTEM5Use for an audio system (e.g. an audio/video receiver).CEC_OP_PRIM_DEVTYPE_SWITCH6Use for a CEC switch.CEC_OP_PRIM_DEVTYPE_VIDEOPROC7Use for a video processor device.
CEC Logical Address Types
&cs-def;
CEC_LOG_ADDR_TYPE_TV0Use for a TV.CEC_LOG_ADDR_TYPE_RECORD1Use for a recording device.CEC_LOG_ADDR_TYPE_TUNER2Use for a tuner device.CEC_LOG_ADDR_TYPE_PLAYBACK3Use for a playback device.CEC_LOG_ADDR_TYPE_AUDIOSYSTEM4Use for an audio system device.CEC_LOG_ADDR_TYPE_SPECIFIC5Use for a second TV or for a video processor device.CEC_LOG_ADDR_TYPE_UNREGISTERED6Use this if you just want to remain unregistered.
Used for pure CEC switches or CDC-only devices (CDC:
Capability Discovery and Control).
CEC All Device Types Flags
&cs-def;
CEC_OP_ALL_DEVTYPE_TV0x80This supports the TV type.CEC_OP_ALL_DEVTYPE_RECORD0x40This supports the Recording type.CEC_OP_ALL_DEVTYPE_TUNER0x20This supports the Tuner type.CEC_OP_ALL_DEVTYPE_PLAYBACK0x10This supports the Playback type.CEC_OP_ALL_DEVTYPE_AUDIOSYSTEM0x08This supports the Audio System type.CEC_OP_ALL_DEVTYPE_SWITCH0x04This supports the CEC Switch or Video Processing type.