brintos

brintos / linux-shallow public Read only

0
0
Text · 4.3 KiB · e385929 Raw
140 lines · plain
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later2.. c:namespace:: V4L3 4.. _VIDIOC_ENUM_FREQ_BANDS:5 6****************************7ioctl VIDIOC_ENUM_FREQ_BANDS8****************************9 10Name11====12 13VIDIOC_ENUM_FREQ_BANDS - Enumerate supported frequency bands14 15Synopsis16========17 18.. c:macro:: VIDIOC_ENUM_FREQ_BANDS19 20``int ioctl(int fd, VIDIOC_ENUM_FREQ_BANDS, struct v4l2_frequency_band *argp)``21 22Arguments23=========24 25``fd``26    File descriptor returned by :c:func:`open()`.27 28``argp``29    Pointer to struct :c:type:`v4l2_frequency_band`.30 31Description32===========33 34Enumerates the frequency bands that a tuner or modulator supports. To do35this applications initialize the ``tuner``, ``type`` and ``index``36fields, and zero out the ``reserved`` array of a struct37:c:type:`v4l2_frequency_band` and call the38:ref:`VIDIOC_ENUM_FREQ_BANDS` ioctl with a pointer to this structure.39 40This ioctl is supported if the ``V4L2_TUNER_CAP_FREQ_BANDS`` capability41of the corresponding tuner/modulator is set.42 43.. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{2.4cm}|44 45.. c:type:: v4l2_frequency_band46 47.. flat-table:: struct v4l2_frequency_band48    :header-rows:  049    :stub-columns: 050    :widths:       1 1 2 1 151 52    * - __u3253      - ``tuner``54      - The tuner or modulator index number. This is the same value as in55	the struct :c:type:`v4l2_input` ``tuner`` field and56	the struct :c:type:`v4l2_tuner` ``index`` field, or57	the struct :c:type:`v4l2_output` ``modulator`` field58	and the struct :c:type:`v4l2_modulator` ``index``59	field.60    * - __u3261      - ``type``62      - The tuner type. This is the same value as in the struct63	:c:type:`v4l2_tuner` ``type`` field. The type must be64	set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and65	to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to66	``V4L2_TUNER_RADIO`` for modulators (currently only radio67	modulators are supported). See :c:type:`v4l2_tuner_type`68    * - __u3269      - ``index``70      - Identifies the frequency band, set by the application.71    * - __u3272      - ``capability``73      - :cspan:`2` The tuner/modulator capability flags for this74	frequency band, see :ref:`tuner-capability`. The75	``V4L2_TUNER_CAP_LOW`` or ``V4L2_TUNER_CAP_1HZ`` capability must76	be the same for all frequency bands of the selected77	tuner/modulator. So either all bands have that capability set, or78	none of them have that capability.79    * - __u3280      - ``rangelow``81      - :cspan:`2` The lowest tunable frequency in units of 62.5 kHz, or82	if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units83	of 62.5 Hz, for this frequency band. A 1 Hz unit is used when the84	``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.85    * - __u3286      - ``rangehigh``87      - :cspan:`2` The highest tunable frequency in units of 62.5 kHz,88	or if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in89	units of 62.5 Hz, for this frequency band. A 1 Hz unit is used90	when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.91    * - __u3292      - ``modulation``93      - :cspan:`2` The supported modulation systems of this frequency94	band. See :ref:`band-modulation`.95 96	.. note::97 98	   Currently only one modulation system per frequency band99	   is supported. More work will need to be done if multiple100	   modulation systems are possible. Contact the linux-media101	   mailing list102	   (`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__)103	   if you need such functionality.104    * - __u32105      - ``reserved``\ [9]106      - Reserved for future extensions.107 108	Applications and drivers must set the array to zero.109 110 111.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.5cm}|112 113.. _band-modulation:114 115.. flat-table:: Band Modulation Systems116    :header-rows:  0117    :stub-columns: 0118    :widths:       3 1 4119 120    * - ``V4L2_BAND_MODULATION_VSB``121      - 0x02122      - Vestigial Sideband modulation, used for analog TV.123    * - ``V4L2_BAND_MODULATION_FM``124      - 0x04125      - Frequency Modulation, commonly used for analog radio.126    * - ``V4L2_BAND_MODULATION_AM``127      - 0x08128      - Amplitude Modulation, commonly used for analog radio.129 130Return Value131============132 133On success 0 is returned, on error -1 and the ``errno`` variable is set134appropriately. The generic error codes are described at the135:ref:`Generic Error Codes <gen-errors>` chapter.136 137EINVAL138    The ``tuner`` or ``index`` is out of bounds or the ``type`` field is139    wrong.140