1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
19 CEC_ADAP_G_CAPS - Query device capabilities
24 .. c:function:: int ioctl( int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp )
25 :name: CEC_ADAP_G_CAPS
31 File descriptor returned by :c:func:`open() <cec-open>`.
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 :c:type:`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
55 - The name of the cec adapter driver.
58 - The name of this CEC adapter. The combination ``driver`` and
59 ``name`` must be unique.
62 - The capabilities of the CEC adapter, see
63 :ref:`cec-capabilities`.
66 - CEC Framework API version, formatted with the ``KERNEL_VERSION()``
70 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}|
74 .. flat-table:: CEC Capabilities Flags
79 * .. _`CEC-CAP-PHYS-ADDR`:
81 - ``CEC_CAP_PHYS_ADDR``
83 - Userspace has to configure the physical address by calling
84 :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If
85 this capability isn't set, then setting the physical address is
86 handled by the kernel whenever the EDID is set (for an HDMI
87 receiver) or read (for an HDMI transmitter).
88 * .. _`CEC-CAP-LOG-ADDRS`:
90 - ``CEC_CAP_LOG_ADDRS``
92 - Userspace has to configure the logical addresses by calling
93 :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If
94 this capability isn't set, then the kernel will have configured
96 * .. _`CEC-CAP-TRANSMIT`:
98 - ``CEC_CAP_TRANSMIT``
100 - Userspace can transmit CEC messages by calling
101 :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that
102 userspace can be a follower as well, since being able to transmit
103 messages is a prerequisite of becoming a follower. If this
104 capability isn't set, then the kernel will handle all CEC
105 transmits and process all CEC messages it receives.
106 * .. _`CEC-CAP-PASSTHROUGH`:
108 - ``CEC_CAP_PASSTHROUGH``
110 - Userspace can use the passthrough mode by calling
111 :ref:`ioctl CEC_S_MODE <CEC_S_MODE>`.
116 - This adapter supports the remote control protocol.
117 * .. _`CEC-CAP-MONITOR-ALL`:
119 - ``CEC_CAP_MONITOR_ALL``
121 - The CEC hardware can monitor all messages, not just directed and
123 * .. _`CEC-CAP-NEEDS-HPD`:
125 - ``CEC_CAP_NEEDS_HPD``
127 - The CEC hardware is only active if the HDMI Hotplug Detect pin is
128 high. This makes it impossible to use CEC to wake up displays that
129 set the HPD pin low when in standby mode, but keep the CEC bus
131 * .. _`CEC-CAP-MONITOR-PIN`:
133 - ``CEC_CAP_MONITOR_PIN``
135 - The CEC hardware can monitor CEC pin changes from low to high voltage
136 and vice versa. When in pin monitoring mode the application will
137 receive ``CEC_EVENT_PIN_CEC_LOW`` and ``CEC_EVENT_PIN_CEC_HIGH`` events.
144 On success 0 is returned, on error -1 and the ``errno`` variable is set
145 appropriately. The generic error codes are described at the
146 :ref:`Generic Error Codes <gen-errors>` chapter.