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