Merge remote-tracking branch 'mfd/for-mfd-next'
[deliverable/linux.git] / Documentation / media / uapi / v4l / vidioc-g-sliced-vbi-cap.rst
CommitLineData
5377d91f
MH
1.. -*- coding: utf-8; mode: rst -*-
2
af4a4d0d 3.. _VIDIOC_G_SLICED_VBI_CAP:
5377d91f
MH
4
5*****************************
6ioctl VIDIOC_G_SLICED_VBI_CAP
7*****************************
8
15e7d615 9Name
586027ce 10====
5377d91f 11
586027ce 12VIDIOC_G_SLICED_VBI_CAP - Query sliced VBI capabilities
5377d91f 13
15e7d615
MCC
14
15Synopsis
5377d91f
MH
16========
17
41d80465
MCC
18.. c:function:: int ioctl( int fd, VIDIOC_G_SLICED_VBI_CAP, struct v4l2_sliced_vbi_cap *argp )
19 :name: VIDIOC_G_SLICED_VBI_CAP
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 find out which data services are supported by a sliced VBI capture or
35output device, applications initialize the ``type`` field of a struct
e8be7e97 36:c:type:`v4l2_sliced_vbi_cap`, clear the
4e03cb76 37``reserved`` array and call the :ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl. The
cdb4af0f 38driver fills in the remaining fields or returns an ``EINVAL`` error code if
5377d91f
MH
39the sliced VBI API is unsupported or ``type`` is invalid.
40
b6b6e678
MCC
41.. note::
42
43 The ``type`` field was added, and the ioctl changed from read-only
706f8a99 44 to write-read, in Linux 2.6.19.
5377d91f
MH
45
46
e8be7e97 47.. c:type:: v4l2_sliced_vbi_cap
5377d91f 48
e7eaeb37 49.. tabularcolumns:: |p{1.2cm}|p{4.2cm}|p{4.1cm}|p{4.0cm}|p{4.0cm}|
5bd4bb78 50
5377d91f
MH
51.. flat-table:: struct v4l2_sliced_vbi_cap
52 :header-rows: 0
53 :stub-columns: 0
54 :widths: 3 3 2 2 2
55
56
57 - .. row 1
58
59 - __u16
60
61 - ``service_set``
62
63 - :cspan:`2` A set of all data services supported by the driver.
e7eaeb37 64
0579e6e3 65 Equal to the union of all elements of the ``service_lines`` array.
5377d91f
MH
66
67 - .. row 2
68
69 - __u16
70
8968da9b 71 - ``service_lines``\ [2][24]
5377d91f
MH
72
73 - :cspan:`2` Each element of this array contains a set of data
0579e6e3
MCC
74 services the hardware can look for or insert into a particular
75 scan line. Data services are defined in :ref:`vbi-services`.
e7eaeb37 76 Array indices map to ITU-R line numbers\ [#f1]_ as follows:
5377d91f
MH
77
78 - .. row 3
79
0579e6e3
MCC
80 -
81 -
5377d91f
MH
82 - Element
83
84 - 525 line systems
85
86 - 625 line systems
87
88 - .. row 4
89
0579e6e3
MCC
90 -
91 -
8968da9b 92 - ``service_lines``\ [0][1]
5377d91f
MH
93
94 - 1
95
96 - 1
97
98 - .. row 5
99
0579e6e3
MCC
100 -
101 -
8968da9b 102 - ``service_lines``\ [0][23]
5377d91f
MH
103
104 - 23
105
106 - 23
107
108 - .. row 6
109
0579e6e3
MCC
110 -
111 -
8968da9b 112 - ``service_lines``\ [1][1]
5377d91f
MH
113
114 - 264
115
116 - 314
117
118 - .. row 7
119
0579e6e3
MCC
120 -
121 -
8968da9b 122 - ``service_lines``\ [1][23]
5377d91f
MH
123
124 - 286
125
126 - 336
127
128 - .. row 8
129
0579e6e3 130 -
5377d91f
MH
131
132 - .. row 9
133
0579e6e3
MCC
134 -
135 -
5377d91f 136 - :cspan:`2` The number of VBI lines the hardware can capture or
0579e6e3
MCC
137 output per frame, or the number of services it can identify on a
138 given line may be limited. For example on PAL line 16 the hardware
139 may be able to look for a VPS or Teletext signal, but not both at
140 the same time. Applications can learn about these limits using the
141 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl as described in
142 :ref:`sliced`.
5377d91f
MH
143
144 - .. row 10
145
0579e6e3 146 -
5377d91f
MH
147
148 - .. row 11
149
0579e6e3
MCC
150 -
151 -
8968da9b
MCC
152 - :cspan:`2` Drivers must set ``service_lines`` [0][0] and
153 ``service_lines``\ [1][0] to zero.
5377d91f
MH
154
155 - .. row 12
156
157 - __u32
158
159 - ``type``
160
56683d7d 161 - Type of the data stream, see :c:type:`v4l2_buf_type`. Should be
0579e6e3
MCC
162 ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or
163 ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``.
5377d91f
MH
164
165 - .. row 13
166
167 - __u32
168
8968da9b 169 - ``reserved``\ [3]
5377d91f
MH
170
171 - :cspan:`2` This array is reserved for future extensions.
e7eaeb37 172
0579e6e3 173 Applications and drivers must set it to zero.
5377d91f 174
e7eaeb37 175.. [#f1]
5377d91f 176
e7eaeb37 177 See also :ref:`vbi-525` and :ref:`vbi-625`.
5377d91f 178
5377d91f 179
e7eaeb37
MCC
180.. raw:: latex
181
8c978c08 182 \begin{adjustbox}{width=\columnwidth}
e7eaeb37
MCC
183
184.. tabularcolumns:: |p{5.0cm}|p{1.4cm}|p{3.0cm}|p{2.5cm}|p{9.0cm}|
185
186.. _vbi-services:
5bd4bb78 187
5377d91f
MH
188.. flat-table:: Sliced VBI services
189 :header-rows: 1
190 :stub-columns: 0
191 :widths: 2 1 1 2 2
192
193
194 - .. row 1
195
196 - Symbol
197
198 - Value
199
200 - Reference
201
202 - Lines, usually
203
204 - Payload
205
206 - .. row 2
207
208 - ``V4L2_SLICED_TELETEXT_B`` (Teletext System B)
209
210 - 0x0001
211
e7eaeb37
MCC
212 - :ref:`ets300706`,
213
214 :ref:`itu653`
5377d91f
MH
215
216 - PAL/SECAM line 7-22, 320-335 (second field 7-22)
217
218 - Last 42 of the 45 byte Teletext packet, that is without clock
0579e6e3 219 run-in and framing code, lsb first transmitted.
5377d91f
MH
220
221 - .. row 3
222
223 - ``V4L2_SLICED_VPS``
224
225 - 0x0400
226
227 - :ref:`ets300231`
228
229 - PAL line 16
230
231 - Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb
0579e6e3 232 first transmitted.
5377d91f
MH
233
234 - .. row 4
235
236 - ``V4L2_SLICED_CAPTION_525``
237
238 - 0x1000
239
240 - :ref:`cea608`
241
242 - NTSC line 21, 284 (second field 21)
243
244 - Two bytes in transmission order, including parity bit, lsb first
0579e6e3 245 transmitted.
5377d91f
MH
246
247 - .. row 5
248
249 - ``V4L2_SLICED_WSS_625``
250
251 - 0x4000
252
e7eaeb37
MCC
253 - :ref:`en300294`,
254
255 :ref:`itu1119`
5377d91f
MH
256
257 - PAL/SECAM line 23
258
0579e6e3 259 -
5377d91f 260
0579e6e3 261 ::
5377d91f 262
0579e6e3
MCC
263 Byte 0 1
264 msb lsb msb lsb
265 Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9
5377d91f
MH
266
267 - .. row 6
268
269 - ``V4L2_SLICED_VBI_525``
270
271 - 0x1000
272
273 - :cspan:`2` Set of services applicable to 525 line systems.
274
275 - .. row 7
276
277 - ``V4L2_SLICED_VBI_625``
278
279 - 0x4401
280
281 - :cspan:`2` Set of services applicable to 625 line systems.
282
e7eaeb37
MCC
283.. raw:: latex
284
285 \end{adjustbox}\newline\newline
286
5377d91f 287
15e7d615 288Return Value
5377d91f
MH
289============
290
291On success 0 is returned, on error -1 and the ``errno`` variable is set
292appropriately. The generic error codes are described at the
293:ref:`Generic Error Codes <gen-errors>` chapter.
294
295EINVAL
296 The value in the ``type`` field is wrong.
This page took 0.062728 seconds and 5 git commands to generate.