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_ENUM_FREQ_BANDS:
^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_ENUM_FREQ_BANDS
^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_ENUM_FREQ_BANDS - Enumerate supported frequency bands
^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_ENUM_FREQ_BANDS
^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_ENUM_FREQ_BANDS, struct v4l2_frequency_band *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_frequency_band`.
^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) Enumerates the frequency bands that a tuner or modulator supports. To do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) this applications initialize the ``tuner``, ``type`` and ``index``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) fields, and zero out the ``reserved`` array of a struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) :c:type:`v4l2_frequency_band` and call the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) :ref:`VIDIOC_ENUM_FREQ_BANDS` ioctl with a pointer to this structure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) This ioctl is supported if the ``V4L2_TUNER_CAP_FREQ_BANDS`` capability
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) of the corresponding tuner/modulator is set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) .. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) .. c:type:: v4l2_frequency_band
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) .. flat-table:: struct v4l2_frequency_band
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50)     :widths:       1 1 2 1 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53)       - ``tuner``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)       - The tuner or modulator index number. This is the same value as in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	the struct :c:type:`v4l2_input` ``tuner`` field and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	the struct :c:type:`v4l2_tuner` ``index`` field, or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	the struct :c:type:`v4l2_output` ``modulator`` field
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	and the struct :c:type:`v4l2_modulator` ``index``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	field.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61)       - ``type``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62)       - The tuner type. This is the same value as in the struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	:c:type:`v4l2_tuner` ``type`` field. The type must be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	``V4L2_TUNER_RADIO`` for modulators (currently only radio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	modulators are supported). See :c:type:`v4l2_tuner_type`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69)       - ``index``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70)       - Identifies the frequency band, set by the application.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)       - ``capability``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)       - :cspan:`2` The tuner/modulator capability flags for this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	frequency band, see :ref:`tuner-capability`. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	``V4L2_TUNER_CAP_LOW`` or ``V4L2_TUNER_CAP_1HZ`` capability must
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	be the same for all frequency bands of the selected
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	tuner/modulator. So either all bands have that capability set, or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	none of them have that capability.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80)       - ``rangelow``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81)       - :cspan:`2` The lowest tunable frequency in units of 62.5 kHz, or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	of 62.5 Hz, for this frequency band. A 1 Hz unit is used when the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86)       - ``rangehigh``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87)       - :cspan:`2` The highest tunable frequency in units of 62.5 kHz,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	or if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	units of 62.5 Hz, for this frequency band. A 1 Hz unit is used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)       - ``modulation``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)       - :cspan:`2` The supported modulation systems of this frequency
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	band. See :ref:`band-modulation`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	.. note::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	   Currently only one modulation system per frequency band
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	   is supported. More work will need to be done if multiple
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	   modulation systems are possible. Contact the linux-media
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	   mailing list
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	   (`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	   if you need such functionality.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)       - ``reserved``\ [9]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)       - Reserved for future extensions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	Applications and drivers must set the array to zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) .. _band-modulation:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) .. flat-table:: Band Modulation Systems
^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 1 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)     * - ``V4L2_BAND_MODULATION_VSB``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)       - 0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)       - Vestigial Sideband modulation, used for analog TV.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)     * - ``V4L2_BAND_MODULATION_FM``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)       - 0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)       - Frequency Modulation, commonly used for analog radio.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)     * - ``V4L2_BAND_MODULATION_AM``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)       - 0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)       - Amplitude Modulation, commonly used for analog radio.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) Return Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) :ref:`Generic Error Codes <gen-errors>` chapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) EINVAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)     The ``tuner`` or ``index`` is out of bounds or the ``type`` field is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)     wrong.