1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Radio Interface</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API"><link rel="up" href="devices.html" title="Chapter 4. Interfaces"><link rel="prev" href="ttx.html" title="Teletext Interface"><link rel="next" href="rds.html" title="RDS Interface"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Radio Interface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ttx.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Interfaces</th><td width="20%" align="right"> <a accesskey="n" href="rds.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="radio"></a>Radio Interface</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="radio.html#idp1105906748">Querying Capabilities</a></span></dt><dt><span class="section"><a href="radio.html#idp1105909252">Supplemental Functions</a></span></dt><dt><span class="section"><a href="radio.html#idp1105872060">Programming</a></span></dt></dl></div><p>This interface is intended for AM and FM (analog) radio 2receivers and transmitters.</p><p>Conventionally V4L2 radio devices are accessed through 3character device special files named <code class="filename">/dev/radio</code> 4and <code class="filename">/dev/radio0</code> to 5<code class="filename">/dev/radio63</code> with major number 81 and minor 6numbers 64 to 127.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1105906748"></a>Querying Capabilities</h3></div></div></div><p>Devices supporting the radio interface set the 7<code class="constant">V4L2_CAP_RADIO</code> and 8<code class="constant">V4L2_CAP_TUNER</code> or 9<code class="constant">V4L2_CAP_MODULATOR</code> flag in the 10<em class="structfield"><code>capabilities</code></em> field of struct <a class="link" href="vidioc-querycap.html#v4l2-capability" title="Table A.93. struct v4l2_capability">v4l2_capability</a> 11returned by the <a class="link" href="vidioc-querycap.html" title="ioctl VIDIOC_QUERYCAP"><code class="constant">VIDIOC_QUERYCAP</code></a> ioctl. Other combinations of 12capability flags are reserved for future extensions.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1105909252"></a>Supplemental Functions</h3></div></div></div><p>Radio devices can support <a class="link" href="control.html" title="User Controls">controls</a>, and must support the <a class="link" href="tuner.html" title="Tuners and Modulators">tuner or modulator</a> ioctls.</p><p>They do not support the video input or output, audio input 13or output, video standard, cropping and scaling, compression and 14streaming parameter, or overlay ioctls. All other ioctls and I/O 15methods are reserved for future extensions.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1105872060"></a>Programming</h3></div></div></div><p>Radio devices may have a couple audio controls (as discussed 16in <a class="xref" href="control.html" title="User Controls">the section called “User Controls”</a>) such as a volume control, possibly custom 17controls. Further all radio devices have one tuner or modulator (these are 18discussed in <a class="xref" href="tuner.html" title="Tuners and Modulators">the section called “Tuners and Modulators”</a>) with index number zero to select 19the radio frequency and to determine if a monaural or FM stereo 20program is received/emitted. Drivers switch automatically between AM and FM 21depending on the selected frequency. The <a class="link" href="vidioc-g-tuner.html" title="ioctl VIDIOC_G_TUNER, VIDIOC_S_TUNER"><code class="constant">VIDIOC_G_TUNER</code></a> or 22<a class="link" href="vidioc-g-modulator.html" title="ioctl VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR"><code class="constant">VIDIOC_G_MODULATOR</code></a> ioctl 23reports the supported frequency range.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ttx.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="devices.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="rds.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Teletext Interface </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> RDS Interface</td></tr></table></div></body></html> 24