162306a36Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 262306a36Sopenharmony_ci 362306a36Sopenharmony_ci.. _radio: 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci*************** 662306a36Sopenharmony_ciRadio Interface 762306a36Sopenharmony_ci*************** 862306a36Sopenharmony_ci 962306a36Sopenharmony_ciThis interface is intended for AM and FM (analog) radio receivers and 1062306a36Sopenharmony_citransmitters. 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ciConventionally V4L2 radio devices are accessed through character device 1362306a36Sopenharmony_cispecial files named ``/dev/radio`` and ``/dev/radio0`` to 1462306a36Sopenharmony_ci``/dev/radio63`` with major number 81 and minor numbers 64 to 127. 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciQuerying Capabilities 1862306a36Sopenharmony_ci===================== 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ciDevices supporting the radio interface set the ``V4L2_CAP_RADIO`` and 2162306a36Sopenharmony_ci``V4L2_CAP_TUNER`` or ``V4L2_CAP_MODULATOR`` flag in the 2262306a36Sopenharmony_ci``capabilities`` field of struct 2362306a36Sopenharmony_ci:c:type:`v4l2_capability` returned by the 2462306a36Sopenharmony_ci:ref:`VIDIOC_QUERYCAP` ioctl. Other combinations of 2562306a36Sopenharmony_cicapability flags are reserved for future extensions. 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ciSupplemental Functions 2962306a36Sopenharmony_ci====================== 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciRadio devices can support :ref:`controls <control>`, and must support 3262306a36Sopenharmony_cithe :ref:`tuner or modulator <tuner>` ioctls. 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ciThey do not support the video input or output, audio input or output, 3562306a36Sopenharmony_civideo standard, cropping and scaling, compression and streaming 3662306a36Sopenharmony_ciparameter, or overlay ioctls. All other ioctls and I/O methods are 3762306a36Sopenharmony_cireserved for future extensions. 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ciProgramming 4162306a36Sopenharmony_ci=========== 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ciRadio devices may have a couple audio controls (as discussed in 4462306a36Sopenharmony_ci:ref:`control`) such as a volume control, possibly custom controls. 4562306a36Sopenharmony_ciFurther all radio devices have one tuner or modulator (these are 4662306a36Sopenharmony_cidiscussed in :ref:`tuner`) with index number zero to select the radio 4762306a36Sopenharmony_cifrequency and to determine if a monaural or FM stereo program is 4862306a36Sopenharmony_cireceived/emitted. Drivers switch automatically between AM and FM 4962306a36Sopenharmony_cidepending on the selected frequency. The 5062306a36Sopenharmony_ci:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` or 5162306a36Sopenharmony_ci:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl reports the 5262306a36Sopenharmony_cisupported frequency range. 53