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