1 <title>RDS Interface</title> 2 3 <para>The Radio Data System transmits supplementary 4information in binary format, for example the station name or travel 5information, on an inaudible audio subcarrier of a radio program. This 6interface is aimed at devices capable of receiving and decoding RDS 7information.</para> 8 9 <para>For more information see the core RDS standard <xref linkend="en50067" /> 10and the RBDS standard <xref linkend="nrsc4" />.</para> 11 12 <para>Note that the RBDS standard as is used in the USA is almost identical 13to the RDS standard. Any RDS decoder can also handle RBDS. Only some of the fields 14have slightly different meanings. See the RBDS standard for more information.</para> 15 16 <para>The RBDS standard also specifies support for MMBS (Modified Mobile Search). 17This is a proprietary format which seems to be discontinued. The RDS interface does not 18support this format. Should support for MMBS (or the so-called 'E blocks' in general) 19be needed, then please contact the linux-media mailing list: &v4l-ml;.</para> 20 21 <section> 22 <title>Querying Capabilities</title> 23 24 <para>Devices supporting the RDS capturing API 25set the <constant>V4L2_CAP_RDS_CAPTURE</constant> flag in 26the <structfield>capabilities</structfield> field of &v4l2-capability; 27returned by the &VIDIOC-QUERYCAP; ioctl. 28Any tuner that supports RDS will set the 29<constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield> 30field of &v4l2-tuner;. 31Whether an RDS signal is present can be detected by looking at 32the <structfield>rxsubchans</structfield> field of &v4l2-tuner;: the 33<constant>V4L2_TUNER_SUB_RDS</constant> will be set if RDS data was detected.</para> 34 35 <para>Devices supporting the RDS output API 36set the <constant>V4L2_CAP_RDS_OUTPUT</constant> flag in 37the <structfield>capabilities</structfield> field of &v4l2-capability; 38returned by the &VIDIOC-QUERYCAP; ioctl. 39Any modulator that supports RDS will set the 40<constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield> 41field of &v4l2-modulator;. 42In order to enable the RDS transmission one must set the <constant>V4L2_TUNER_SUB_RDS</constant> 43bit in the <structfield>txsubchans</structfield> field of &v4l2-modulator;.</para> 44 45 </section> 46 47 <section> 48 <title>Reading RDS data</title> 49 50 <para>RDS data can be read from the radio device 51with the &func-read; function. The data is packed in groups of three bytes, 52as follows:</para> 53 <table frame="none" pgwide="1" id="v4l2-rds-data"> 54 <title>struct 55<structname>v4l2_rds_data</structname></title> 56 <tgroup cols="3"> 57 <colspec colname="c1" colwidth="1*" /> 58 <colspec colname="c2" colwidth="1*" /> 59 <colspec colname="c3" colwidth="5*" /> 60 <tbody valign="top"> 61 <row> 62 <entry>__u8</entry> 63 <entry><structfield>lsb</structfield></entry> 64 <entry>Least Significant Byte of RDS Block</entry> 65 </row> 66 <row> 67 <entry>__u8</entry> 68 <entry><structfield>msb</structfield></entry> 69 <entry>Most Significant Byte of RDS Block</entry> 70 </row> 71 <row> 72 <entry>__u8</entry> 73 <entry><structfield>block</structfield></entry> 74 <entry>Block description</entry> 75 </row> 76 </tbody> 77 </tgroup> 78 </table> 79 <table frame="none" pgwide="1" id="v4l2-rds-block"> 80 <title>Block description</title> 81 <tgroup cols="2"> 82 <colspec colname="c1" colwidth="1*" /> 83 <colspec colname="c2" colwidth="5*" /> 84 <tbody valign="top"> 85 <row> 86 <entry>Bits 0-2</entry> 87 <entry>Block (aka offset) of the received data.</entry> 88 </row> 89 <row> 90 <entry>Bits 3-5</entry> 91 <entry>Deprecated. Currently identical to bits 0-2. Do not use these bits.</entry> 92 </row> 93 <row> 94 <entry>Bit 6</entry> 95 <entry>Corrected bit. Indicates that an error was corrected for this data block.</entry> 96 </row> 97 <row> 98 <entry>Bit 7</entry> 99 <entry>Error bit. Indicates that an uncorrectable error occurred during reception of this block.</entry> 100 </row> 101 </tbody> 102 </tgroup> 103 </table> 104 105 <table frame="none" pgwide="1" id="v4l2-rds-block-codes"> 106 <title>Block defines</title> 107 <tgroup cols="3"> 108 <colspec colname="c1" colwidth="1*" /> 109 <colspec colname="c2" colwidth="1*" /> 110 <colspec colname="c3" colwidth="5*" /> 111 <tbody valign="top"> 112 <row> 113 <entry>V4L2_RDS_BLOCK_MSK</entry> 114 <entry>7</entry> 115 <entry>Mask for bits 0-2 to get the block ID.</entry> 116 </row> 117 <row> 118 <entry>V4L2_RDS_BLOCK_A</entry> 119 <entry>0</entry> 120 <entry>Block A.</entry> 121 </row> 122 <row> 123 <entry>V4L2_RDS_BLOCK_B</entry> 124 <entry>1</entry> 125 <entry>Block B.</entry> 126 </row> 127 <row> 128 <entry>V4L2_RDS_BLOCK_C</entry> 129 <entry>2</entry> 130 <entry>Block C.</entry> 131 </row> 132 <row> 133 <entry>V4L2_RDS_BLOCK_D</entry> 134 <entry>3</entry> 135 <entry>Block D.</entry> 136 </row> 137 <row> 138 <entry>V4L2_RDS_BLOCK_C_ALT</entry> 139 <entry>4</entry> 140 <entry>Block C'.</entry> 141 </row> 142 <row> 143 <entry>V4L2_RDS_BLOCK_INVALID</entry> 144 <entry>7</entry> 145 <entry>An invalid block.</entry> 146 </row> 147 <row> 148 <entry>V4L2_RDS_BLOCK_CORRECTED</entry> 149 <entry>0x40</entry> 150 <entry>A bit error was detected but corrected.</entry> 151 </row> 152 <row> 153 <entry>V4L2_RDS_BLOCK_ERROR</entry> 154 <entry>0x80</entry> 155 <entry>An incorrectable error occurred.</entry> 156 </row> 157 </tbody> 158 </tgroup> 159 </table> 160 </section> 161 162<!-- 163Local Variables: 164mode: sgml 165sgml-parent-document: "v4l2.sgml" 166indent-tabs-mode: nil 167End: 168 --> 169