1 .. -*- coding: utf-8; mode: rst -*-
3 .. _VIDIOC_ENUM_FREQ_BANDS:
5 ****************************
6 ioctl VIDIOC_ENUM_FREQ_BANDS
7 ****************************
9 *man VIDIOC_ENUM_FREQ_BANDS(2)*
11 Enumerate supported frequency bands
17 .. c:function:: int ioctl( int fd, int request, struct v4l2_frequency_band *argp )
23 File descriptor returned by :ref:`open() <func-open>`.
26 VIDIOC_ENUM_FREQ_BANDS
34 Enumerates the frequency bands that a tuner or modulator supports. To do
35 this applications initialize the ``tuner``, ``type`` and ``index``
36 fields, and zero out the ``reserved`` array of a struct
37 :ref:`v4l2_frequency_band <v4l2-frequency-band>` and call the
38 :ref:`VIDIOC_ENUM_FREQ_BANDS` ioctl with a pointer to this structure.
40 This ioctl is supported if the ``V4L2_TUNER_CAP_FREQ_BANDS`` capability
41 of the corresponding tuner/modulator is set.
44 .. _v4l2-frequency-band:
46 .. flat-table:: struct v4l2_frequency_band
58 - The tuner or modulator index number. This is the same value as in
59 the struct :ref:`v4l2_input <v4l2-input>` ``tuner`` field and
60 the struct :ref:`v4l2_tuner <v4l2-tuner>` ``index`` field, or
61 the struct :ref:`v4l2_output <v4l2-output>` ``modulator`` field
62 and the struct :ref:`v4l2_modulator <v4l2-modulator>` ``index``
71 - The tuner type. This is the same value as in the struct
72 :ref:`v4l2_tuner <v4l2-tuner>` ``type`` field. The type must be
73 set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and
74 to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to
75 ``V4L2_TUNER_RADIO`` for modulators (currently only radio
76 modulators are supported). See :ref:`v4l2-tuner-type`
84 - Identifies the frequency band, set by the application.
92 - :cspan:`2` The tuner/modulator capability flags for this
93 frequency band, see :ref:`tuner-capability`. The
94 ``V4L2_TUNER_CAP_LOW`` or ``V4L2_TUNER_CAP_1HZ`` capability must
95 be the same for all frequency bands of the selected
96 tuner/modulator. So either all bands have that capability set, or
97 none of them have that capability.
105 - :cspan:`2` The lowest tunable frequency in units of 62.5 kHz, or
106 if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units
107 of 62.5 Hz, for this frequency band. A 1 Hz unit is used when the
108 ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.
116 - :cspan:`2` The highest tunable frequency in units of 62.5 kHz,
117 or if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in
118 units of 62.5 Hz, for this frequency band. A 1 Hz unit is used
119 when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.
127 - :cspan:`2` The supported modulation systems of this frequency
128 band. See :ref:`band-modulation`. Note that currently only one
129 modulation system per frequency band is supported. More work will
130 need to be done if multiple modulation systems are possible.
131 Contact the linux-media mailing list
132 (`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__)
133 if you need that functionality.
141 - Reserved for future extensions. Applications and drivers must set
148 .. flat-table:: Band Modulation Systems
156 - ``V4L2_BAND_MODULATION_VSB``
160 - Vestigial Sideband modulation, used for analog TV.
164 - ``V4L2_BAND_MODULATION_FM``
168 - Frequency Modulation, commonly used for analog radio.
172 - ``V4L2_BAND_MODULATION_AM``
176 - Amplitude Modulation, commonly used for analog radio.
183 On success 0 is returned, on error -1 and the ``errno`` variable is set
184 appropriately. The generic error codes are described at the
185 :ref:`Generic Error Codes <gen-errors>` chapter.
188 The ``tuner`` or ``index`` is out of bounds or the ``type`` field is
192 .. ------------------------------------------------------------------------------
193 .. This file was automatically converted from DocBook-XML with the dbxml
194 .. library (https://github.com/return42/sphkerneldoc). The origin XML comes
195 .. from the linux kernel, refer to:
197 .. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
198 .. ------------------------------------------------------------------------------