1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2.. c:namespace:: V4L
3
4.. _sliced:
5
6*************************
7Sliced VBI Data Interface
8*************************
9
10VBI stands for Vertical Blanking Interval, a gap in the sequence of
11lines of an analog video signal. During VBI no picture information is
12transmitted, allowing some time while the electron beam of a cathode ray
13tube TV returns to the top of the screen.
14
15Sliced VBI devices use hardware to demodulate data transmitted in the
16VBI. V4L2 drivers shall *not* do this by software, see also the
17:ref:`raw VBI interface <raw-vbi>`. The data is passed as short
18packets of fixed size, covering one scan line each. The number of
19packets per video frame is variable.
20
21Sliced VBI capture and output devices are accessed through the same
22character special files as raw VBI devices. When a driver supports both
23interfaces, the default function of a ``/dev/vbi`` device is *raw* VBI
24capturing or output, and the sliced VBI function is only available after
25calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl as defined
26below. Likewise a ``/dev/video`` device may support the sliced VBI API,
27however the default function here is video capturing or output.
28Different file descriptors must be used to pass raw and sliced VBI data
29simultaneously, if this is supported by the driver.
30
31Querying Capabilities
32=====================
33
34Devices supporting the sliced VBI capturing or output API set the
35``V4L2_CAP_SLICED_VBI_CAPTURE`` or ``V4L2_CAP_SLICED_VBI_OUTPUT`` flag
36respectively, in the ``capabilities`` field of struct
37:c:type:`v4l2_capability` returned by the
38:ref:`VIDIOC_QUERYCAP` ioctl. At least one of the
39read/write, streaming or asynchronous :ref:`I/O methods <io>` must be
40supported. Sliced VBI devices may have a tuner or modulator.
41
42Supplemental Functions
43======================
44
45Sliced VBI devices shall support :ref:`video input or output <video>`
46and :ref:`tuner or modulator <tuner>` ioctls if they have these
47capabilities, and they may support :ref:`control` ioctls.
48The :ref:`video standard <standard>` ioctls provide information vital
49to program a sliced VBI device, therefore must be supported.
50
51.. _sliced-vbi-format-negotitation:
52
53Sliced VBI Format Negotiation
54=============================
55
56To find out which data services are supported by the hardware
57applications can call the
58:ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl.
59All drivers implementing the sliced VBI interface must support this
60ioctl. The results may differ from those of the
61:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl when the number of VBI
62lines the hardware can capture or output per frame, or the number of
63services it can identify on a given line are limited. For example on PAL
64line 16 the hardware may be able to look for a VPS or Teletext signal,
65but not both at the same time.
66
67To determine the currently selected services applications set the
68``type`` field of struct :c:type:`v4l2_format` to
69``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or
70``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``, and the
71:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl fills the ``fmt.sliced``
72member, a struct
73:c:type:`v4l2_sliced_vbi_format`.
74
75Applications can request different parameters by initializing or
76modifying the ``fmt.sliced`` member and calling the
77:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with a pointer to the
78struct :c:type:`v4l2_format` structure.
79
80The sliced VBI API is more complicated than the raw VBI API because the
81hardware must be told which VBI service to expect on each scan line. Not
82all services may be supported by the hardware on all lines (this is
83especially true for VBI output where Teletext is often unsupported and
84other services can only be inserted in one specific line). In many
85cases, however, it is sufficient to just set the ``service_set`` field
86to the required services and let the driver fill the ``service_lines``
87array according to hardware capabilities. Only if more precise control
88is needed should the programmer set the ``service_lines`` array
89explicitly.
90
91The :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl modifies the parameters
92according to hardware capabilities. When the driver allocates resources
93at this point, it may return an ``EBUSY`` error code if the required
94resources are temporarily unavailable. Other resource allocation points
95which may return ``EBUSY`` can be the
96:ref:`VIDIOC_STREAMON` ioctl and the first
97:c:func:`read()`, :c:func:`write()` and
98:c:func:`select()` call.
99
100.. c:type:: v4l2_sliced_vbi_format
101
102struct v4l2_sliced_vbi_format
103-----------------------------
104
105.. raw:: latex
106
107    \begingroup
108    \scriptsize
109    \setlength{\tabcolsep}{2pt}
110
111.. tabularcolumns:: |p{.85cm}|p{3.3cm}|p{4.4cm}|p{4.4cm}|p{4.4cm}|
112
113.. cssclass:: longtable
114
115.. flat-table::
116    :header-rows:  0
117    :stub-columns: 0
118    :widths:       3 3 2 2 2
119
120    * - __u16
121      - ``service_set``
122      - :cspan:`2`
123
124	If ``service_set`` is non-zero when passed with
125	:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
126	:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`, the ``service_lines``
127	array will be filled by the driver according to the services
128	specified in this field. For example, if ``service_set`` is
129	initialized with ``V4L2_SLICED_TELETEXT_B | V4L2_SLICED_WSS_625``,
130	a driver for the cx25840 video decoder sets lines 7-22 of both
131	fields [#f1]_ to ``V4L2_SLICED_TELETEXT_B`` and line 23 of the first
132	field to ``V4L2_SLICED_WSS_625``. If ``service_set`` is set to
133	zero, then the values of ``service_lines`` will be used instead.
134
135	On return the driver sets this field to the union of all elements
136	of the returned ``service_lines`` array. It may contain less
137	services than requested, perhaps just one, if the hardware cannot
138	handle more services simultaneously. It may be empty (zero) if
139	none of the requested services are supported by the hardware.
140    * - __u16
141      - ``service_lines``\ [2][24]
142      - :cspan:`2`
143
144	Applications initialize this array with sets of data services the
145	driver shall look for or insert on the respective scan line.
146	Subject to hardware capabilities drivers return the requested set,
147	a subset, which may be just a single service, or an empty set.
148	When the hardware cannot handle multiple services on the same line
149	the driver shall choose one. No assumptions can be made on which
150	service the driver chooses.
151
152	Data services are defined in :ref:`vbi-services2`. Array indices
153	map to ITU-R line numbers\ [#f2]_ as follows:
154    * -
155      -
156      - Element
157      - 525 line systems
158      - 625 line systems
159    * -
160      -
161      - ``service_lines``\ [0][1]
162      - 1
163      - 1
164    * -
165      -
166      - ``service_lines``\ [0][23]
167      - 23
168      - 23
169    * -
170      -
171      - ``service_lines``\ [1][1]
172      - 264
173      - 314
174    * -
175      -
176      - ``service_lines``\ [1][23]
177      - 286
178      - 336
179    * -
180      -
181      - :cspan:`2` Drivers must set ``service_lines`` [0][0] and
182	``service_lines``\ [1][0] to zero. The
183	``V4L2_VBI_ITU_525_F1_START``, ``V4L2_VBI_ITU_525_F2_START``,
184	``V4L2_VBI_ITU_625_F1_START`` and ``V4L2_VBI_ITU_625_F2_START``
185	defines give the start line numbers for each field for each 525 or
186	625 line format as a convenience. Don't forget that ITU line
187	numbering starts at 1, not 0.
188    * - __u32
189      - ``io_size``
190      - :cspan:`2` Maximum number of bytes passed by one
191	:c:func:`read()` or :c:func:`write()` call,
192	and the buffer size in bytes for the
193	:ref:`VIDIOC_QBUF` and
194	:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field
195	to the size of struct
196	:c:type:`v4l2_sliced_vbi_data` times the
197	number of non-zero elements in the returned ``service_lines``
198	array (that is the number of lines potentially carrying data).
199    * - __u32
200      - ``reserved``\ [2]
201      - :cspan:`2` This array is reserved for future extensions.
202
203	Applications and drivers must set it to zero.
204
205.. raw:: latex
206
207    \endgroup
208
209.. _vbi-services2:
210
211Sliced VBI services
212-------------------
213
214.. raw:: latex
215
216    \scriptsize
217
218.. tabularcolumns:: |p{4.1cm}|p{1.1cm}|p{2.4cm}|p{2.0cm}|p{7.3cm}|
219
220.. flat-table::
221    :header-rows:  1
222    :stub-columns: 0
223    :widths:       2 1 1 2 2
224
225    * - Symbol
226      - Value
227      - Reference
228      - Lines, usually
229      - Payload
230    * - ``V4L2_SLICED_TELETEXT_B`` (Teletext System B)
231      - 0x0001
232      - :ref:`ets300706`,
233
234	:ref:`itu653`
235      - PAL/SECAM line 7-22, 320-335 (second field 7-22)
236      - Last 42 of the 45 byte Teletext packet, that is without clock
237	run-in and framing code, lsb first transmitted.
238    * - ``V4L2_SLICED_VPS``
239      - 0x0400
240      - :ref:`ets300231`
241      - PAL line 16
242      - Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb
243	first transmitted.
244    * - ``V4L2_SLICED_CAPTION_525``
245      - 0x1000
246      - :ref:`cea608`
247      - NTSC line 21, 284 (second field 21)
248      - Two bytes in transmission order, including parity bit, lsb first
249	transmitted.
250    * - ``V4L2_SLICED_WSS_625``
251      - 0x4000
252      - :ref:`itu1119`,
253
254	:ref:`en300294`
255      - PAL/SECAM line 23
256      -
257
258	::
259
260	    Byte         0                 1
261		  msb         lsb  msb           lsb
262	     Bit  7 6 5 4 3 2 1 0  x x 13 12 11 10 9
263    * - ``V4L2_SLICED_VBI_525``
264      - 0x1000
265      - :cspan:`2` Set of services applicable to 525 line systems.
266    * - ``V4L2_SLICED_VBI_625``
267      - 0x4401
268      - :cspan:`2` Set of services applicable to 625 line systems.
269
270.. raw:: latex
271
272    \normalsize
273
274Drivers may return an ``EINVAL`` error code when applications attempt to
275read or write data without prior format negotiation, after switching the
276video standard (which may invalidate the negotiated VBI parameters) and
277after switching the video input (which may change the video standard as
278a side effect). The :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl may
279return an ``EBUSY`` error code when applications attempt to change the
280format while i/o is in progress (between a
281:ref:`VIDIOC_STREAMON` and
282:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` call, and after the first
283:c:func:`read()` or :c:func:`write()` call).
284
285Reading and writing sliced VBI data
286===================================
287
288A single :c:func:`read()` or :c:func:`write()`
289call must pass all data belonging to one video frame. That is an array
290of struct :c:type:`v4l2_sliced_vbi_data` structures with one or
291more elements and a total size not exceeding ``io_size`` bytes. Likewise
292in streaming I/O mode one buffer of ``io_size`` bytes must contain data
293of one video frame. The ``id`` of unused
294struct :c:type:`v4l2_sliced_vbi_data` elements must be zero.
295
296.. c:type:: v4l2_sliced_vbi_data
297
298struct v4l2_sliced_vbi_data
299---------------------------
300
301.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
302
303.. flat-table::
304    :header-rows:  0
305    :stub-columns: 0
306    :widths:       3 1 4
307
308    * - __u32
309      - ``id``
310      - A flag from :ref:`vbi-services` identifying the type of data in
311	this packet. Only a single bit must be set. When the ``id`` of a
312	captured packet is zero, the packet is empty and the contents of
313	other fields are undefined. Applications shall ignore empty
314	packets. When the ``id`` of a packet for output is zero the
315	contents of the ``data`` field are undefined and the driver must
316	no longer insert data on the requested ``field`` and ``line``.
317    * - __u32
318      - ``field``
319      - The video field number this data has been captured from, or shall
320	be inserted at. ``0`` for the first field, ``1`` for the second
321	field.
322    * - __u32
323      - ``line``
324      - The field (as opposed to frame) line number this data has been
325	captured from, or shall be inserted at. See :ref:`vbi-525` and
326	:ref:`vbi-625` for valid values. Sliced VBI capture devices can
327	set the line number of all packets to ``0`` if the hardware cannot
328	reliably identify scan lines. The field number must always be
329	valid.
330    * - __u32
331      - ``reserved``
332      - This field is reserved for future extensions. Applications and
333	drivers must set it to zero.
334    * - __u8
335      - ``data``\ [48]
336      - The packet payload. See :ref:`vbi-services` for the contents and
337	number of bytes passed for each data type. The contents of padding
338	bytes at the end of this array are undefined, drivers and
339	applications shall ignore them.
340
341Packets are always passed in ascending line number order, without
342duplicate line numbers. The :c:func:`write()` function and
343the :ref:`VIDIOC_QBUF` ioctl must return an ``EINVAL``
344error code when applications violate this rule. They must also return an
345EINVAL error code when applications pass an incorrect field or line
346number, or a combination of ``field``, ``line`` and ``id`` which has not
347been negotiated with the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` or
348:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. When the line numbers are
349unknown the driver must pass the packets in transmitted order. The
350driver can insert empty packets with ``id`` set to zero anywhere in the
351packet array.
352
353To assure synchronization and to distinguish from frame dropping, when a
354captured frame does not carry any of the requested data services drivers
355must pass one or more empty packets. When an application fails to pass
356VBI data in time for output, the driver must output the last VPS and WSS
357packet again, and disable the output of Closed Caption and Teletext
358data, or output data which is ignored by Closed Caption and Teletext
359decoders.
360
361A sliced VBI device may support :ref:`read/write <rw>` and/or
362streaming (:ref:`memory mapping <mmap>` and/or
363:ref:`user pointer <userp>`) I/O. The latter bears the possibility of
364synchronizing video and VBI data by using buffer timestamps.
365
366Sliced VBI Data in MPEG Streams
367===============================
368
369If a device can produce an MPEG output stream, it may be capable of
370providing
371:ref:`negotiated sliced VBI services <sliced-vbi-format-negotitation>`
372as data embedded in the MPEG stream. Users or applications control this
373sliced VBI data insertion with the
374:ref:`V4L2_CID_MPEG_STREAM_VBI_FMT <v4l2-mpeg-stream-vbi-fmt>`
375control.
376
377If the driver does not provide the
378:ref:`V4L2_CID_MPEG_STREAM_VBI_FMT <v4l2-mpeg-stream-vbi-fmt>`
379control, or only allows that control to be set to
380:ref:`V4L2_MPEG_STREAM_VBI_FMT_NONE <v4l2-mpeg-stream-vbi-fmt>`,
381then the device cannot embed sliced VBI data in the MPEG stream.
382
383The
384:ref:`V4L2_CID_MPEG_STREAM_VBI_FMT <v4l2-mpeg-stream-vbi-fmt>`
385control does not implicitly set the device driver to capture nor cease
386capturing sliced VBI data. The control only indicates to embed sliced
387VBI data in the MPEG stream, if an application has negotiated sliced VBI
388service be captured.
389
390It may also be the case that a device can embed sliced VBI data in only
391certain types of MPEG streams: for example in an MPEG-2 PS but not an
392MPEG-2 TS. In this situation, if sliced VBI data insertion is requested,
393the sliced VBI data will be embedded in MPEG stream types when
394supported, and silently omitted from MPEG stream types where sliced VBI
395data insertion is not supported by the device.
396
397The following subsections specify the format of the embedded sliced VBI
398data.
399
400MPEG Stream Embedded, Sliced VBI Data Format: NONE
401--------------------------------------------------
402
403The
404:ref:`V4L2_MPEG_STREAM_VBI_FMT_NONE <v4l2-mpeg-stream-vbi-fmt>`
405embedded sliced VBI format shall be interpreted by drivers as a control
406to cease embedding sliced VBI data in MPEG streams. Neither the device
407nor driver shall insert "empty" embedded sliced VBI data packets in the
408MPEG stream when this format is set. No MPEG stream data structures are
409specified for this format.
410
411MPEG Stream Embedded, Sliced VBI Data Format: IVTV
412--------------------------------------------------
413
414The
415:ref:`V4L2_MPEG_STREAM_VBI_FMT_IVTV <v4l2-mpeg-stream-vbi-fmt>`
416embedded sliced VBI format, when supported, indicates to the driver to
417embed up to 36 lines of sliced VBI data per frame in an MPEG-2 *Private
418Stream 1 PES* packet encapsulated in an MPEG-2 *Program Pack* in the
419MPEG stream.
420
421*Historical context*: This format specification originates from a
422custom, embedded, sliced VBI data format used by the ``ivtv`` driver.
423This format has already been informally specified in the kernel sources
424in the file ``Documentation/userspace-api/media/drivers/cx2341x-uapi.rst`` . The
425maximum size of the payload and other aspects of this format are driven
426by the CX23415 MPEG decoder's capabilities and limitations with respect
427to extracting, decoding, and displaying sliced VBI data embedded within
428an MPEG stream.
429
430This format's use is *not* exclusive to the ``ivtv`` driver *nor*
431exclusive to CX2341x devices, as the sliced VBI data packet insertion
432into the MPEG stream is implemented in driver software. At least the
433``cx18`` driver provides sliced VBI data insertion into an MPEG-2 PS in
434this format as well.
435
436The following definitions specify the payload of the MPEG-2 *Private
437Stream 1 PES* packets that contain sliced VBI data when
438:ref:`V4L2_MPEG_STREAM_VBI_FMT_IVTV <v4l2-mpeg-stream-vbi-fmt>`
439is set. (The MPEG-2 *Private Stream 1 PES* packet header and
440encapsulating MPEG-2 *Program Pack* header are not detailed here. Please
441refer to the MPEG-2 specifications for details on those packet headers.)
442
443The payload of the MPEG-2 *Private Stream 1 PES* packets that contain
444sliced VBI data is specified by struct
445:c:type:`v4l2_mpeg_vbi_fmt_ivtv`. The
446payload is variable length, depending on the actual number of lines of
447sliced VBI data present in a video frame. The payload may be padded at
448the end with unspecified fill bytes to align the end of the payload to a
4494-byte boundary. The payload shall never exceed 1552 bytes (2 fields
450with 18 lines/field with 43 bytes of data/line and a 4 byte magic
451number).
452
453.. c:type:: v4l2_mpeg_vbi_fmt_ivtv
454
455struct v4l2_mpeg_vbi_fmt_ivtv
456-----------------------------
457
458.. tabularcolumns:: |p{1.0cm}|p{3.8cm}|p{1.0cm}|p{11.2cm}|
459
460.. flat-table::
461    :header-rows:  0
462    :stub-columns: 0
463    :widths:       1 1 2
464
465    * - __u8
466      - ``magic``\ [4]
467      - A "magic" constant from :ref:`v4l2-mpeg-vbi-fmt-ivtv-magic` that
468	indicates this is a valid sliced VBI data payload and also
469	indicates which member of the anonymous union, ``itv0`` or
470	``ITV0``, to use for the payload data.
471    * - union {
472      - (anonymous)
473    * - struct :c:type:`v4l2_mpeg_vbi_itv0`
474      - ``itv0``
475      - The primary form of the sliced VBI data payload that contains
476	anywhere from 1 to 35 lines of sliced VBI data. Line masks are
477	provided in this form of the payload indicating which VBI lines
478	are provided.
479    * - struct :ref:`v4l2_mpeg_vbi_ITV0 <v4l2-mpeg-vbi-itv0-1>`
480      - ``ITV0``
481      - An alternate form of the sliced VBI data payload used when 36
482	lines of sliced VBI data are present. No line masks are provided
483	in this form of the payload; all valid line mask bits are
484	implcitly set.
485    * - }
486      -
487
488.. _v4l2-mpeg-vbi-fmt-ivtv-magic:
489
490Magic Constants for struct v4l2_mpeg_vbi_fmt_ivtv magic field
491-------------------------------------------------------------
492
493.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
494
495.. flat-table::
496    :header-rows:  1
497    :stub-columns: 0
498    :widths:       3 1 4
499
500    * - Defined Symbol
501      - Value
502      - Description
503    * - ``V4L2_MPEG_VBI_IVTV_MAGIC0``
504      - "itv0"
505      - Indicates the ``itv0`` member of the union in struct
506	:c:type:`v4l2_mpeg_vbi_fmt_ivtv` is
507	valid.
508    * - ``V4L2_MPEG_VBI_IVTV_MAGIC1``
509      - "ITV0"
510      - Indicates the ``ITV0`` member of the union in struct
511	:c:type:`v4l2_mpeg_vbi_fmt_ivtv` is
512	valid and that 36 lines of sliced VBI data are present.
513
514
515.. c:type:: v4l2_mpeg_vbi_itv0
516
517.. c:type:: v4l2_mpeg_vbi_ITV0
518
519structs v4l2_mpeg_vbi_itv0 and v4l2_mpeg_vbi_ITV0
520-------------------------------------------------
521
522.. tabularcolumns:: |p{5.2cm}|p{2.4cm}|p{9.9cm}|
523
524.. flat-table::
525    :header-rows:  0
526    :stub-columns: 0
527    :widths:       1 1 2
528
529    * - __le32
530      - ``linemask``\ [2]
531      - Bitmasks indicating the VBI service lines present. These
532	``linemask`` values are stored in little endian byte order in the
533	MPEG stream. Some reference ``linemask`` bit positions with their
534	corresponding VBI line number and video field are given below.
535	b\ :sub:`0` indicates the least significant bit of a ``linemask``
536	value:
537
538
539	::
540
541	    linemask[0] b0:     line  6  first field
542	    linemask[0] b17:    line 23  first field
543	    linemask[0] b18:    line  6  second field
544	    linemask[0] b31:    line 19  second field
545	    linemask[1] b0:     line 20  second field
546	    linemask[1] b3:     line 23  second field
547	    linemask[1] b4-b31: unused and set to 0
548    * - struct
549	:c:type:`v4l2_mpeg_vbi_itv0_line`
550      - ``line``\ [35]
551      - This is a variable length array that holds from 1 to 35 lines of
552	sliced VBI data. The sliced VBI data lines present correspond to
553	the bits set in the ``linemask`` array, starting from b\ :sub:`0`
554	of ``linemask``\ [0] up through b\ :sub:`31` of ``linemask``\ [0],
555	and from b\ :sub:`0` of ``linemask``\ [1] up through b\ :sub:`3` of
556	``linemask``\ [1]. ``line``\ [0] corresponds to the first bit
557	found set in the ``linemask`` array, ``line``\ [1] corresponds to
558	the second bit found set in the ``linemask`` array, etc. If no
559	``linemask`` array bits are set, then ``line``\ [0] may contain
560	one line of unspecified data that should be ignored by
561	applications.
562
563
564.. _v4l2-mpeg-vbi-itv0-1:
565
566struct v4l2_mpeg_vbi_ITV0
567-------------------------
568
569.. tabularcolumns:: |p{5.2cm}|p{2.4cm}|p{9.9cm}|
570
571.. flat-table::
572    :header-rows:  0
573    :stub-columns: 0
574    :widths:       1 1 2
575
576    * - struct
577	:c:type:`v4l2_mpeg_vbi_itv0_line`
578      - ``line``\ [36]
579      - A fixed length array of 36 lines of sliced VBI data. ``line``\ [0]
580	through ``line``\ [17] correspond to lines 6 through 23 of the
581	first field. ``line``\ [18] through ``line``\ [35] corresponds to
582	lines 6 through 23 of the second field.
583
584
585.. c:type:: v4l2_mpeg_vbi_itv0_line
586
587struct v4l2_mpeg_vbi_itv0_line
588------------------------------
589
590.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
591
592.. flat-table::
593    :header-rows:  0
594    :stub-columns: 0
595    :widths:       1 1 2
596
597    * - __u8
598      - ``id``
599      - A line identifier value from
600	:ref:`ITV0-Line-Identifier-Constants` that indicates the type of
601	sliced VBI data stored on this line.
602    * - __u8
603      - ``data``\ [42]
604      - The sliced VBI data for the line.
605
606
607.. _ITV0-Line-Identifier-Constants:
608
609Line Identifiers for struct v4l2_mpeg_vbi_itv0_line id field
610------------------------------------------------------------
611
612.. tabularcolumns:: |p{7.0cm}|p{1.8cm}|p{8.7cm}|
613
614.. flat-table::
615    :header-rows:  1
616    :stub-columns: 0
617    :widths:       3 1 4
618
619    * - Defined Symbol
620      - Value
621      - Description
622    * - ``V4L2_MPEG_VBI_IVTV_TELETEXT_B``
623      - 1
624      - Refer to :ref:`Sliced VBI services <vbi-services2>` for a
625	description of the line payload.
626    * - ``V4L2_MPEG_VBI_IVTV_CAPTION_525``
627      - 4
628      - Refer to :ref:`Sliced VBI services <vbi-services2>` for a
629	description of the line payload.
630    * - ``V4L2_MPEG_VBI_IVTV_WSS_625``
631      - 5
632      - Refer to :ref:`Sliced VBI services <vbi-services2>` for a
633	description of the line payload.
634    * - ``V4L2_MPEG_VBI_IVTV_VPS``
635      - 7
636      - Refer to :ref:`Sliced VBI services <vbi-services2>` for a
637	description of the line payload.
638
639
640.. [#f1]
641   According to :ref:`ETS 300 706 <ets300706>` lines 6-22 of the first
642   field and lines 5-22 of the second field may carry Teletext data.
643
644.. [#f2]
645   See also :ref:`vbi-525` and :ref:`vbi-625`.
646