aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/v4l/dev-rds.xml
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/DocBook/v4l/dev-rds.xml')
-rw-r--r--Documentation/DocBook/v4l/dev-rds.xml74
1 files changed, 55 insertions, 19 deletions
diff --git a/Documentation/DocBook/v4l/dev-rds.xml b/Documentation/DocBook/v4l/dev-rds.xml
index 0869d701b1e5..2427f54397e7 100644
--- a/Documentation/DocBook/v4l/dev-rds.xml
+++ b/Documentation/DocBook/v4l/dev-rds.xml
@@ -3,15 +3,16 @@
3 <para>The Radio Data System transmits supplementary 3 <para>The Radio Data System transmits supplementary
4information in binary format, for example the station name or travel 4information in binary format, for example the station name or travel
5information, on an inaudible audio subcarrier of a radio program. This 5information, on an inaudible audio subcarrier of a radio program. This
6interface is aimed at devices capable of receiving and decoding RDS 6interface is aimed at devices capable of receiving and/or transmitting RDS
7information.</para> 7information.</para>
8 8
9 <para>For more information see the core RDS standard <xref linkend="en50067" /> 9 <para>For more information see the core RDS standard <xref linkend="en50067" />
10and the RBDS standard <xref linkend="nrsc4" />.</para> 10and the RBDS standard <xref linkend="nrsc4" />.</para>
11 11
12 <para>Note that the RBDS standard as is used in the USA is almost identical 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 13to the RDS standard. Any RDS decoder/encoder can also handle RBDS. Only some of the
14have slightly different meanings. See the RBDS standard for more information.</para> 14fields have slightly different meanings. See the RBDS standard for more
15information.</para>
15 16
16 <para>The RBDS standard also specifies support for MMBS (Modified Mobile Search). 17 <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 18This is a proprietary format which seems to be discontinued. The RDS interface does not
@@ -21,16 +22,25 @@ be needed, then please contact the linux-media mailing list: &v4l-ml;.</para>
21 <section> 22 <section>
22 <title>Querying Capabilities</title> 23 <title>Querying Capabilities</title>
23 24
24 <para>Devices supporting the RDS capturing API 25 <para>Devices supporting the RDS capturing API set
25set the <constant>V4L2_CAP_RDS_CAPTURE</constant> flag in 26the <constant>V4L2_CAP_RDS_CAPTURE</constant> flag in
26the <structfield>capabilities</structfield> field of &v4l2-capability; 27the <structfield>capabilities</structfield> field of &v4l2-capability;
27returned by the &VIDIOC-QUERYCAP; ioctl. 28returned by the &VIDIOC-QUERYCAP; ioctl. Any tuner that supports RDS
28Any tuner that supports RDS will set the 29will set the <constant>V4L2_TUNER_CAP_RDS</constant> flag in
29<constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield> 30the <structfield>capability</structfield> field of &v4l2-tuner;. If
30field of &v4l2-tuner;. 31the driver only passes RDS blocks without interpreting the data
31Whether an RDS signal is present can be detected by looking at 32the <constant>V4L2_TUNER_SUB_RDS_BLOCK_IO</constant> flag has to be
32the <structfield>rxsubchans</structfield> field of &v4l2-tuner;: the 33set, see <link linkend="reading-rds-data">Reading RDS data</link>.
33<constant>V4L2_TUNER_SUB_RDS</constant> will be set if RDS data was detected.</para> 34For future use the
35flag <constant>V4L2_TUNER_SUB_RDS_CONTROLS</constant> has also been
36defined. However, a driver for a radio tuner with this capability does
37not yet exist, so if you are planning to write such a driver you
38should discuss this on the linux-media mailing list: &v4l-ml;.</para>
39
40 <para> Whether an RDS signal is present can be detected by looking
41at the <structfield>rxsubchans</structfield> field of &v4l2-tuner;:
42the <constant>V4L2_TUNER_SUB_RDS</constant> will be set if RDS data
43was detected.</para>
34 44
35 <para>Devices supporting the RDS output API 45 <para>Devices supporting the RDS output API
36set the <constant>V4L2_CAP_RDS_OUTPUT</constant> flag in 46set the <constant>V4L2_CAP_RDS_OUTPUT</constant> flag in
@@ -40,16 +50,32 @@ Any modulator that supports RDS will set the
40<constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield> 50<constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield>
41field of &v4l2-modulator;. 51field of &v4l2-modulator;.
42In order to enable the RDS transmission one must set the <constant>V4L2_TUNER_SUB_RDS</constant> 52In 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> 53bit in the <structfield>txsubchans</structfield> field of &v4l2-modulator;.
44 54If the driver only passes RDS blocks without interpreting the data
55the <constant>V4L2_TUNER_SUB_RDS_BLOCK_IO</constant> flag has to be set. If the
56tuner is capable of handling RDS entities like program identification codes and radio
57text, the flag <constant>V4L2_TUNER_SUB_RDS_CONTROLS</constant> should be set,
58see <link linkend="writing-rds-data">Writing RDS data</link> and
59<link linkend="fm-tx-controls">FM Transmitter Control Reference</link>.</para>
45 </section> 60 </section>
46 61
47 <section> 62 <section id="reading-rds-data">
48 <title>Reading RDS data</title> 63 <title>Reading RDS data</title>
49 64
50 <para>RDS data can be read from the radio device 65 <para>RDS data can be read from the radio device
51with the &func-read; function. The data is packed in groups of three bytes, 66with the &func-read; function. The data is packed in groups of three bytes.</para>
67 </section>
68
69 <section id="writing-rds-data">
70 <title>Writing RDS data</title>
71
72 <para>RDS data can be written to the radio device
73with the &func-write; function. The data is packed in groups of three bytes,
52as follows:</para> 74as follows:</para>
75 </section>
76
77 <section>
78 <title>RDS datastructures</title>
53 <table frame="none" pgwide="1" id="v4l2-rds-data"> 79 <table frame="none" pgwide="1" id="v4l2-rds-data">
54 <title>struct 80 <title>struct
55<structname>v4l2_rds_data</structname></title> 81<structname>v4l2_rds_data</structname></title>
@@ -104,55 +130,65 @@ as follows:</para>
104 130
105 <table frame="none" pgwide="1" id="v4l2-rds-block-codes"> 131 <table frame="none" pgwide="1" id="v4l2-rds-block-codes">
106 <title>Block defines</title> 132 <title>Block defines</title>
107 <tgroup cols="3"> 133 <tgroup cols="4">
108 <colspec colname="c1" colwidth="1*" /> 134 <colspec colname="c1" colwidth="1*" />
109 <colspec colname="c2" colwidth="1*" /> 135 <colspec colname="c2" colwidth="1*" />
110 <colspec colname="c3" colwidth="5*" /> 136 <colspec colname="c3" colwidth="1*" />
137 <colspec colname="c4" colwidth="5*" />
111 <tbody valign="top"> 138 <tbody valign="top">
112 <row> 139 <row>
113 <entry>V4L2_RDS_BLOCK_MSK</entry> 140 <entry>V4L2_RDS_BLOCK_MSK</entry>
141 <entry> </entry>
114 <entry>7</entry> 142 <entry>7</entry>
115 <entry>Mask for bits 0-2 to get the block ID.</entry> 143 <entry>Mask for bits 0-2 to get the block ID.</entry>
116 </row> 144 </row>
117 <row> 145 <row>
118 <entry>V4L2_RDS_BLOCK_A</entry> 146 <entry>V4L2_RDS_BLOCK_A</entry>
147 <entry> </entry>
119 <entry>0</entry> 148 <entry>0</entry>
120 <entry>Block A.</entry> 149 <entry>Block A.</entry>
121 </row> 150 </row>
122 <row> 151 <row>
123 <entry>V4L2_RDS_BLOCK_B</entry> 152 <entry>V4L2_RDS_BLOCK_B</entry>
153 <entry> </entry>
124 <entry>1</entry> 154 <entry>1</entry>
125 <entry>Block B.</entry> 155 <entry>Block B.</entry>
126 </row> 156 </row>
127 <row> 157 <row>
128 <entry>V4L2_RDS_BLOCK_C</entry> 158 <entry>V4L2_RDS_BLOCK_C</entry>
159 <entry> </entry>
129 <entry>2</entry> 160 <entry>2</entry>
130 <entry>Block C.</entry> 161 <entry>Block C.</entry>
131 </row> 162 </row>
132 <row> 163 <row>
133 <entry>V4L2_RDS_BLOCK_D</entry> 164 <entry>V4L2_RDS_BLOCK_D</entry>
165 <entry> </entry>
134 <entry>3</entry> 166 <entry>3</entry>
135 <entry>Block D.</entry> 167 <entry>Block D.</entry>
136 </row> 168 </row>
137 <row> 169 <row>
138 <entry>V4L2_RDS_BLOCK_C_ALT</entry> 170 <entry>V4L2_RDS_BLOCK_C_ALT</entry>
171 <entry> </entry>
139 <entry>4</entry> 172 <entry>4</entry>
140 <entry>Block C'.</entry> 173 <entry>Block C'.</entry>
141 </row> 174 </row>
142 <row> 175 <row>
143 <entry>V4L2_RDS_BLOCK_INVALID</entry> 176 <entry>V4L2_RDS_BLOCK_INVALID</entry>
177 <entry>read-only</entry>
144 <entry>7</entry> 178 <entry>7</entry>
145 <entry>An invalid block.</entry> 179 <entry>An invalid block.</entry>
146 </row> 180 </row>
147 <row> 181 <row>
148 <entry>V4L2_RDS_BLOCK_CORRECTED</entry> 182 <entry>V4L2_RDS_BLOCK_CORRECTED</entry>
183 <entry>read-only</entry>
149 <entry>0x40</entry> 184 <entry>0x40</entry>
150 <entry>A bit error was detected but corrected.</entry> 185 <entry>A bit error was detected but corrected.</entry>
151 </row> 186 </row>
152 <row> 187 <row>
153 <entry>V4L2_RDS_BLOCK_ERROR</entry> 188 <entry>V4L2_RDS_BLOCK_ERROR</entry>
189 <entry>read-only</entry>
154 <entry>0x80</entry> 190 <entry>0x80</entry>
155 <entry>An incorrectable error occurred.</entry> 191 <entry>An uncorrectable error occurred.</entry>
156 </row> 192 </row>
157 </tbody> 193 </tbody>
158 </tgroup> 194 </tgroup>