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