Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 2646

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>RDS Interface</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API" /><link rel="up" href="ch04.html" title="Chapter&#160;4.&#160;Interfaces" /><link rel="prev" href="ch04s10.html" title="Radio Interface" /><link rel="next" href="ch05.html" title="Chapter&#160;5.&#160;V4L2 Driver Programming" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">RDS Interface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s10.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;4.&#160;Interfaces</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch05.html">Next</a></td></tr></table><hr /></div><div class="section" title="RDS Interface"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="rds"></a>RDS Interface</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="ch04s11.html#id2663624">Querying Capabilities</a></span></dt><dt><span class="section"><a href="ch04s11.html#id2664843">Reading RDS data</a></span></dt></dl></div><p>The Radio Data System transmits supplementary
information in binary format, for example the station name or travel
information, on an inaudible audio subcarrier of a radio program. This
interface is aimed at devices capable of receiving and decoding RDS
information.</p><p>For more information see the core RDS standard <a class="xref" href="bi01.html#en50067" title="Specification of the radio data system (RDS) for VHF/FM sound broadcasting in the frequency range from 87,5 to 108,0 MHz">[<abbr class="abbrev">EN&#160;50067</abbr>]</a>
and the RBDS standard <a class="xref" href="bi01.html#nrsc4" title="NTSC-4: United States RBDS Standard">[<abbr class="abbrev">NRSC-4</abbr>]</a>.</p><p>Note that the RBDS standard as is used in the USA is almost identical
to the RDS standard. Any RDS decoder can also handle RBDS. Only some of the fields
have slightly different meanings. See the RBDS standard for more information.</p><p>The RBDS standard also specifies support for MMBS (Modified Mobile Search).
This is a proprietary format which seems to be discontinued. The RDS interface does not
support this format. Should support for MMBS (or the so-called 'E blocks' in general)
be needed, then please contact the linux-media mailing list: <a class="ulink" href="http://www.linuxtv.org/lists.php" target="_top">http://www.linuxtv.org/lists.php</a>.</p><div class="section" title="Querying Capabilities"><div class="titlepage"><div><div><h3 class="title"><a id="id2663624"></a>Querying Capabilities</h3></div></div></div><p>Devices supporting the RDS capturing API
set the <code class="constant">V4L2_CAP_RDS_CAPTURE</code> flag in
the <em class="structfield"><code>capabilities</code></em> field of struct&#160;<a class="link" href="re56.html#v4l2-capability" title="Table&#160;A.66.&#160;struct v4l2_capability">v4l2_capability</a>
returned by the <a class="link" href="re56.html" title="ioctl VIDIOC_QUERYCAP"><code class="constant">VIDIOC_QUERYCAP</code></a> ioctl.
Any tuner that supports RDS will set the
<code class="constant">V4L2_TUNER_CAP_RDS</code> flag in the <em class="structfield"><code>capability</code></em>
field of struct&#160;<a class="link" href="re51.html#v4l2-tuner" title="Table&#160;A.60.&#160;struct v4l2_tuner">v4l2_tuner</a>.
Whether an RDS signal is present can be detected by looking at
the <em class="structfield"><code>rxsubchans</code></em> field of struct&#160;<a class="link" href="re51.html#v4l2-tuner" title="Table&#160;A.60.&#160;struct v4l2_tuner">v4l2_tuner</a>: the
<code class="constant">V4L2_TUNER_SUB_RDS</code> will be set if RDS data was detected.</p><p>Devices supporting the RDS output API
set the <code class="constant">V4L2_CAP_RDS_OUTPUT</code> flag in
the <em class="structfield"><code>capabilities</code></em> field of struct&#160;<a class="link" href="re56.html#v4l2-capability" title="Table&#160;A.66.&#160;struct v4l2_capability">v4l2_capability</a>
returned by the <a class="link" href="re56.html" title="ioctl VIDIOC_QUERYCAP"><code class="constant">VIDIOC_QUERYCAP</code></a> ioctl.
Any modulator that supports RDS will set the
<code class="constant">V4L2_TUNER_CAP_RDS</code> flag in the <em class="structfield"><code>capability</code></em>
field of struct&#160;<a class="link" href="re45.html#v4l2-modulator" title="Table&#160;A.50.&#160;struct v4l2_modulator">v4l2_modulator</a>.
In order to enable the RDS transmission one must set the <code class="constant">V4L2_TUNER_SUB_RDS</code>
bit in the <em class="structfield"><code>txsubchans</code></em> field of struct&#160;<a class="link" href="re45.html#v4l2-modulator" title="Table&#160;A.50.&#160;struct v4l2_modulator">v4l2_modulator</a>.</p></div><div class="section" title="Reading RDS data"><div class="titlepage"><div><div><h3 class="title"><a id="id2664843"></a>Reading RDS data</h3></div></div></div><p>RDS data can be read from the radio device
with the <a class="link" href="re66.html" title="V4L2 read()"><code class="function">read()</code></a> function. The data is packed in groups of three bytes,
as follows:</p><div class="table"><a id="v4l2-rds-data"></a><p class="title"><b>Table&#160;4.15.&#160;struct
<span class="structname">v4l2_rds_data</span></b></p><div class="table-contents"><table summary="struct&#10;v4l2_rds_data" width="100%" border="0"><colgroup><col /><col /><col /></colgroup><tbody valign="top"><tr><td valign="top">__u8</td><td valign="top"><em class="structfield"><code>lsb</code></em></td><td valign="top">Least Significant Byte of RDS Block</td></tr><tr><td valign="top">__u8</td><td valign="top"><em class="structfield"><code>msb</code></em></td><td valign="top">Most Significant Byte of RDS Block</td></tr><tr><td valign="top">__u8</td><td valign="top"><em class="structfield"><code>block</code></em></td><td valign="top">Block description</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="v4l2-rds-block"></a><p class="title"><b>Table&#160;4.16.&#160;Block description</b></p><div class="table-contents"><table summary="Block description" width="100%" border="0"><colgroup><col /><col /></colgroup><tbody valign="top"><tr><td valign="top">Bits 0-2</td><td valign="top">Block (aka offset) of the received data.</td></tr><tr><td valign="top">Bits 3-5</td><td valign="top">Deprecated. Currently identical to bits 0-2. Do not use these bits.</td></tr><tr><td valign="top">Bit 6</td><td valign="top">Corrected bit. Indicates that an error was corrected for this data block.</td></tr><tr><td valign="top">Bit 7</td><td valign="top">Error bit. Indicates that an uncorrectable error occurred during reception of this block.</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="v4l2-rds-block-codes"></a><p class="title"><b>Table&#160;4.17.&#160;Block defines</b></p><div class="table-contents"><table summary="Block defines" width="100%" border="0"><colgroup><col /><col /><col /></colgroup><tbody valign="top"><tr><td valign="top">V4L2_RDS_BLOCK_MSK</td><td valign="top">7</td><td valign="top">Mask for bits 0-2 to get the block ID.</td></tr><tr><td valign="top">V4L2_RDS_BLOCK_A</td><td valign="top">0</td><td valign="top">Block A.</td></tr><tr><td valign="top">V4L2_RDS_BLOCK_B</td><td valign="top">1</td><td valign="top">Block B.</td></tr><tr><td valign="top">V4L2_RDS_BLOCK_C</td><td valign="top">2</td><td valign="top">Block C.</td></tr><tr><td valign="top">V4L2_RDS_BLOCK_D</td><td valign="top">3</td><td valign="top">Block D.</td></tr><tr><td valign="top">V4L2_RDS_BLOCK_C_ALT</td><td valign="top">4</td><td valign="top">Block C'.</td></tr><tr><td valign="top">V4L2_RDS_BLOCK_INVALID</td><td valign="top">7</td><td valign="top">An invalid block.</td></tr><tr><td valign="top">V4L2_RDS_BLOCK_CORRECTED</td><td valign="top">0x40</td><td valign="top">A bit error was detected but corrected.</td></tr><tr><td valign="top">V4L2_RDS_BLOCK_ERROR</td><td valign="top">0x80</td><td valign="top">An incorrectable error occurred.</td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s10.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch04.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="ch05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Radio Interface&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;5.&#160;V4L2 Driver Programming</td></tr></table></div></body></html>