[RFCv1 PATCH 5/5] V4L2 spec: add frequency band documentation.
From: Hans Verkuil hans.verk...@cisco.com Based in part on an earlier patch from hallima...@gmail.com. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- Documentation/DocBook/media/v4l/common.xml | 28 -- .../DocBook/media/v4l/vidioc-g-modulator.xml | 38 +--- Documentation/DocBook/media/v4l/vidioc-g-tuner.xml | 97 +--- .../DocBook/media/v4l/vidioc-s-hw-freq-seek.xml|3 +- 4 files changed, 131 insertions(+), 35 deletions(-) diff --git a/Documentation/DocBook/media/v4l/common.xml b/Documentation/DocBook/media/v4l/common.xml index 4101aeb..4e7082d 100644 --- a/Documentation/DocBook/media/v4l/common.xml +++ b/Documentation/DocBook/media/v4l/common.xml @@ -464,17 +464,18 @@ The structfieldtype/structfield field of the respective structfieldtuner/structfield field contains the index number of the tuner./para - paraRadio devices have exactly one tuner with index zero, no -video inputs./para + paraRadio input devices have one or more tuners, but these are +obviously not associated with any video inputs./para paraTo query and change tuner properties applications use the VIDIOC-G-TUNER; and VIDIOC-S-TUNER; ioctl, respectively. The v4l2-tuner; returned by constantVIDIOC_G_TUNER/constant also contains signal status information applicable when the tuner of the -current video input, or a radio tuner is queried. Note that +current video input or a radio tuner is queried. Note that constantVIDIOC_S_TUNER/constant does not switch the current tuner, when there is more than one at all. The tuner is solely determined by -the current video input. Drivers must support both ioctls and set the +the current video input or by calling VIDIOC-S-FREQUENCY; for radio +tuners. Drivers must support both ioctls and set the constantV4L2_CAP_TUNER/constant flag in the v4l2-capability; returned by the VIDIOC-QUERYCAP; ioctl when the device has one or more tuners./para @@ -491,14 +492,24 @@ the modulator. The structfieldtype/structfield field of the respective v4l2-output; returned by the VIDIOC-ENUMOUTPUT; ioctl is set to constantV4L2_OUTPUT_TYPE_MODULATOR/constant and its structfieldmodulator/structfield field contains the index number -of the modulator. This specification does not define radio output -devices./para +of the modulator./para + + paraRadio output devices have one or more modulators, but these +are obviously not associated with any video outputs./para + + paraA video or radio device cannot support both a tuner and a +modulator. Two separate device nodes will have to be used for such +hardware, one that supports the tuner functionality and one that supports +the modulator functionality. The reason is a limitation with the +VIDIOC-S-FREQUENCY; ioctl where you cannot specify whether the frequency +is for a tuner or a modulator./para paraTo query and change modulator properties applications use the VIDIOC-G-MODULATOR; and VIDIOC-S-MODULATOR; ioctl. Note that constantVIDIOC_S_MODULATOR/constant 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 +determined by the current video output or by calling VIDIOC-S-FREQUENCY; +for radio modulators. Drivers must support both ioctls and set the constantV4L2_CAP_MODULATOR/constant flag in the v4l2-capability; returned by the VIDIOC-QUERYCAP; ioctl when the device has one or more modulators./para @@ -511,8 +522,7 @@ device has one or more modulators./para applications use the VIDIOC-G-FREQUENCY; and VIDIOC-S-FREQUENCY; ioctl which both take a pointer to a v4l2-frequency;. These ioctls are used for TV and radio devices alike. Drivers must support both -ioctls when the tuner or modulator ioctls are supported, or -when the device is a radio device./para +ioctls when the tuner or modulator ioctls are supported./para /section /section diff --git a/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml b/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml index 7f4ac7e..713ba06 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml @@ -68,17 +68,17 @@ to this structure. Drivers fill the rest of the structure or return an applications shall begin at index zero, incrementing by one until the driver returns errorcodeEINVAL/errorcode./para -paraModulators have two writable properties, an audio -modulation set and the radio frequency. To change the modulated audio -subprograms, applications initialize the structfieldindex -/structfield and structfieldtxsubchans/structfield fields and the -structfieldreserved/structfield array and call the -constantVIDIOC_S_MODULATOR/constant ioctl. Drivers may choose a -different audio modulation if the request cannot be satisfied. However -this is a write-only ioctl, it does not return the actual audio +paraModulators have three
Re: [RFCv1 PATCH 5/5] V4L2 spec: add frequency band documentation.
Hi, Comments inline. On 05/27/2012 01:50 PM, Hans Verkuil wrote: From: Hans Verkuilhans.verk...@cisco.com Based in part on an earlier patch fromhallima...@gmail.com. Signed-off-by: Hans Verkuilhans.verk...@cisco.com --- Documentation/DocBook/media/v4l/common.xml | 28 -- .../DocBook/media/v4l/vidioc-g-modulator.xml | 38 +--- Documentation/DocBook/media/v4l/vidioc-g-tuner.xml | 97 +--- .../DocBook/media/v4l/vidioc-s-hw-freq-seek.xml|3 +- 4 files changed, 131 insertions(+), 35 deletions(-) diff --git a/Documentation/DocBook/media/v4l/common.xml b/Documentation/DocBook/media/v4l/common.xml index 4101aeb..4e7082d 100644 --- a/Documentation/DocBook/media/v4l/common.xml +++ b/Documentation/DocBook/media/v4l/common.xml @@ -464,17 +464,18 @@ Thestructfieldtype/structfield field of the respective structfieldtuner/structfield field contains the index number of the tuner./para -paraRadio devices have exactly one tuner with index zero, no -video inputs./para +paraRadio input devices have one or more tuners, but these are +obviously not associated with any video inputs./para This is about having multiple tuners for radio devices, not about the band support, IMHO as such this belongs in a different patch. Also it seems we never finished the earlier discussions of how to handle radio devices which really have multiple tuners, so it seems premature to change this at all atm. paraTo query and change tuner properties applications use the VIDIOC-G-TUNER; andVIDIOC-S-TUNER; ioctl, respectively. The v4l2-tuner; returned byconstantVIDIOC_G_TUNER/constant also contains signal status information applicable when the tuner of the -current video input, or a radio tuner is queried. Note that +current video input or a radio tuner is queried. Note that constantVIDIOC_S_TUNER/constant does not switch the current tuner, when there is more than one at all. The tuner is solely determined by -the current video input. Drivers must support both ioctls and set the +the current video input or by callingVIDIOC-S-FREQUENCY; for radio +tuners. Drivers must support both ioctls and set the constantV4L2_CAP_TUNER/constant flag in thev4l2-capability; returned by theVIDIOC-QUERYCAP; ioctl when the device has one or more tuners./para Again this seems about having multiple tuners on radio devices. If a radio device has multiple tuners, I would expect both to be able to be active at the same time (ie for recording one show and listening an other), so I would expect there to be a mapping between audio-inputs and tuners, just like we have one between video inputs and tuners for video. Which means that the language of S_FREQ selecting a tuner makes no sense, as both can be active at the same time ... All in all I think the whole what to do with radio devices with multiple tuners discussion can best be deferred until we actually encounter such a device. @@ -491,14 +492,24 @@ the modulator. Thestructfieldtype/structfield field of the respectivev4l2-output; returned by theVIDIOC-ENUMOUTPUT; ioctl is set toconstantV4L2_OUTPUT_TYPE_MODULATOR/constant and its structfieldmodulator/structfield field contains the index number -of the modulator. This specification does not define radio output -devices./para +of the modulator./para + +paraRadio output devices have one or more modulators, but these +are obviously not associated with any video outputs./para + +paraA video or radio device cannot support both a tuner and a +modulator. Two separate device nodes will have to be used for such +hardware, one that supports the tuner functionality and one that supports +the modulator functionality. The reason is a limitation with the +VIDIOC-S-FREQUENCY; ioctl where you cannot specify whether the frequency +is for a tuner or a modulator./para paraTo query and change modulator properties applications use theVIDIOC-G-MODULATOR; andVIDIOC-S-MODULATOR; ioctl. Note that constantVIDIOC_S_MODULATOR/constant 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 +determined by the current video output or by callingVIDIOC-S-FREQUENCY; +for radio modulators. Drivers must support both ioctls and set theconstantV4L2_CAP_MODULATOR/constant flag in thev4l2-capability; returned by theVIDIOC-QUERYCAP; ioctl when the device has one or more modulators./para Same again, who says if there are 2 modulators they cannot be both active at the same time, which means the whole notion of selecting one is wrong. @@ -511,8 +522,7 @@ device has one or more modulators./para applications use theVIDIOC-G-FREQUENCY; andVIDIOC-S-FREQUENCY; ioctl which both take a pointer to av4l2-frequency;. These ioctls are used for TV and radio devices alike. Drivers must support both -ioctls when the tuner or modulator ioctls are supported, or -when the device