^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)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) .. _radio:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) ***************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) Radio Interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) ***************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) This interface is intended for AM and FM (analog) radio receivers and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) transmitters.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) Conventionally V4L2 radio devices are accessed through character device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) special files named ``/dev/radio`` and ``/dev/radio0`` to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) ``/dev/radio63`` with major number 81 and minor numbers 64 to 127.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) Querying Capabilities
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) =====================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) Devices supporting the radio interface set the ``V4L2_CAP_RADIO`` and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) ``V4L2_CAP_TUNER`` or ``V4L2_CAP_MODULATOR`` flag in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) ``capabilities`` field of struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) :c:type:`v4l2_capability` returned by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) :ref:`VIDIOC_QUERYCAP` ioctl. Other combinations of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) capability flags are reserved for future extensions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) Supplemental Functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) ======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) Radio devices can support :ref:`controls <control>`, and must support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) the :ref:`tuner or modulator <tuner>` ioctls.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) They do not support the video input or output, audio input or output,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) video standard, cropping and scaling, compression and streaming
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) parameter, or overlay ioctls. All other ioctls and I/O methods are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) reserved for future extensions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) Programming
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) Radio devices may have a couple audio controls (as discussed in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) :ref:`control`) such as a volume control, possibly custom controls.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) Further all radio devices have one tuner or modulator (these are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) discussed in :ref:`tuner`) with index number zero to select the radio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) frequency and to determine if a monaural or FM stereo program is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) received/emitted. Drivers switch automatically between AM and FM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) depending on the selected frequency. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) :ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl reports the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) supported frequency range.