Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002 
0003 .. _radio:
0004 
0005 ***************
0006 Radio Interface
0007 ***************
0008 
0009 This interface is intended for AM and FM (analog) radio receivers and
0010 transmitters.
0011 
0012 Conventionally V4L2 radio devices are accessed through character device
0013 special files named ``/dev/radio`` and ``/dev/radio0`` to
0014 ``/dev/radio63`` with major number 81 and minor numbers 64 to 127.
0015 
0016 
0017 Querying Capabilities
0018 =====================
0019 
0020 Devices supporting the radio interface set the ``V4L2_CAP_RADIO`` and
0021 ``V4L2_CAP_TUNER`` or ``V4L2_CAP_MODULATOR`` flag in the
0022 ``capabilities`` field of struct
0023 :c:type:`v4l2_capability` returned by the
0024 :ref:`VIDIOC_QUERYCAP` ioctl. Other combinations of
0025 capability flags are reserved for future extensions.
0026 
0027 
0028 Supplemental Functions
0029 ======================
0030 
0031 Radio devices can support :ref:`controls <control>`, and must support
0032 the :ref:`tuner or modulator <tuner>` ioctls.
0033 
0034 They do not support the video input or output, audio input or output,
0035 video standard, cropping and scaling, compression and streaming
0036 parameter, or overlay ioctls. All other ioctls and I/O methods are
0037 reserved for future extensions.
0038 
0039 
0040 Programming
0041 ===========
0042 
0043 Radio devices may have a couple audio controls (as discussed in
0044 :ref:`control`) such as a volume control, possibly custom controls.
0045 Further all radio devices have one tuner or modulator (these are
0046 discussed in :ref:`tuner`) with index number zero to select the radio
0047 frequency and to determine if a monaural or FM stereo program is
0048 received/emitted. Drivers switch automatically between AM and FM
0049 depending on the selected frequency. The
0050 :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` or
0051 :ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl reports the
0052 supported frequency range.