[media] docs-rst: fix warnings introduced by LaTeX patchset
[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 .. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.8cm}|
45
46 .. _cec-caps:
47
48 .. flat-table:: struct cec_caps
49     :header-rows:  0
50     :stub-columns: 0
51     :widths:       1 1 16
52
53
54     -  .. row 1
55
56        -  char
57
58        -  ``driver[32]``
59
60        -  The name of the cec adapter driver.
61
62     -  .. row 2
63
64        -  char
65
66        -  ``name[32]``
67
68        -  The name of this CEC adapter. The combination ``driver`` and
69           ``name`` must be unique.
70
71     -  .. row 3
72
73        -  __u32
74
75        -  ``capabilities``
76
77        -  The capabilities of the CEC adapter, see
78           :ref:`cec-capabilities`.
79
80     -  .. row 4
81
82        -  __u32
83
84        -  ``version``
85
86        -  CEC Framework API version, formatted with the ``KERNEL_VERSION()``
87           macro.
88
89
90 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}|
91
92 .. _cec-capabilities:
93
94 .. flat-table:: CEC Capabilities Flags
95     :header-rows:  0
96     :stub-columns: 0
97     :widths:       3 1 8
98
99
100     -  .. _`CEC-CAP-PHYS-ADDR`:
101
102        -  ``CEC_CAP_PHYS_ADDR``
103
104        -  0x00000001
105
106        -  Userspace has to configure the physical address by calling
107           :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If
108           this capability isn't set, then setting the physical address is
109           handled by the kernel whenever the EDID is set (for an HDMI
110           receiver) or read (for an HDMI transmitter).
111
112     -  .. _`CEC-CAP-LOG-ADDRS`:
113
114        -  ``CEC_CAP_LOG_ADDRS``
115
116        -  0x00000002
117
118        -  Userspace has to configure the logical addresses by calling
119           :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If
120           this capability isn't set, then the kernel will have configured
121           this.
122
123     -  .. _`CEC-CAP-TRANSMIT`:
124
125        -  ``CEC_CAP_TRANSMIT``
126
127        -  0x00000004
128
129        -  Userspace can transmit CEC messages by calling
130           :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that
131           userspace can be a follower as well, since being able to transmit
132           messages is a prerequisite of becoming a follower. If this
133           capability isn't set, then the kernel will handle all CEC
134           transmits and process all CEC messages it receives.
135
136     -  .. _`CEC-CAP-PASSTHROUGH`:
137
138        -  ``CEC_CAP_PASSTHROUGH``
139
140        -  0x00000008
141
142        -  Userspace can use the passthrough mode by calling
143           :ref:`ioctl CEC_S_MODE <CEC_S_MODE>`.
144
145     -  .. _`CEC-CAP-RC`:
146
147        -  ``CEC_CAP_RC``
148
149        -  0x00000010
150
151        -  This adapter supports the remote control protocol.
152
153     -  .. _`CEC-CAP-MONITOR-ALL`:
154
155        -  ``CEC_CAP_MONITOR_ALL``
156
157        -  0x00000020
158
159        -  The CEC hardware can monitor all messages, not just directed and
160           broadcast messages.
161
162
163
164 Return Value
165 ============
166
167 On success 0 is returned, on error -1 and the ``errno`` variable is set
168 appropriately. The generic error codes are described at the
169 :ref:`Generic Error Codes <gen-errors>` chapter.