Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^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_ENUMSTD:
^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_ENUMSTD, VIDIOC_SUBDEV_ENUMSTD
^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_ENUMSTD - VIDIOC_SUBDEV_ENUMSTD - Enumerate supported video standards
^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_ENUMSTD
^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_ENUMSTD, struct v4l2_standard *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) .. c:macro:: VIDIOC_SUBDEV_ENUMSTD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) ``int ioctl(int fd, VIDIOC_SUBDEV_ENUMSTD, struct v4l2_standard *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) Arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) ``fd``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30)     File descriptor returned by :c:func:`open()`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) ``argp``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33)     Pointer to struct :c:type:`v4l2_standard`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) To query the attributes of a video standard, especially a custom (driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) defined) one, applications initialize the ``index`` field of struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) :c:type:`v4l2_standard` and call the :ref:`VIDIOC_ENUMSTD`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) ioctl with a pointer to this structure. Drivers fill the rest of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) structure or return an ``EINVAL`` error code when the index is out of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) bounds. To enumerate all standards applications shall begin at index
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) zero, incrementing by one until the driver returns ``EINVAL``. Drivers may
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) enumerate a different set of standards after switching the video input
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) or output. [#f1]_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) .. c:type:: v4l2_standard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) .. flat-table:: struct v4l2_standard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55)     :widths:       1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58)       - ``index``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59)       - Number of the video standard, set by the application.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60)     * - :ref:`v4l2_std_id <v4l2-std-id>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61)       - ``id``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62)       - The bits in this field identify the standard as one of the common
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	standards listed in :ref:`v4l2-std-id`, or if bits 32 to 63 are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	set as custom standards. Multiple bits can be set if the hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	does not distinguish between these standards, however separate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	indices do not indicate the opposite. The ``id`` must be unique.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	No other enumerated struct :c:type:`v4l2_standard` structure,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	for this input or output anyway, can contain the same set of bits.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69)     * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70)       - ``name``\ [24]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71)       - Name of the standard, a NUL-terminated ASCII string, for example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	"PAL-B/G", "NTSC Japan". This information is intended for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	user.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)     * - struct :c:type:`v4l2_fract`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)       - ``frameperiod``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)       - The frame period (not field period) is numerator / denominator.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	For example M/NTSC has a frame period of 1001 / 30000 seconds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79)       - ``framelines``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80)       - Total lines per frame including blanking, e. g. 625 for B/PAL.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82)       - ``reserved``\ [4]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83)       - Reserved for future extensions. Drivers must set the array to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) .. c:type:: v4l2_fract
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) .. flat-table:: struct v4l2_fract
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94)     :widths:       1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97)       - ``numerator``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98)       -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)       - ``denominator``
^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) .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) .. _v4l2-std-id:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) .. flat-table:: typedef v4l2_std_id
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)     :widths:       1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)     * - __u64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)       - ``v4l2_std_id``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)       - This type is a set, each bit representing another video standard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	as listed below and in :ref:`video-standards`. The 32 most
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	significant bits are reserved for custom (driver defined) video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	standards.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) .. code-block:: c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)     #define V4L2_STD_PAL_B          ((v4l2_std_id)0x00000001)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)     #define V4L2_STD_PAL_B1         ((v4l2_std_id)0x00000002)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)     #define V4L2_STD_PAL_G          ((v4l2_std_id)0x00000004)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)     #define V4L2_STD_PAL_H          ((v4l2_std_id)0x00000008)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)     #define V4L2_STD_PAL_I          ((v4l2_std_id)0x00000010)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)     #define V4L2_STD_PAL_D          ((v4l2_std_id)0x00000020)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)     #define V4L2_STD_PAL_D1         ((v4l2_std_id)0x00000040)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)     #define V4L2_STD_PAL_K          ((v4l2_std_id)0x00000080)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)     #define V4L2_STD_PAL_M          ((v4l2_std_id)0x00000100)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)     #define V4L2_STD_PAL_N          ((v4l2_std_id)0x00000200)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)     #define V4L2_STD_PAL_Nc         ((v4l2_std_id)0x00000400)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)     #define V4L2_STD_PAL_60         ((v4l2_std_id)0x00000800)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) ``V4L2_STD_PAL_60`` is a hybrid standard with 525 lines, 60 Hz refresh
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) rate, and PAL color modulation with a 4.43 MHz color subcarrier. Some
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) PAL video recorders can play back NTSC tapes in this mode for display on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) a 50/60 Hz agnostic PAL TV.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) .. code-block:: c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)     #define V4L2_STD_NTSC_M         ((v4l2_std_id)0x00001000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)     #define V4L2_STD_NTSC_M_JP      ((v4l2_std_id)0x00002000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)     #define V4L2_STD_NTSC_443       ((v4l2_std_id)0x00004000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) ``V4L2_STD_NTSC_443`` is a hybrid standard with 525 lines, 60 Hz refresh
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) rate, and NTSC color modulation with a 4.43 MHz color subcarrier.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) .. code-block:: c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)     #define V4L2_STD_NTSC_M_KR      ((v4l2_std_id)0x00008000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)     #define V4L2_STD_SECAM_B        ((v4l2_std_id)0x00010000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155)     #define V4L2_STD_SECAM_D        ((v4l2_std_id)0x00020000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)     #define V4L2_STD_SECAM_G        ((v4l2_std_id)0x00040000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)     #define V4L2_STD_SECAM_H        ((v4l2_std_id)0x00080000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)     #define V4L2_STD_SECAM_K        ((v4l2_std_id)0x00100000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)     #define V4L2_STD_SECAM_K1       ((v4l2_std_id)0x00200000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)     #define V4L2_STD_SECAM_L        ((v4l2_std_id)0x00400000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161)     #define V4L2_STD_SECAM_LC       ((v4l2_std_id)0x00800000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)     /* ATSC/HDTV */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)     #define V4L2_STD_ATSC_8_VSB     ((v4l2_std_id)0x01000000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)     #define V4L2_STD_ATSC_16_VSB    ((v4l2_std_id)0x02000000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) ``V4L2_STD_ATSC_8_VSB`` and ``V4L2_STD_ATSC_16_VSB`` are U.S.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) terrestrial digital TV standards. Presently the V4L2 API does not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) support digital TV. See also the Linux DVB API at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) `https://linuxtv.org <https://linuxtv.org>`__.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) .. code-block:: c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)     #define V4L2_STD_PAL_BG         (V4L2_STD_PAL_B         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 		     V4L2_STD_PAL_B1        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 		     V4L2_STD_PAL_G)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)     #define V4L2_STD_B              (V4L2_STD_PAL_B         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 		     V4L2_STD_PAL_B1        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 		     V4L2_STD_SECAM_B)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)     #define V4L2_STD_GH             (V4L2_STD_PAL_G         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 		     V4L2_STD_PAL_H         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 		     V4L2_STD_SECAM_G       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 		     V4L2_STD_SECAM_H)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)     #define V4L2_STD_PAL_DK         (V4L2_STD_PAL_D         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		     V4L2_STD_PAL_D1        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 		     V4L2_STD_PAL_K)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)     #define V4L2_STD_PAL            (V4L2_STD_PAL_BG        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 		     V4L2_STD_PAL_DK        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 		     V4L2_STD_PAL_H         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 		     V4L2_STD_PAL_I)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191)     #define V4L2_STD_NTSC           (V4L2_STD_NTSC_M        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 		     V4L2_STD_NTSC_M_JP     |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 		     V4L2_STD_NTSC_M_KR)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)     #define V4L2_STD_MN             (V4L2_STD_PAL_M         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 		     V4L2_STD_PAL_N         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 		     V4L2_STD_PAL_Nc        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 		     V4L2_STD_NTSC)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)     #define V4L2_STD_SECAM_DK       (V4L2_STD_SECAM_D       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 		     V4L2_STD_SECAM_K       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 		     V4L2_STD_SECAM_K1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)     #define V4L2_STD_DK             (V4L2_STD_PAL_DK        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 		     V4L2_STD_SECAM_DK)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)     #define V4L2_STD_SECAM          (V4L2_STD_SECAM_B       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 		     V4L2_STD_SECAM_G       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 		     V4L2_STD_SECAM_H       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 		     V4L2_STD_SECAM_DK      |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 		     V4L2_STD_SECAM_L       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 		     V4L2_STD_SECAM_LC)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)     #define V4L2_STD_525_60         (V4L2_STD_PAL_M         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 		     V4L2_STD_PAL_60        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 		     V4L2_STD_NTSC          |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 		     V4L2_STD_NTSC_443)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215)     #define V4L2_STD_625_50         (V4L2_STD_PAL           |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 		     V4L2_STD_PAL_N         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 		     V4L2_STD_PAL_Nc        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 		     V4L2_STD_SECAM)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)     #define V4L2_STD_UNKNOWN        0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)     #define V4L2_STD_ALL            (V4L2_STD_525_60        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 		     V4L2_STD_625_50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) .. raw:: latex
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226)     \begingroup
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)     \tiny
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228)     \setlength{\tabcolsep}{2pt}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) ..                            NTSC/M   PAL/M    /N       /B       /D       /H       /I        SECAM/B    /D       /K1     /L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) .. tabularcolumns:: |p{1.43cm}|p{1.38cm}|p{1.59cm}|p{1.7cm}|p{1.7cm}|p{1.17cm}|p{0.64cm}|p{1.71cm}|p{1.6cm}|p{1.07cm}|p{1.07cm}|p{1.07cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) .. _video-standards:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) .. flat-table:: Video Standards (based on :ref:`itu470`)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236)     :header-rows:  1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239)     * - Characteristics
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240)       - M/NTSC [#f2]_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)       - M/PAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)       - N/PAL [#f3]_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243)       - B, B1, G/PAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244)       - D, D1, K/PAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245)       - H/PAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246)       - I/PAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)       - B, G/SECAM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248)       - D, K/SECAM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249)       - K1/SECAM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250)       - L/SECAM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)     * - Frame lines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252)       - :cspan:`1` 525
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)       - :cspan:`8` 625
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254)     * - Frame period (s)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255)       - :cspan:`1` 1001/30000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)       - :cspan:`8` 1/25
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257)     * - Chrominance sub-carrier frequency (Hz)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)       - 3579545 ± 10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)       - 3579611.49 ± 10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260)       - 4433618.75 ± 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 	(3582056.25 ± 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263)       - :cspan:`3` 4433618.75 ± 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264)       - 4433618.75 ± 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265)       - :cspan:`2` f\ :sub:`OR` = 4406250 ± 2000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 	f\ :sub:`OB` = 4250000 ± 2000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268)     * - Nominal radio-frequency channel bandwidth (MHz)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269)       - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270)       - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271)       - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272)       - B: 7; B1, G: 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273)       - 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274)       - 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275)       - 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276)       - 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277)       - 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278)       - 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279)       - 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280)     * - Sound carrier relative to vision carrier (MHz)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281)       - 4.5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282)       - 4.5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283)       - 4.5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284)       - 5.5 ± 0.001  [#f4]_  [#f5]_  [#f6]_  [#f7]_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285)       - 6.5 ± 0.001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286)       - 5.5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287)       - 5.9996 ± 0.0005
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288)       - 5.5 ± 0.001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289)       - 6.5 ± 0.001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290)       - 6.5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291)       - 6.5 [#f8]_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) .. raw:: latex
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295)     \endgroup
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) Return Value
^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) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) :ref:`Generic Error Codes <gen-errors>` chapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) EINVAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306)     The struct :c:type:`v4l2_standard` ``index`` is out
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307)     of bounds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) ENODATA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310)     Standard video timings are not supported for this input or output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) .. [#f1]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313)    The supported standards may overlap and we need an unambiguous set to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314)    find the current standard returned by :ref:`VIDIOC_G_STD <VIDIOC_G_STD>`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) .. [#f2]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317)    Japan uses a standard similar to M/NTSC (V4L2_STD_NTSC_M_JP).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) .. [#f3]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320)    The values in brackets apply to the combination N/PAL a.k.a.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321)    N\ :sub:`C` used in Argentina (V4L2_STD_PAL_Nc).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) .. [#f4]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324)    In the Federal Republic of Germany, Austria, Italy, the Netherlands,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325)    Slovakia and Switzerland a system of two sound carriers is used, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326)    frequency of the second carrier being 242.1875 kHz above the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327)    frequency of the first sound carrier. For stereophonic sound
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328)    transmissions a similar system is used in Australia.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) .. [#f5]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331)    New Zealand uses a sound carrier displaced 5.4996 ± 0.0005 MHz from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332)    the vision carrier.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) .. [#f6]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335)    In Denmark, Finland, New Zealand, Sweden and Spain a system of two
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336)    sound carriers is used. In Iceland, Norway and Poland the same system
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337)    is being introduced. The second carrier is 5.85 MHz above the vision
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338)    carrier and is DQPSK modulated with 728 kbit/s sound and data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339)    multiplex. (NICAM system)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) .. [#f7]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342)    In the United Kingdom, a system of two sound carriers is used. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343)    second sound carrier is 6.552 MHz above the vision carrier and is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344)    DQPSK modulated with a 728 kbit/s sound and data multiplex able to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345)    carry two sound channels. (NICAM system)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) .. [#f8]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348)    In France, a digital carrier 5.85 MHz away from the vision carrier
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349)    may be used in addition to the main sound carrier. It is modulated in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350)    differentially encoded QPSK with a 728 kbit/s sound and data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351)    multiplexer capable of carrying two sound channels. (NICAM system)