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(-) (limited to 'v4l2-spec') 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 From bcadb4347f42dfeb5b2f3eddc7af77c069b302ba Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 20 Jul 2009 13:56:20 +0200 Subject: v4l2-spec: add documentation for missing V4L2_PIX_FMT_SN9C20X_I420 pixfmt. From: Hans Verkuil Priority: normal Signed-off-by: Hans Verkuil --- v4l2-spec/pixfmt.sgml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'v4l2-spec') diff --git a/v4l2-spec/pixfmt.sgml b/v4l2-spec/pixfmt.sgml index 1be70eea0..9e6bebeb4 100644 --- a/v4l2-spec/pixfmt.sgml +++ b/v4l2-spec/pixfmt.sgml @@ -765,6 +765,11 @@ kernel sources in the file Documentation/video4linux/cx2341x/README.hm 'S910' Compressed format of the SN9C102 driver. + + V4L2_PIX_FMT_SN9C20X_I420 + 'S920' + YUV 4:2:0 format of the gspca sn9c20x driver. + V4L2_PIX_FMT_WNVA 'WNVA' -- cgit v1.2.3 From db54df2055130294d02d4b75e3e9b0a391bb7806 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 20 Jul 2009 14:17:55 +0200 Subject: v4l2-spec: update for new modulator and rds encoder caps. From: Hans Verkuil Document the radio modulator and RDS encoder API. Priority: normal Signed-off-by: Hans Verkuil --- v4l2-spec/common.sgml | 2 +- v4l2-spec/compat.sgml | 3 +++ v4l2-spec/dev-radio.sgml | 14 ++++++++------ v4l2-spec/dev-rds.sgml | 20 ++++++++++++++------ v4l2-spec/v4l2.sgml | 3 ++- v4l2-spec/vidioc-g-modulator.sgml | 5 +++++ v4l2-spec/vidioc-querycap.sgml | 14 +++++++++++--- 7 files changed, 44 insertions(+), 17 deletions(-) (limited to 'v4l2-spec') diff --git a/v4l2-spec/common.sgml b/v4l2-spec/common.sgml index ff595960b..75c7141e3 100644 --- a/v4l2-spec/common.sgml +++ b/v4l2-spec/common.sgml @@ -491,7 +491,7 @@ the &VIDIOC-G-MODULATOR; and &VIDIOC-S-MODULATOR; ioctl. Note that VIDIOC_S_MODULATOR does not switch the current modulator, when there is more than one at all. The modulator is solely determined by the current video output. Drivers must support both -ioctls and set the V4L2_CAP_TUNER (sic) flag in +ioctls and set the V4L2_CAP_MODULATOR flag in the &v4l2-capability; returned by the &VIDIOC-QUERYCAP; ioctl when the device has one or more modulators.
diff --git a/v4l2-spec/compat.sgml b/v4l2-spec/compat.sgml index c1c725f35..bcc372c18 100644 --- a/v4l2-spec/compat.sgml +++ b/v4l2-spec/compat.sgml @@ -2300,6 +2300,9 @@ was renamed to v4l2_chip_ident_oldFinalized the RDS capture API. See for more information.
+ + Added new capabilities for modulators and RDS encoders. + diff --git a/v4l2-spec/dev-radio.sgml b/v4l2-spec/dev-radio.sgml index ae8367219..4d521d2a8 100644 --- a/v4l2-spec/dev-radio.sgml +++ b/v4l2-spec/dev-radio.sgml @@ -1,7 +1,7 @@ Radio Interface This interface is intended for AM and FM (analog) radio -receivers. +receivers and transmitters.
Conventionally V4L2 radio devices are accessed through character device special files named /dev/radio @@ -14,7 +14,8 @@ numbers 64 to 127. Devices supporting the radio interface set the V4L2_CAP_RADIO and -V4L2_CAP_TUNER flag in the +V4L2_CAP_TUNER or +V4L2_CAP_MODULATOR flag in the capabilities field of &v4l2-capability; returned by the &VIDIOC-QUERYCAP; ioctl. Other combinations of capability flags are reserved for future extensions. @@ -25,7 +26,7 @@ capability flags are reserved for future extensions. Radio devices can support controls, and must support the tuner ioctls. +linkend="tuner">tuner or modulator ioctls. They do not support the video input or output, audio input or output, video standard, cropping and scaling, compression and @@ -38,11 +39,12 @@ methods are reserved for future extensions. Radio devices may have a couple audio controls (as discussed in ) such as a volume control, possibly custom -controls. Further all radio devices have one tuner (these are +controls. Further all radio devices have one tuner or modulator (these are discussed in ) with index number zero to select the radio frequency and to determine if a monaural or FM stereo -program is received. Drivers switch automatically between AM and FM -depending on the selected frequency. The &VIDIOC-G-TUNER; ioctl +program is received/emitted. Drivers switch automatically between AM and FM +depending on the selected frequency. The &VIDIOC-G-TUNER; or +&VIDIOC-G-MODULATOR; ioctl reports the supported frequency range. diff --git a/v4l2-spec/dev-rds.sgml b/v4l2-spec/dev-rds.sgml index 8f357d9f0..9d59d0cb0 100644 --- a/v4l2-spec/dev-rds.sgml +++ b/v4l2-spec/dev-rds.sgml @@ -24,16 +24,24 @@ be needed, then please contact the linux-media mailing list: &v4l-ml;. 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 +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 +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. + Devices supporting the RDS output API +set the V4L2_CAP_RDS_OUTPUT flag in +the capabilities field of &v4l2-capability; +returned by the &VIDIOC-QUERYCAP; ioctl. +Any modulator that supports RDS will set the +V4L2_TUNER_CAP_RDS flag in the capability +field of &v4l2-modulator;. +In order to enable the RDS transmission one must set the V4L2_TUNER_SUB_RDS +bit in the txsubchans field of &v4l2-modulator;. +
diff --git a/v4l2-spec/v4l2.sgml b/v4l2-spec/v4l2.sgml index 815e96ab5..bae7eb441 100644 --- a/v4l2-spec/v4l2.sgml +++ b/v4l2-spec/v4l2.sgml @@ -134,7 +134,8 @@ applications. --> 0.26 2009-06-15 hv - Finalized the RDS capture API. + Finalized the RDS capture API. Added modulator and RDS encoder +capabilities. diff --git a/v4l2-spec/vidioc-g-modulator.sgml b/v4l2-spec/vidioc-g-modulator.sgml index a3ea5ef8a..945147f90 100644 --- a/v4l2-spec/vidioc-g-modulator.sgml +++ b/v4l2-spec/vidioc-g-modulator.sgml @@ -212,6 +212,11 @@ does not permit SAP the VIDIOC_S_MODULATOR ioctl shall return an &EINVAL; and driver shall fall back to mono or stereo mode. + + V4L2_TUNER_SUB_RDS + 0x0010 + Enable the RDS encoder for a radio FM transmitter. + diff --git a/v4l2-spec/vidioc-querycap.sgml b/v4l2-spec/vidioc-querycap.sgml index 4a741f5e9..fa12ae738 100644 --- a/v4l2-spec/vidioc-querycap.sgml +++ b/v4l2-spec/vidioc-querycap.sgml @@ -208,9 +208,9 @@ hardware frequency seeking. V4L2_CAP_TUNER 0x00010000 - The device has some sort of tuner or modulator to -receive or emit RF-modulated video signals. For more information about -tuner and modulator programming see + The device has some sort of tuner to +receive RF-modulated video signals. For more information about +tuner programming see . @@ -227,6 +227,14 @@ interface. For more information on audio inputs and outputs see 0x00040000 This is a radio receiver. + + V4L2_CAP_MODULATOR + 0x00080000 + The device has some sort of modulator to +emit RF-modulated video/audio signals. For more information about +modulator programming see +. + V4L2_CAP_READWRITE 0x01000000 -- cgit v1.2.3