^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) .. _VIDIOC_G_SLICED_VBI_CAP:
^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) ioctl VIDIOC_G_SLICED_VBI_CAP
^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) Name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) ====
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) VIDIOC_G_SLICED_VBI_CAP - Query sliced VBI capabilities
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) Synopsis
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) .. c:macro:: VIDIOC_G_SLICED_VBI_CAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) ``int ioctl(int fd, VIDIOC_G_SLICED_VBI_CAP, struct v4l2_sliced_vbi_cap *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) Arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) ``fd``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) File descriptor returned by :c:func:`open()`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) ``argp``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) Pointer to struct :c:type:`v4l2_sliced_vbi_cap`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) Description
^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) To find out which data services are supported by a sliced VBI capture or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) output device, applications initialize the ``type`` field of a struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) :c:type:`v4l2_sliced_vbi_cap`, clear the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) ``reserved`` array and call the :ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) driver fills in the remaining fields or returns an ``EINVAL`` error code if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) the sliced VBI API is unsupported or ``type`` is invalid.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) .. note::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) The ``type`` field was added, and the ioctl changed from read-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) to write-read, in Linux 2.6.19.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) .. c:type:: v4l2_sliced_vbi_cap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) .. tabularcolumns:: |p{1.2cm}|p{4.2cm}|p{4.1cm}|p{4.0cm}|p{4.0cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) .. flat-table:: struct v4l2_sliced_vbi_cap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) :header-rows: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) :widths: 3 3 2 2 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) * - __u16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) - ``service_set``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) - :cspan:`2` A set of all data services supported by the driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) Equal to the union of all elements of the ``service_lines`` array.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) * - __u16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) - ``service_lines``\ [2][24]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) - :cspan:`2` Each element of this array contains a set of data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) services the hardware can look for or insert into a particular
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) scan line. Data services are defined in :ref:`vbi-services`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) Array indices map to ITU-R line numbers\ [#f1]_ as follows:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) * -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) - Element
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) - 525 line systems
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) - 625 line systems
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) * -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) - ``service_lines``\ [0][1]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) * -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) - ``service_lines``\ [0][23]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) - 23
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) - 23
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) * -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) - ``service_lines``\ [1][1]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) - 264
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) - 314
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) * -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) - ``service_lines``\ [1][23]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) - 286
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) - 336
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) * -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) * -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) - :cspan:`2` The number of VBI lines the hardware can capture or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) output per frame, or the number of services it can identify on a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) given line may be limited. For example on PAL line 16 the hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) may be able to look for a VPS or Teletext signal, but not both at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) the same time. Applications can learn about these limits using the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl as described in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) :ref:`sliced`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) * -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) * -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) - :cspan:`2` Drivers must set ``service_lines`` [0][0] and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) ``service_lines``\ [1][0] to zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) - ``type``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) - Type of the data stream, see :c:type:`v4l2_buf_type`. Should be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) - ``reserved``\ [3]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) - :cspan:`2` This array is reserved for future extensions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) Applications and drivers must set it to zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) .. [#f1]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) See also :ref:`vbi-525` and :ref:`vbi-625`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) .. raw:: latex
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) \scriptsize
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) .. tabularcolumns:: |p{3.5cm}|p{1.0cm}|p{2.0cm}|p{2.0cm}|p{8.0cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) .. _vbi-services:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) .. flat-table:: Sliced VBI services
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) :header-rows: 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) :widths: 2 1 1 2 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) * - Symbol
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) - Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) - Reference
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) - Lines, usually
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) - Payload
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) * - ``V4L2_SLICED_TELETEXT_B`` (Teletext System B)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) - 0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) - :ref:`ets300706`,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) :ref:`itu653`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) - PAL/SECAM line 7-22, 320-335 (second field 7-22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) - Last 42 of the 45 byte Teletext packet, that is without clock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) run-in and framing code, lsb first transmitted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) * - ``V4L2_SLICED_VPS``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) - 0x0400
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) - :ref:`ets300231`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) - PAL line 16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) - Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) first transmitted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) * - ``V4L2_SLICED_CAPTION_525``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) - 0x1000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) - :ref:`cea608`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) - NTSC line 21, 284 (second field 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) - Two bytes in transmission order, including parity bit, lsb first
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) transmitted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) * - ``V4L2_SLICED_WSS_625``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) - 0x4000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) - :ref:`en300294`,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) :ref:`itu1119`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) - PAL/SECAM line 23
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) Byte 0 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) msb lsb msb lsb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 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 172) * - ``V4L2_SLICED_VBI_525``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) - 0x1000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) - :cspan:`2` Set of services applicable to 525 line systems.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) * - ``V4L2_SLICED_VBI_625``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) - 0x4401
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) - :cspan:`2` Set of services applicable to 625 line systems.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) .. raw:: latex
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) \normalsize
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) Return Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) :ref:`Generic Error Codes <gen-errors>` chapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) EINVAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) The value in the ``type`` field is wrong.