1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
13 CEC_ADAP_G_CAPS - Query device capabilities
18 .. c:macro:: CEC_ADAP_G_CAPS
20 ``int ioctl(int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp)``
26 File descriptor returned by :c:func:`open()`.
33 All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query
34 device information, applications call the ioctl with a pointer to a
35 struct :c:type:`cec_caps`. The driver fills the structure and
36 returns the information to the application. The ioctl never fails.
38 .. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.6cm}|
42 .. flat-table:: struct cec_caps
49 - The name of the cec adapter driver.
52 - The name of this CEC adapter. The combination ``driver`` and
53 ``name`` must be unique.
55 - ``available_log_addrs``
56 - The maximum number of logical addresses that can be configured.
59 - The capabilities of the CEC adapter, see
60 :ref:`cec-capabilities`.
63 - CEC Framework API version, formatted with the ``KERNEL_VERSION()``
66 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.4cm}|
70 .. flat-table:: CEC Capabilities Flags
75 * .. _`CEC-CAP-PHYS-ADDR`:
77 - ``CEC_CAP_PHYS_ADDR``
79 - Userspace has to configure the physical address by calling
80 :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If
81 this capability isn't set, then setting the physical address is
82 handled by the kernel whenever the EDID is set (for an HDMI
83 receiver) or read (for an HDMI transmitter).
84 * .. _`CEC-CAP-LOG-ADDRS`:
86 - ``CEC_CAP_LOG_ADDRS``
88 - Userspace has to configure the logical addresses by calling
89 :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If
90 this capability isn't set, then the kernel will have configured
92 * .. _`CEC-CAP-TRANSMIT`:
94 - ``CEC_CAP_TRANSMIT``
96 - Userspace can transmit CEC messages by calling
97 :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that
98 userspace can be a follower as well, since being able to transmit
99 messages is a prerequisite of becoming a follower. If this
100 capability isn't set, then the kernel will handle all CEC
101 transmits and process all CEC messages it receives.
102 * .. _`CEC-CAP-PASSTHROUGH`:
104 - ``CEC_CAP_PASSTHROUGH``
106 - Userspace can use the passthrough mode by calling
107 :ref:`ioctl CEC_S_MODE <CEC_S_MODE>`.
112 - This adapter supports the remote control protocol.
113 * .. _`CEC-CAP-MONITOR-ALL`:
115 - ``CEC_CAP_MONITOR_ALL``
117 - The CEC hardware can monitor all messages, not just directed and
119 * .. _`CEC-CAP-NEEDS-HPD`:
121 - ``CEC_CAP_NEEDS_HPD``
123 - The CEC hardware is only active if the HDMI Hotplug Detect pin is
124 high. This makes it impossible to use CEC to wake up displays that
125 set the HPD pin low when in standby mode, but keep the CEC bus
127 * .. _`CEC-CAP-MONITOR-PIN`:
129 - ``CEC_CAP_MONITOR_PIN``
131 - The CEC hardware can monitor CEC pin changes from low to high voltage
132 and vice versa. When in pin monitoring mode the application will
133 receive ``CEC_EVENT_PIN_CEC_LOW`` and ``CEC_EVENT_PIN_CEC_HIGH`` events.
134 * .. _`CEC-CAP-CONNECTOR-INFO`:
136 - ``CEC_CAP_CONNECTOR_INFO``
138 - If this capability is set, then :ref:`CEC_ADAP_G_CONNECTOR_INFO` can
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.