Commit | Line | Data |
---|---|---|
e2460b1d MH |
1 | .. -*- coding: utf-8; mode: rst -*- |
2 | ||
21c62694 | 3 | .. _CEC_ADAP_G_CAPS: |
e2460b1d MH |
4 | |
5 | ********************* | |
6 | ioctl CEC_ADAP_G_CAPS | |
7 | ********************* | |
8 | ||
21c62694 MH |
9 | Name |
10 | ==== | |
e2460b1d | 11 | |
21c62694 | 12 | CEC_ADAP_G_CAPS - Query device capabilities |
e2460b1d MH |
13 | |
14 | Synopsis | |
15 | ======== | |
16 | ||
99547836 MCC |
17 | .. c:function:: int ioctl( int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp ) |
18 | :name: CEC_ADAP_G_CAPS | |
e2460b1d MH |
19 | |
20 | Arguments | |
21 | ========= | |
22 | ||
23 | ``fd`` | |
24 | File descriptor returned by :ref:`open() <cec-func-open>`. | |
25 | ||
e2460b1d MH |
26 | ``argp`` |
27 | ||
28 | ||
29 | Description | |
30 | =========== | |
31 | ||
b6b6e678 MCC |
32 | .. note:: |
33 | ||
34 | This documents the proposed CEC API. This API is not yet finalized | |
706f8a99 | 35 | and is currently only available as a staging kernel module. |
e2460b1d | 36 | |
1267c60a | 37 | All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query |
e2460b1d | 38 | device information, applications call the ioctl with a pointer to a |
e8be7e97 | 39 | struct :c:type:`cec_caps`. The driver fills the structure and |
e2460b1d MH |
40 | returns the information to the application. The ioctl never fails. |
41 | ||
fa92b04d | 42 | .. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.8cm}| |
e2460b1d | 43 | |
e8be7e97 | 44 | .. c:type:: cec_caps |
e2460b1d MH |
45 | |
46 | .. flat-table:: struct cec_caps | |
47 | :header-rows: 0 | |
48 | :stub-columns: 0 | |
b2a58436 | 49 | :widths: 1 1 16 |
e2460b1d MH |
50 | |
51 | ||
52 | - .. row 1 | |
53 | ||
54 | - char | |
55 | ||
8968da9b | 56 | - ``driver[32]`` |
e2460b1d MH |
57 | |
58 | - The name of the cec adapter driver. | |
59 | ||
60 | - .. row 2 | |
61 | ||
62 | - char | |
63 | ||
8968da9b | 64 | - ``name[32]`` |
e2460b1d MH |
65 | |
66 | - The name of this CEC adapter. The combination ``driver`` and | |
706f8a99 | 67 | ``name`` must be unique. |
e2460b1d MH |
68 | |
69 | - .. row 3 | |
70 | ||
71 | - __u32 | |
72 | ||
73 | - ``capabilities`` | |
74 | ||
75 | - The capabilities of the CEC adapter, see | |
706f8a99 | 76 | :ref:`cec-capabilities`. |
e2460b1d MH |
77 | |
78 | - .. row 4 | |
79 | ||
80 | - __u32 | |
81 | ||
82 | - ``version`` | |
83 | ||
84 | - CEC Framework API version, formatted with the ``KERNEL_VERSION()`` | |
706f8a99 | 85 | macro. |
e2460b1d MH |
86 | |
87 | ||
fa92b04d | 88 | .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}| |
e2460b1d MH |
89 | |
90 | .. _cec-capabilities: | |
91 | ||
92 | .. flat-table:: CEC Capabilities Flags | |
93 | :header-rows: 0 | |
94 | :stub-columns: 0 | |
b2a58436 | 95 | :widths: 3 1 8 |
e2460b1d MH |
96 | |
97 | ||
96f69e0e | 98 | - .. _`CEC-CAP-PHYS-ADDR`: |
e2460b1d MH |
99 | |
100 | - ``CEC_CAP_PHYS_ADDR`` | |
101 | ||
102 | - 0x00000001 | |
103 | ||
104 | - Userspace has to configure the physical address by calling | |
1267c60a | 105 | :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If |
706f8a99 MCC |
106 | this capability isn't set, then setting the physical address is |
107 | handled by the kernel whenever the EDID is set (for an HDMI | |
108 | receiver) or read (for an HDMI transmitter). | |
e2460b1d | 109 | |
96f69e0e | 110 | - .. _`CEC-CAP-LOG-ADDRS`: |
e2460b1d MH |
111 | |
112 | - ``CEC_CAP_LOG_ADDRS`` | |
113 | ||
114 | - 0x00000002 | |
115 | ||
116 | - Userspace has to configure the logical addresses by calling | |
1267c60a | 117 | :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If |
706f8a99 MCC |
118 | this capability isn't set, then the kernel will have configured |
119 | this. | |
e2460b1d | 120 | |
96f69e0e | 121 | - .. _`CEC-CAP-TRANSMIT`: |
e2460b1d MH |
122 | |
123 | - ``CEC_CAP_TRANSMIT`` | |
124 | ||
125 | - 0x00000004 | |
126 | ||
127 | - Userspace can transmit CEC messages by calling | |
1267c60a | 128 | :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that |
706f8a99 MCC |
129 | userspace can be a follower as well, since being able to transmit |
130 | messages is a prerequisite of becoming a follower. If this | |
131 | capability isn't set, then the kernel will handle all CEC | |
132 | transmits and process all CEC messages it receives. | |
e2460b1d | 133 | |
96f69e0e | 134 | - .. _`CEC-CAP-PASSTHROUGH`: |
e2460b1d MH |
135 | |
136 | - ``CEC_CAP_PASSTHROUGH`` | |
137 | ||
138 | - 0x00000008 | |
139 | ||
140 | - Userspace can use the passthrough mode by calling | |
1267c60a | 141 | :ref:`ioctl CEC_S_MODE <CEC_S_MODE>`. |
e2460b1d | 142 | |
96f69e0e | 143 | - .. _`CEC-CAP-RC`: |
e2460b1d MH |
144 | |
145 | - ``CEC_CAP_RC`` | |
146 | ||
147 | - 0x00000010 | |
148 | ||
149 | - This adapter supports the remote control protocol. | |
150 | ||
96f69e0e | 151 | - .. _`CEC-CAP-MONITOR-ALL`: |
e2460b1d MH |
152 | |
153 | - ``CEC_CAP_MONITOR_ALL`` | |
154 | ||
155 | - 0x00000020 | |
156 | ||
157 | - The CEC hardware can monitor all messages, not just directed and | |
706f8a99 | 158 | broadcast messages. |
e2460b1d MH |
159 | |
160 | ||
161 | ||
162 | Return Value | |
163 | ============ | |
164 | ||
165 | On success 0 is returned, on error -1 and the ``errno`` variable is set | |
166 | appropriately. The generic error codes are described at the | |
167 | :ref:`Generic Error Codes <gen-errors>` chapter. |