From 84e800a7ca6664a01b8b294b4acd673019c0a2a9 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 20 Jun 2009 10:49:43 +0200 Subject: v4l2-spec: finalize the RDS specification. From: Hans Verkuil Priority: normal Signed-off-by: Hans Verkuil --- v4l2-spec/biblio.sgml | 65 ++++----------- v4l2-spec/compat.sgml | 14 +++- v4l2-spec/dev-rds.sgml | 174 ++++++++++++++++++++++++++++++++++------- v4l2-spec/v4l2.sgml | 7 ++ v4l2-spec/vidioc-g-tuner.sgml | 17 +++- v4l2-spec/vidioc-querycap.sgml | 2 +- 6 files changed, 195 insertions(+), 84 deletions(-) diff --git a/v4l2-spec/biblio.sgml b/v4l2-spec/biblio.sgml index b013ece1d..afc8a0dd2 100644 --- a/v4l2-spec/biblio.sgml +++ b/v4l2-spec/biblio.sgml @@ -158,54 +158,23 @@ Signal - NTSC for Studio Applications" 1125-Line High-Definition Production" - - V4L - - - Alan - Cox - - Red Hat, Inc. -
- alan@redhat.com -
-
-
-
- Video4Linux API Specification - - This file is part of the Linux kernel sources under -Documentation/video4linux. - -
- - - V4LPROG - - - Alan - Cox - - Red Hat, Inc. -
- alan@redhat.com -
-
-
-
- Video4Linux Programming (a.k.a. The Video4Linux -Book) - - About V4L driver programming. This -book is part of the Linux kernel DocBook documentation, for example at - -http://kernelnewbies.org/documents/. SGML sources are included -in the kernel sources. - - - 2000 - Alan Cox - + + EN 50067 + + European Committee for Electrotechnical Standardization +(http://www.cenelec.eu) + + Specification of the radio data system (RDS) for VHF/FM sound broadcasting +in the frequency range from 87,5 to 108,0 MHz + + + + NRSC-4 + + National Radio Systems Committee +(http://www.nrscstandards.org) + + NTSC-4: United States RBDS Standard diff --git a/v4l2-spec/compat.sgml b/v4l2-spec/compat.sgml index 94713023d..c1c725f35 100644 --- a/v4l2-spec/compat.sgml +++ b/v4l2-spec/compat.sgml @@ -1273,9 +1273,8 @@ also the size of the structure changed, which is encoded in the ioctl request code, thus older V4L2 devices will respond with an &EINVAL; to the new &VIDIOC-QUERYCAP; ioctl. - There are new fields to identify the driver, a new (as -of yet unspecified) device function -V4L2_CAP_RDS_CAPTURE, the + There are new fields to identify the driver, a new RDS +device function V4L2_CAP_RDS_CAPTURE, the V4L2_CAP_AUDIO flag indicates if the device has any audio connectors, another I/O capability V4L2_CAP_ASYNCIO can be flagged. In response to @@ -2294,6 +2293,15 @@ was renamed to v4l2_chip_ident_old +
+ V4L2 in Linux 2.6.32 + + + Finalized the RDS capture API. See for +more information. + + +
diff --git a/v4l2-spec/dev-rds.sgml b/v4l2-spec/dev-rds.sgml index 07bfd4c65..8f357d9f0 100644 --- a/v4l2-spec/dev-rds.sgml +++ b/v4l2-spec/dev-rds.sgml @@ -2,38 +2,154 @@ The Radio Data System transmits supplementary information in binary format, for example the station name or travel -information, on a inaudible audio subcarrier of a radio program. This -interface aims at devices capable of receiving and decoding RDS +information, on an inaudible audio subcarrier of a radio program. This +interface is aimed at devices capable of receiving and decoding RDS information. - The V4L API defines its RDS API as follows. - - From radio devices supporting it, RDS data can be read -with the &func-read; function. The data is packed in groups of three, -as follows: - - First Octet Least Significant Byte of RDS Block - - - Second Octet Most Significant Byte of RDS Block - - - Third Octet Bit 7: Error bit. Indicates that an -uncorrectable error occurred during reception of this block. Bit 6: -Corrected bit. Indicates that an error was corrected for this data -block. Bits 5-3: Received Offset. Indicates the offset received by the -sync system. Bits 2-0: Offset Name. Indicates the offset applied to -this data. - - - - It was argued the RDS API should be -extended before integration into V4L2, no new API has been devised yet. -Please write to the linux-media mailing list for discussion: &v4l-ml;. -Meanwhile no V4L2 driver should set the -V4L2_CAP_RDS_CAPTURE capability flag. + For more information see the core RDS standard +and the RBDS standard . + 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. + + 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: &v4l-ml;. + +
+ Querying Capabilities + + Devices supporting the RDS capturing API +set the V4L2_CAP_RDS_CAPTURE flag in +the capabilities field of &v4l2-capability; +returned by the &VIDIOC-QUERYCAP; ioctl. + + Any tuner that supports RDS will set the +V4L2_TUNER_CAP_RDS flag in the capability +field of &v4l2-tuner;. + + Whether an RDS signal is present can be detected by looking at +the rxsubchans field of &v4l2-tuner;: the +V4L2_TUNER_SUB_RDS will be set if RDS data was detected. + +
+ +
+ Reading RDS data + + RDS data can be read from the radio device +with the &func-read; function. The data is packed in groups of three bytes, +as follows: + + struct +<structname>v4l2_rds_data</structname> + + + + + + + __u8 + lsb + Least Significant Byte of RDS Block + + + __u8 + msb + Most Significant Byte of RDS Block + + + __u8 + block + Block description + + + +
+ + Block description + + + + + + Bits 0-2 + Block (aka offset) of the received data. + + + Bits 3-5 + Deprecated. Currently identical to bits 0-2. Do not use these bits. + + + Bit 6 + Corrected bit. Indicates that an error was corrected for this data block. + + + Bit 7 + Error bit. Indicates that an uncorrectable error occurred during reception of this block. + + + +
+ + + Block defines + + + + + + + V4L2_RDS_BLOCK_MSK + 7 + Mask for bits 0-2 to get the block ID. + + + V4L2_RDS_BLOCK_A + 0 + Block A. + + + V4L2_RDS_BLOCK_B + 1 + Block B. + + + V4L2_RDS_BLOCK_C + 2 + Block C. + + + V4L2_RDS_BLOCK_D + 3 + Block D. + + + V4L2_RDS_BLOCK_C_ALT + 4 + Block C'. + + + V4L2_RDS_BLOCK_INVALID + 7 + An invalid block. + + + V4L2_RDS_BLOCK_CORRECTED + 0x40 + A bit error was detected but corrected. + + + V4L2_RDS_BLOCK_ERROR + 0x80 + An incorrectable error occurred. + + + +
+
+ + 0.26 + 2009-06-15 + hv + Finalized the RDS capture API. + + 0.25 2009-01-18 diff --git a/v4l2-spec/vidioc-g-tuner.sgml b/v4l2-spec/vidioc-g-tuner.sgml index d5d379838..eb0b89e9a 100644 --- a/v4l2-spec/vidioc-g-tuner.sgml +++ b/v4l2-spec/vidioc-g-tuner.sgml @@ -120,9 +120,9 @@ field is not quite clear.--> to decode audio subprograms. They will not change, for example with the current video standard.When the structure refers to a radio tuner only the -V4L2_TUNER_CAP_LOW and -V4L2_TUNER_CAP_STEREO flags can be -set. +V4L2_TUNER_CAP_LOW, +V4L2_TUNER_CAP_STEREO and +V4L2_TUNER_CAP_RDS flags can be set. __u32 @@ -312,6 +312,12 @@ carrier for a monaural secondary language. Only supports the V4L2_STD_NTSC_M video standard. + + V4L2_TUNER_CAP_RDS + 0x0080 + RDS capture is supported. This capability is only valid for +radio tuners. + @@ -353,6 +359,11 @@ bilingual audio signal (or a second audio program). V4L2_TUNER_SUB_SAP flag applies when the current video standard is V4L2_STD_NTSC_M. + + V4L2_TUNER_SUB_RDS + 0x0010 + The tuner receives an RDS channel. + diff --git a/v4l2-spec/vidioc-querycap.sgml b/v4l2-spec/vidioc-querycap.sgml index 2715289d8..4a741f5e9 100644 --- a/v4l2-spec/vidioc-querycap.sgml +++ b/v4l2-spec/vidioc-querycap.sgml @@ -184,7 +184,7 @@ data. V4L2_CAP_RDS_CAPTURE 0x00000100 - [to be defined] + The device supports the RDS interface. V4L2_CAP_VIDEO_OUTPUT_OVERLAY -- cgit v1.2.3