Merge tag 'xtensa-20181228' of git://github.com/jcmvbkbc/linux-xtensa
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / dev-radio.rst
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/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _radio:
11
12 ***************
13 Radio Interface
14 ***************
15
16 This interface is intended for AM and FM (analog) radio receivers and
17 transmitters.
18
19 Conventionally V4L2 radio devices are accessed through character device
20 special files named ``/dev/radio`` and ``/dev/radio0`` to
21 ``/dev/radio63`` with major number 81 and minor numbers 64 to 127.
22
23
24 Querying Capabilities
25 =====================
26
27 Devices 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
32 capability flags are reserved for future extensions.
33
34
35 Supplemental Functions
36 ======================
37
38 Radio devices can support :ref:`controls <control>`, and must support
39 the :ref:`tuner or modulator <tuner>` ioctls.
40
41 They do not support the video input or output, audio input or output,
42 video standard, cropping and scaling, compression and streaming
43 parameter, or overlay ioctls. All other ioctls and I/O methods are
44 reserved for future extensions.
45
46
47 Programming
48 ===========
49
50 Radio devices may have a couple audio controls (as discussed in
51 :ref:`control`) such as a volume control, possibly custom controls.
52 Further all radio devices have one tuner or modulator (these are
53 discussed in :ref:`tuner`) with index number zero to select the radio
54 frequency and to determine if a monaural or FM stereo program is
55 received/emitted. Drivers switch automatically between AM and FM
56 depending 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
59 supported frequency range.