xref: /linux/Documentation/userspace-api/media/v4l/dev-radio.rst (revision 95298d63c67673c654c08952672d016212b26054)
1.. Permission is granted to copy, distribute and/or modify this
2.. document under the terms of the GNU Free Documentation License,
3.. Version 1.1 or any later version published by the Free Software
4.. Foundation, with no Invariant Sections, no Front-Cover Texts
5.. and no Back-Cover Texts. A copy of the license is included at
6.. Documentation/userspace-api/media/fdl-appendix.rst.
7..
8.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10.. _radio:
11
12***************
13Radio Interface
14***************
15
16This interface is intended for AM and FM (analog) radio receivers and
17transmitters.
18
19Conventionally V4L2 radio devices are accessed through character device
20special files named ``/dev/radio`` and ``/dev/radio0`` to
21``/dev/radio63`` with major number 81 and minor numbers 64 to 127.
22
23
24Querying Capabilities
25=====================
26
27Devices supporting the radio interface set the ``V4L2_CAP_RADIO`` and
28``V4L2_CAP_TUNER`` or ``V4L2_CAP_MODULATOR`` flag in the
29``capabilities`` field of struct
30:c:type:`v4l2_capability` returned by the
31:ref:`VIDIOC_QUERYCAP` ioctl. Other combinations of
32capability flags are reserved for future extensions.
33
34
35Supplemental Functions
36======================
37
38Radio devices can support :ref:`controls <control>`, and must support
39the :ref:`tuner or modulator <tuner>` ioctls.
40
41They do not support the video input or output, audio input or output,
42video standard, cropping and scaling, compression and streaming
43parameter, or overlay ioctls. All other ioctls and I/O methods are
44reserved for future extensions.
45
46
47Programming
48===========
49
50Radio devices may have a couple audio controls (as discussed in
51:ref:`control`) such as a volume control, possibly custom controls.
52Further all radio devices have one tuner or modulator (these are
53discussed in :ref:`tuner`) with index number zero to select the radio
54frequency and to determine if a monaural or FM stereo program is
55received/emitted. Drivers switch automatically between AM and FM
56depending on the selected frequency. The
57:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` or
58:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl reports the
59supported frequency range.
60