1 .. SPDX-License-Identifier: GFDL-1.1-no-invari !! 1 .. Permission is granted to copy, distribute and/or modify this 2 .. c:namespace:: V4L !! 2 .. document under the terms of the GNU Free Documentation License, >> 3 .. Version 1.1 or any later version published by the Free Software >> 4 .. Foundation, with no Invariant Sections, no Front-Cover Texts >> 5 .. and no Back-Cover Texts. A copy of the license is included at >> 6 .. Documentation/userspace-api/media/fdl-appendix.rst. >> 7 .. >> 8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections 3 9 4 .. _VIDIOC_ENUM_FREQ_BANDS: 10 .. _VIDIOC_ENUM_FREQ_BANDS: 5 11 6 **************************** 12 **************************** 7 ioctl VIDIOC_ENUM_FREQ_BANDS 13 ioctl VIDIOC_ENUM_FREQ_BANDS 8 **************************** 14 **************************** 9 15 10 Name 16 Name 11 ==== 17 ==== 12 18 13 VIDIOC_ENUM_FREQ_BANDS - Enumerate supported f 19 VIDIOC_ENUM_FREQ_BANDS - Enumerate supported frequency bands 14 20 >> 21 15 Synopsis 22 Synopsis 16 ======== 23 ======== 17 24 18 .. c:macro:: VIDIOC_ENUM_FREQ_BANDS !! 25 .. c:function:: int ioctl( int fd, VIDIOC_ENUM_FREQ_BANDS, struct v4l2_frequency_band *argp ) >> 26 :name: VIDIOC_ENUM_FREQ_BANDS 19 27 20 ``int ioctl(int fd, VIDIOC_ENUM_FREQ_BANDS, st << 21 28 22 Arguments 29 Arguments 23 ========= 30 ========= 24 31 25 ``fd`` 32 ``fd`` 26 File descriptor returned by :c:func:`open( !! 33 File descriptor returned by :ref:`open() <func-open>`. 27 34 28 ``argp`` 35 ``argp`` 29 Pointer to struct :c:type:`v4l2_frequency_ 36 Pointer to struct :c:type:`v4l2_frequency_band`. 30 37 >> 38 31 Description 39 Description 32 =========== 40 =========== 33 41 34 Enumerates the frequency bands that a tuner or 42 Enumerates the frequency bands that a tuner or modulator supports. To do 35 this applications initialize the ``tuner``, `` 43 this applications initialize the ``tuner``, ``type`` and ``index`` 36 fields, and zero out the ``reserved`` array of 44 fields, and zero out the ``reserved`` array of a struct 37 :c:type:`v4l2_frequency_band` and call the 45 :c:type:`v4l2_frequency_band` and call the 38 :ref:`VIDIOC_ENUM_FREQ_BANDS` ioctl with a poi 46 :ref:`VIDIOC_ENUM_FREQ_BANDS` ioctl with a pointer to this structure. 39 47 40 This ioctl is supported if the ``V4L2_TUNER_CA 48 This ioctl is supported if the ``V4L2_TUNER_CAP_FREQ_BANDS`` capability 41 of the corresponding tuner/modulator is set. 49 of the corresponding tuner/modulator is set. 42 50 43 .. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm !! 51 >> 52 .. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}| 44 53 45 .. c:type:: v4l2_frequency_band 54 .. c:type:: v4l2_frequency_band 46 55 47 .. flat-table:: struct v4l2_frequency_band 56 .. flat-table:: struct v4l2_frequency_band 48 :header-rows: 0 57 :header-rows: 0 49 :stub-columns: 0 58 :stub-columns: 0 50 :widths: 1 1 2 1 1 59 :widths: 1 1 2 1 1 51 60 52 * - __u32 61 * - __u32 53 - ``tuner`` 62 - ``tuner`` 54 - The tuner or modulator index number. T 63 - The tuner or modulator index number. This is the same value as in 55 the struct :c:type:`v4l2_input` ``tune 64 the struct :c:type:`v4l2_input` ``tuner`` field and 56 the struct :c:type:`v4l2_tuner` ``inde 65 the struct :c:type:`v4l2_tuner` ``index`` field, or 57 the struct :c:type:`v4l2_output` ``mod 66 the struct :c:type:`v4l2_output` ``modulator`` field 58 and the struct :c:type:`v4l2_modulator 67 and the struct :c:type:`v4l2_modulator` ``index`` 59 field. 68 field. 60 * - __u32 69 * - __u32 61 - ``type`` 70 - ``type`` 62 - The tuner type. This is the same value 71 - The tuner type. This is the same value as in the struct 63 :c:type:`v4l2_tuner` ``type`` field. T 72 :c:type:`v4l2_tuner` ``type`` field. The type must be 64 set to ``V4L2_TUNER_RADIO`` for ``/dev 73 set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and 65 to ``V4L2_TUNER_ANALOG_TV`` for all ot 74 to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to 66 ``V4L2_TUNER_RADIO`` for modulators (c 75 ``V4L2_TUNER_RADIO`` for modulators (currently only radio 67 modulators are supported). See :c:type 76 modulators are supported). See :c:type:`v4l2_tuner_type` 68 * - __u32 77 * - __u32 69 - ``index`` 78 - ``index`` 70 - Identifies the frequency band, set by 79 - Identifies the frequency band, set by the application. 71 * - __u32 80 * - __u32 72 - ``capability`` 81 - ``capability`` 73 - :cspan:`2` The tuner/modulator capabil 82 - :cspan:`2` The tuner/modulator capability flags for this 74 frequency band, see :ref:`tuner-capabi 83 frequency band, see :ref:`tuner-capability`. The 75 ``V4L2_TUNER_CAP_LOW`` or ``V4L2_TUNER 84 ``V4L2_TUNER_CAP_LOW`` or ``V4L2_TUNER_CAP_1HZ`` capability must 76 be the same for all frequency bands of 85 be the same for all frequency bands of the selected 77 tuner/modulator. So either all bands h 86 tuner/modulator. So either all bands have that capability set, or 78 none of them have that capability. 87 none of them have that capability. 79 * - __u32 88 * - __u32 80 - ``rangelow`` 89 - ``rangelow`` 81 - :cspan:`2` The lowest tunable frequenc 90 - :cspan:`2` The lowest tunable frequency in units of 62.5 kHz, or 82 if the ``capability`` flag ``V4L2_TUNE 91 if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units 83 of 62.5 Hz, for this frequency band. A 92 of 62.5 Hz, for this frequency band. A 1 Hz unit is used when the 84 ``capability`` flag ``V4L2_TUNER_CAP_1 93 ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set. 85 * - __u32 94 * - __u32 86 - ``rangehigh`` 95 - ``rangehigh`` 87 - :cspan:`2` The highest tunable frequen 96 - :cspan:`2` The highest tunable frequency in units of 62.5 kHz, 88 or if the ``capability`` flag ``V4L2_T 97 or if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in 89 units of 62.5 Hz, for this frequency b 98 units of 62.5 Hz, for this frequency band. A 1 Hz unit is used 90 when the ``capability`` flag ``V4L2_TU 99 when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set. 91 * - __u32 100 * - __u32 92 - ``modulation`` 101 - ``modulation`` 93 - :cspan:`2` The supported modulation sy 102 - :cspan:`2` The supported modulation systems of this frequency 94 band. See :ref:`band-modulation`. 103 band. See :ref:`band-modulation`. 95 104 96 .. note:: 105 .. note:: 97 106 98 Currently only one modulation syste 107 Currently only one modulation system per frequency band 99 is supported. More work will need t 108 is supported. More work will need to be done if multiple 100 modulation systems are possible. Co 109 modulation systems are possible. Contact the linux-media 101 mailing list 110 mailing list 102 (`https://linuxtv.org/lists.php <ht 111 (`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__) 103 if you need such functionality. 112 if you need such functionality. 104 * - __u32 113 * - __u32 105 - ``reserved``\ [9] 114 - ``reserved``\ [9] 106 - Reserved for future extensions. 115 - Reserved for future extensions. 107 116 108 Applications and drivers must set the 117 Applications and drivers must set the array to zero. 109 118 110 119 111 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.5cm !! 120 >> 121 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 112 122 113 .. _band-modulation: 123 .. _band-modulation: 114 124 115 .. flat-table:: Band Modulation Systems 125 .. flat-table:: Band Modulation Systems 116 :header-rows: 0 126 :header-rows: 0 117 :stub-columns: 0 127 :stub-columns: 0 118 :widths: 3 1 4 128 :widths: 3 1 4 119 129 120 * - ``V4L2_BAND_MODULATION_VSB`` 130 * - ``V4L2_BAND_MODULATION_VSB`` 121 - 0x02 131 - 0x02 122 - Vestigial Sideband modulation, used fo 132 - Vestigial Sideband modulation, used for analog TV. 123 * - ``V4L2_BAND_MODULATION_FM`` 133 * - ``V4L2_BAND_MODULATION_FM`` 124 - 0x04 134 - 0x04 125 - Frequency Modulation, commonly used fo 135 - Frequency Modulation, commonly used for analog radio. 126 * - ``V4L2_BAND_MODULATION_AM`` 136 * - ``V4L2_BAND_MODULATION_AM`` 127 - 0x08 137 - 0x08 128 - Amplitude Modulation, commonly used fo 138 - Amplitude Modulation, commonly used for analog radio. >> 139 129 140 130 Return Value 141 Return Value 131 ============ 142 ============ 132 143 133 On success 0 is returned, on error -1 and the 144 On success 0 is returned, on error -1 and the ``errno`` variable is set 134 appropriately. The generic error codes are des 145 appropriately. The generic error codes are described at the 135 :ref:`Generic Error Codes <gen-errors>` chapte 146 :ref:`Generic Error Codes <gen-errors>` chapter. 136 147 137 EINVAL 148 EINVAL 138 The ``tuner`` or ``index`` is out of bound 149 The ``tuner`` or ``index`` is out of bounds or the ``type`` field is 139 wrong. 150 wrong.
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.