| 1 |
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later |
| 2 |
.. c:namespace:: V4L |
| 3 |
|
| 4 |
.. _radio: |
| 5 |
|
| 6 |
*************** |
| 7 |
Radio Interface |
| 8 |
*************** |
| 9 |
|
| 10 |
This interface is intended for AM and FM (analog) radio receivers and |
| 11 |
transmitters. |
| 12 |
|
| 13 |
Conventionally V4L2 radio devices are accessed through character device |
| 14 |
special files named ``/dev/radio`` and ``/dev/radio0`` to |
| 15 |
``/dev/radio63`` with major number 81 and minor numbers 64 to 127. |
| 16 |
|
| 17 |
|
| 18 |
Querying Capabilities |
| 19 |
===================== |
| 20 |
|
| 21 |
Devices supporting the radio interface set the ``V4L2_CAP_RADIO`` and |
| 22 |
``V4L2_CAP_TUNER`` or ``V4L2_CAP_MODULATOR`` flag in the |
| 23 |
``capabilities`` field of struct |
| 24 |
:c:type:`v4l2_capability` returned by the |
| 25 |
:ref:`VIDIOC_QUERYCAP` ioctl. Other combinations of |
| 26 |
capability flags are reserved for future extensions. |
| 27 |
|
| 28 |
|
| 29 |
Supplemental Functions |
| 30 |
====================== |
| 31 |
|
| 32 |
Radio devices can support :ref:`controls <control>`, and must support |
| 33 |
the :ref:`tuner or modulator <tuner>` ioctls. |
| 34 |
|
| 35 |
They do not support the video input or output, audio input or output, |
| 36 |
video standard, cropping and scaling, compression and streaming |
| 37 |
parameter, or overlay ioctls. All other ioctls and I/O methods are |
| 38 |
reserved for future extensions. |
| 39 |
|
| 40 |
|
| 41 |
Programming |
| 42 |
=========== |
| 43 |
|
| 44 |
Radio devices may have a couple audio controls (as discussed in |
| 45 |
:ref:`control`) such as a volume control, possibly custom controls. |
| 46 |
Further all radio devices have one tuner or modulator (these are |
| 47 |
discussed in :ref:`tuner`) with index number zero to select the radio |
| 48 |
frequency and to determine if a monaural or FM stereo program is |
| 49 |
received/emitted. Drivers switch automatically between AM and FM |
| 50 |
depending on the selected frequency. The |
| 51 |
:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` or |
| 52 |
:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl reports the |
| 53 |
supported frequency range. |