18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci.. _radio:
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci***************
68c2ecf20Sopenharmony_ciRadio Interface
78c2ecf20Sopenharmony_ci***************
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciThis interface is intended for AM and FM (analog) radio receivers and
108c2ecf20Sopenharmony_citransmitters.
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciConventionally V4L2 radio devices are accessed through character device
138c2ecf20Sopenharmony_cispecial files named ``/dev/radio`` and ``/dev/radio0`` to
148c2ecf20Sopenharmony_ci``/dev/radio63`` with major number 81 and minor numbers 64 to 127.
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciQuerying Capabilities
188c2ecf20Sopenharmony_ci=====================
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciDevices supporting the radio interface set the ``V4L2_CAP_RADIO`` and
218c2ecf20Sopenharmony_ci``V4L2_CAP_TUNER`` or ``V4L2_CAP_MODULATOR`` flag in the
228c2ecf20Sopenharmony_ci``capabilities`` field of struct
238c2ecf20Sopenharmony_ci:c:type:`v4l2_capability` returned by the
248c2ecf20Sopenharmony_ci:ref:`VIDIOC_QUERYCAP` ioctl. Other combinations of
258c2ecf20Sopenharmony_cicapability flags are reserved for future extensions.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciSupplemental Functions
298c2ecf20Sopenharmony_ci======================
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciRadio devices can support :ref:`controls <control>`, and must support
328c2ecf20Sopenharmony_cithe :ref:`tuner or modulator <tuner>` ioctls.
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciThey do not support the video input or output, audio input or output,
358c2ecf20Sopenharmony_civideo standard, cropping and scaling, compression and streaming
368c2ecf20Sopenharmony_ciparameter, or overlay ioctls. All other ioctls and I/O methods are
378c2ecf20Sopenharmony_cireserved for future extensions.
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ciProgramming
418c2ecf20Sopenharmony_ci===========
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ciRadio devices may have a couple audio controls (as discussed in
448c2ecf20Sopenharmony_ci:ref:`control`) such as a volume control, possibly custom controls.
458c2ecf20Sopenharmony_ciFurther all radio devices have one tuner or modulator (these are
468c2ecf20Sopenharmony_cidiscussed in :ref:`tuner`) with index number zero to select the radio
478c2ecf20Sopenharmony_cifrequency and to determine if a monaural or FM stereo program is
488c2ecf20Sopenharmony_cireceived/emitted. Drivers switch automatically between AM and FM
498c2ecf20Sopenharmony_cidepending on the selected frequency. The
508c2ecf20Sopenharmony_ci:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` or
518c2ecf20Sopenharmony_ci:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl reports the
528c2ecf20Sopenharmony_cisupported frequency range.
53