1 .. -*- coding: utf-8; mode: rst -*-
12 CEC_ADAP_G_CAPS - Query device capabilities
17 .. c:function:: int ioctl( int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp )
18 :name: CEC_ADAP_G_CAPS
24 File descriptor returned by :ref:`open() <cec-func-open>`.
34 This documents the proposed CEC API. This API is not yet finalized
35 and is currently only available as a staging kernel module.
37 All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query
38 device information, applications call the ioctl with a pointer to a
39 struct :c:type:`cec_caps`. The driver fills the structure and
40 returns the information to the application. The ioctl never fails.
42 .. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.8cm}|
46 .. flat-table:: struct cec_caps
53 - The name of the cec adapter driver.
56 - The name of this CEC adapter. The combination ``driver`` and
57 ``name`` must be unique.
60 - The capabilities of the CEC adapter, see
61 :ref:`cec-capabilities`.
64 - CEC Framework API version, formatted with the ``KERNEL_VERSION()``
68 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}|
72 .. flat-table:: CEC Capabilities Flags
77 * .. _`CEC-CAP-PHYS-ADDR`:
79 - ``CEC_CAP_PHYS_ADDR``
81 - Userspace has to configure the physical address by calling
82 :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If
83 this capability isn't set, then setting the physical address is
84 handled by the kernel whenever the EDID is set (for an HDMI
85 receiver) or read (for an HDMI transmitter).
86 * .. _`CEC-CAP-LOG-ADDRS`:
88 - ``CEC_CAP_LOG_ADDRS``
90 - Userspace has to configure the logical addresses by calling
91 :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If
92 this capability isn't set, then the kernel will have configured
94 * .. _`CEC-CAP-TRANSMIT`:
96 - ``CEC_CAP_TRANSMIT``
98 - Userspace can transmit CEC messages by calling
99 :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that
100 userspace can be a follower as well, since being able to transmit
101 messages is a prerequisite of becoming a follower. If this
102 capability isn't set, then the kernel will handle all CEC
103 transmits and process all CEC messages it receives.
104 * .. _`CEC-CAP-PASSTHROUGH`:
106 - ``CEC_CAP_PASSTHROUGH``
108 - Userspace can use the passthrough mode by calling
109 :ref:`ioctl CEC_S_MODE <CEC_S_MODE>`.
114 - This adapter supports the remote control protocol.
115 * .. _`CEC-CAP-MONITOR-ALL`:
117 - ``CEC_CAP_MONITOR_ALL``
119 - The CEC hardware can monitor all messages, not just directed and
127 On success 0 is returned, on error -1 and the ``errno`` variable is set
128 appropriately. The generic error codes are described at the
129 :ref:`Generic Error Codes <gen-errors>` chapter.