1 .. -*- coding: utf-8; mode: rst -*-
12 CEC_ADAP_G_CAPS - Query device capabilities
17 .. cpp:function:: int ioctl( int fd, int request, struct cec_caps *argp )
23 File descriptor returned by :ref:`open() <cec-func-open>`.
36 This documents the proposed CEC API. This API is not yet finalized
37 and is currently only available as a staging kernel module.
39 All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query
40 device information, applications call the ioctl with a pointer to a
41 struct :ref:`cec_caps <cec-caps>`. The driver fills the structure and
42 returns the information to the application. The ioctl never fails.
44 .. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.8cm}|
48 .. flat-table:: struct cec_caps
60 - The name of the cec adapter driver.
68 - The name of this CEC adapter. The combination ``driver`` and
69 ``name`` must be unique.
77 - The capabilities of the CEC adapter, see
78 :ref:`cec-capabilities`.
86 - CEC Framework API version, formatted with the ``KERNEL_VERSION()``
90 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}|
94 .. flat-table:: CEC Capabilities Flags
100 - .. _`CEC-CAP-PHYS-ADDR`:
102 - ``CEC_CAP_PHYS_ADDR``
106 - Userspace has to configure the physical address by calling
107 :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If
108 this capability isn't set, then setting the physical address is
109 handled by the kernel whenever the EDID is set (for an HDMI
110 receiver) or read (for an HDMI transmitter).
112 - .. _`CEC-CAP-LOG-ADDRS`:
114 - ``CEC_CAP_LOG_ADDRS``
118 - Userspace has to configure the logical addresses by calling
119 :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If
120 this capability isn't set, then the kernel will have configured
123 - .. _`CEC-CAP-TRANSMIT`:
125 - ``CEC_CAP_TRANSMIT``
129 - Userspace can transmit CEC messages by calling
130 :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that
131 userspace can be a follower as well, since being able to transmit
132 messages is a prerequisite of becoming a follower. If this
133 capability isn't set, then the kernel will handle all CEC
134 transmits and process all CEC messages it receives.
136 - .. _`CEC-CAP-PASSTHROUGH`:
138 - ``CEC_CAP_PASSTHROUGH``
142 - Userspace can use the passthrough mode by calling
143 :ref:`ioctl CEC_S_MODE <CEC_S_MODE>`.
151 - This adapter supports the remote control protocol.
153 - .. _`CEC-CAP-MONITOR-ALL`:
155 - ``CEC_CAP_MONITOR_ALL``
159 - The CEC hardware can monitor all messages, not just directed and
167 On success 0 is returned, on error -1 and the ``errno`` variable is set
168 appropriately. The generic error codes are described at the
169 :ref:`Generic Error Codes <gen-errors>` chapter.