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