[media] adjust some vidioc-*rst tables with wrong columns
[cascardo/linux.git] / Documentation / media / uapi / v4l / vidioc-enumoutput.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _VIDIOC_ENUMOUTPUT:
4
5 ***********************
6 ioctl VIDIOC_ENUMOUTPUT
7 ***********************
8
9 Name
10 ====
11
12 VIDIOC_ENUMOUTPUT - Enumerate video outputs
13
14
15 Synopsis
16 ========
17
18 .. cpp:function:: int ioctl( int fd, int request, struct v4l2_output *argp )
19
20
21 Arguments
22 =========
23
24 ``fd``
25     File descriptor returned by :ref:`open() <func-open>`.
26
27 ``request``
28     VIDIOC_ENUMOUTPUT
29
30 ``argp``
31
32
33 Description
34 ===========
35
36 To query the attributes of a video outputs applications initialize the
37 ``index`` field of struct :ref:`v4l2_output <v4l2-output>` and call
38 the :ref:`VIDIOC_ENUMOUTPUT` ioctl with a pointer to this structure.
39 Drivers fill the rest of the structure or return an ``EINVAL`` error code
40 when the index is out of bounds. To enumerate all outputs applications
41 shall begin at index zero, incrementing by one until the driver returns
42 EINVAL.
43
44
45 .. _v4l2-output:
46
47 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
48
49 .. flat-table:: struct v4l2_output
50     :header-rows:  0
51     :stub-columns: 0
52     :widths:       1 1 2
53
54
55     -  .. row 1
56
57        -  __u32
58
59        -  ``index``
60
61        -  Identifies the output, set by the application.
62
63     -  .. row 2
64
65        -  __u8
66
67        -  ``name``\ [32]
68
69        -  Name of the video output, a NUL-terminated ASCII string, for
70           example: "Vout". This information is intended for the user,
71           preferably the connector label on the device itself.
72
73     -  .. row 3
74
75        -  __u32
76
77        -  ``type``
78
79        -  Type of the output, see :ref:`output-type`.
80
81     -  .. row 4
82
83        -  __u32
84
85        -  ``audioset``
86
87        -  Drivers can enumerate up to 32 video and audio outputs. This field
88           shows which audio outputs were selectable as the current output if
89           this was the currently selected video output. It is a bit mask.
90           The LSB corresponds to audio output 0, the MSB to output 31. Any
91           number of bits can be set, or none.
92
93           When the driver does not enumerate audio outputs no bits must be
94           set. Applications shall not interpret this as lack of audio
95           support. Drivers may automatically select audio outputs without
96           enumerating them.
97
98           For details on audio outputs and how to select the current output
99           see :ref:`audio`.
100
101     -  .. row 5
102
103        -  __u32
104
105        -  ``modulator``
106
107        -  Output devices can have zero or more RF modulators. When the
108           ``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector
109           and this field identifies the modulator. It corresponds to struct
110           :ref:`v4l2_modulator <v4l2-modulator>` field ``index``. For
111           details on modulators see :ref:`tuner`.
112
113     -  .. row 6
114
115        -  :ref:`v4l2_std_id <v4l2-std-id>`
116
117        -  ``std``
118
119        -  Every video output supports one or more different video standards.
120           This field is a set of all supported standards. For details on
121           video standards and how to switch see :ref:`standard`.
122
123     -  .. row 7
124
125        -  __u32
126
127        -  ``capabilities``
128
129        -  This field provides capabilities for the output. See
130           :ref:`output-capabilities` for flags.
131
132     -  .. row 8
133
134        -  __u32
135
136        -  ``reserved``\ [3]
137
138        -  Reserved for future extensions. Drivers must set the array to
139           zero.
140
141
142
143 .. _output-type:
144
145 .. tabularcolumns:: |p{7.0cm}|p{1.8cm}|p{8.7cm}|
146
147 .. flat-table:: Output Type
148     :header-rows:  0
149     :stub-columns: 0
150     :widths:       3 1 4
151
152
153     -  .. row 1
154
155        -  ``V4L2_OUTPUT_TYPE_MODULATOR``
156
157        -  1
158
159        -  This output is an analog TV modulator.
160
161     -  .. row 2
162
163        -  ``V4L2_OUTPUT_TYPE_ANALOG``
164
165        -  2
166
167        -  Analog baseband output, for example Composite / CVBS, S-Video,
168           RGB.
169
170     -  .. row 3
171
172        -  ``V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY``
173
174        -  3
175
176        -  [?]
177
178
179
180 .. _output-capabilities:
181
182 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
183
184 .. flat-table:: Output capabilities
185     :header-rows:  0
186     :stub-columns: 0
187     :widths:       3 1 4
188
189
190     -  .. row 1
191
192        -  ``V4L2_OUT_CAP_DV_TIMINGS``
193
194        -  0x00000002
195
196        -  This output supports setting video timings by using
197           VIDIOC_S_DV_TIMINGS.
198
199     -  .. row 2
200
201        -  ``V4L2_OUT_CAP_STD``
202
203        -  0x00000004
204
205        -  This output supports setting the TV standard by using
206           VIDIOC_S_STD.
207
208     -  .. row 3
209
210        -  ``V4L2_OUT_CAP_NATIVE_SIZE``
211
212        -  0x00000008
213
214        -  This output supports setting the native size using the
215           ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see
216           :ref:`v4l2-selections-common`.
217
218
219 Return Value
220 ============
221
222 On success 0 is returned, on error -1 and the ``errno`` variable is set
223 appropriately. The generic error codes are described at the
224 :ref:`Generic Error Codes <gen-errors>` chapter.
225
226 EINVAL
227     The struct :ref:`v4l2_output <v4l2-output>` ``index`` is out of
228     bounds.