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