* [RFCv1 PATCH 0/5] Add hwseek caps and frequency bands.
@ 2012-05-27 11:50 Hans Verkuil
2012-05-27 11:50 ` [RFCv1 PATCH 1/5] videodev2.h: add new hwseek capability bits Hans Verkuil
0 siblings, 1 reply; 11+ messages in thread
From: Hans Verkuil @ 2012-05-27 11:50 UTC (permalink / raw)
To: linux-media; +Cc: Hans de Goede, halli manjunatha
This patch series adds improved hwseek support as discussed here:
http://www.mail-archive.com/linux-media@vger.kernel.org/msg45957.html
and on irc:
http://linuxtv.org/irc/v4l/index.php?date=2012-05-26
>From the RFC I have implemented/documented items 1-4 and 6a. I decided
not to go with option 6b. This may be added in the future if there is a
clear need.
The addition of the frequency band came out of this discussion:
http://www.spinics.net/lists/linux-media/msg48272.html
Regards,
Hans
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFCv1 PATCH 1/5] videodev2.h: add new hwseek capability bits.
2012-05-27 11:50 [RFCv1 PATCH 0/5] Add hwseek caps and frequency bands Hans Verkuil
@ 2012-05-27 11:50 ` Hans Verkuil
2012-05-27 11:50 ` [RFCv1 PATCH 2/5] v4l2 spec: document the new v4l2_tuner capabilities Hans Verkuil
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Hans Verkuil @ 2012-05-27 11:50 UTC (permalink / raw)
To: linux-media; +Cc: Hans de Goede, halli manjunatha, Hans Verkuil
From: Hans Verkuil <hans.verkuil@cisco.com>
Tell the application whether the hardware seek is bounded and/or wraps around.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
include/linux/videodev2.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 370d111..2339678 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -2039,6 +2039,8 @@ struct v4l2_modulator {
/* Flags for the 'capability' field */
#define V4L2_TUNER_CAP_LOW 0x0001
#define V4L2_TUNER_CAP_NORM 0x0002
+#define V4L2_TUNER_CAP_HWSEEK_BOUNDED 0x0004
+#define V4L2_TUNER_CAP_HWSEEK_WRAP 0x0008
#define V4L2_TUNER_CAP_STEREO 0x0010
#define V4L2_TUNER_CAP_LANG2 0x0020
#define V4L2_TUNER_CAP_SAP 0x0020
--
1.7.10
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [RFCv1 PATCH 2/5] v4l2 spec: document the new v4l2_tuner capabilities
2012-05-27 11:50 ` [RFCv1 PATCH 1/5] videodev2.h: add new hwseek capability bits Hans Verkuil
@ 2012-05-27 11:50 ` Hans Verkuil
2012-05-27 17:58 ` Hans de Goede
2012-05-27 11:50 ` [RFCv1 PATCH 3/5] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of EAGAIN Hans Verkuil
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Hans Verkuil @ 2012-05-27 11:50 UTC (permalink / raw)
To: linux-media; +Cc: Hans de Goede, halli manjunatha, Hans Verkuil
From: Hans Verkuil <hans.verkuil@cisco.com>
Update the spec with the new capabilities and specify new error codes for
S_HW_FREQ_SEEK.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
.../DocBook/media/v4l/vidioc-g-frequency.xml | 6 ++++++
Documentation/DocBook/media/v4l/vidioc-g-tuner.xml | 12 ++++++++++++
.../DocBook/media/v4l/vidioc-s-hw-freq-seek.xml | 18 +++++++++++++++---
3 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml b/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml
index 69c178a..40e58a4 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml
@@ -135,6 +135,12 @@ bounds or the value in the <structfield>type</structfield> field is
wrong.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><errorcode>EBUSY</errorcode></term>
+ <listitem>
+ <para>A hardware seek is in progress.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
</refentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
index 62a1aa2..95d5371 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
@@ -276,6 +276,18 @@ can or must be switched. (B/G PAL tuners for example are typically not
<constant>V4L2_TUNER_ANALOG_TV</constant> tuners can have this capability.</entry>
</row>
<row>
+ <entry><constant>V4L2_TUNER_CAP_HWSEEK_BOUNDED</constant></entry>
+ <entry>0x0004</entry>
+ <entry>If set, then this tuner supports the hardware seek functionality
+ where the seek stops when it reaches the end of the frequency range.</entry>
+ </row>
+ <row>
+ <entry><constant>V4L2_TUNER_CAP_HWSEEK_WRAP</constant></entry>
+ <entry>0x0008</entry>
+ <entry>If set, then this tuner supports the hardware seek functionality
+ where the seek wraps around when it reaches the end of the frequency range.</entry>
+ </row>
+ <row>
<entry><constant>V4L2_TUNER_CAP_STEREO</constant></entry>
<entry>0x0010</entry>
<entry>Stereo audio reception is supported.</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
index 407dfce..d58b648 100644
--- a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
@@ -58,6 +58,9 @@ To do this applications initialize the <structfield>tuner</structfield>,
call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant> ioctl with a pointer
to this structure.</para>
+ <para>If an error is returned, then the frequency original frequency will
+ be restored.</para>
+
<para>This ioctl is supported if the <constant>V4L2_CAP_HW_FREQ_SEEK</constant> capability is set.</para>
<table pgwide="1" frame="none" id="v4l2-hw-freq-seek">
@@ -87,7 +90,10 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
<row>
<entry>__u32</entry>
<entry><structfield>wrap_around</structfield></entry>
- <entry>If non-zero, wrap around when at the end of the frequency range, else stop seeking.</entry>
+ <entry>If non-zero, wrap around when at the end of the frequency range, else stop seeking.
+ The &v4l2-tuner; <structfield>capability</structfield> field will tell you what the
+ hardware supports.
+ </entry>
</row>
<row>
<entry>__u32</entry>
@@ -118,9 +124,15 @@ wrong.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><errorcode>EAGAIN</errorcode></term>
+ <term><errorcode>ENODATA</errorcode></term>
+ <listitem>
+ <para>The hardware seek found no channels.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><errorcode>EBUSY</errorcode></term>
<listitem>
- <para>The ioctl timed-out. Try again.</para>
+ <para>Another hardware seek is already in progress.</para>
</listitem>
</varlistentry>
</variablelist>
--
1.7.10
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [RFCv1 PATCH 3/5] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of EAGAIN.
2012-05-27 11:50 ` [RFCv1 PATCH 1/5] videodev2.h: add new hwseek capability bits Hans Verkuil
2012-05-27 11:50 ` [RFCv1 PATCH 2/5] v4l2 spec: document the new v4l2_tuner capabilities Hans Verkuil
@ 2012-05-27 11:50 ` Hans Verkuil
2012-05-27 17:59 ` Hans de Goede
2012-05-27 11:50 ` [RFCv1 PATCH 4/5] videodev2.h: add frequency band information Hans Verkuil
` (2 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Hans Verkuil @ 2012-05-27 11:50 UTC (permalink / raw)
To: linux-media; +Cc: Hans de Goede, halli manjunatha, Hans Verkuil
From: Hans Verkuil <hans.verkuil@cisco.com>
Set the new capability flags in G_TUNER and return ENODATA if no channels
were found.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/radio/radio-mr800.c | 5 +++--
drivers/media/radio/radio-wl1273.c | 3 ++-
drivers/media/radio/si470x/radio-si470x-common.c | 6 ++++--
drivers/media/radio/wl128x/fmdrv_rx.c | 2 +-
drivers/media/radio/wl128x/fmdrv_v4l2.c | 4 +++-
sound/i2c/other/tea575x-tuner.c | 4 +++-
6 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c
index 94cb6bc..3182b26 100644
--- a/drivers/media/radio/radio-mr800.c
+++ b/drivers/media/radio/radio-mr800.c
@@ -295,7 +295,8 @@ static int vidioc_g_tuner(struct file *file, void *priv,
v->type = V4L2_TUNER_RADIO;
v->rangelow = FREQ_MIN * FREQ_MUL;
v->rangehigh = FREQ_MAX * FREQ_MUL;
- v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;
+ v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO |
+ V4L2_TUNER_CAP_HWSEEK_WRAP;
v->rxsubchans = is_stereo ? V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO;
v->audmode = radio->stereo ?
V4L2_TUNER_MODE_STEREO : V4L2_TUNER_MODE_MONO;
@@ -372,7 +373,7 @@ static int vidioc_s_hw_freq_seek(struct file *file, void *priv,
timeout = jiffies + msecs_to_jiffies(30000);
for (;;) {
if (time_after(jiffies, timeout)) {
- retval = -EAGAIN;
+ retval = -ENODATA;
break;
}
if (schedule_timeout_interruptible(msecs_to_jiffies(10))) {
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c
index f1b6070..e8428f5 100644
--- a/drivers/media/radio/radio-wl1273.c
+++ b/drivers/media/radio/radio-wl1273.c
@@ -1514,7 +1514,8 @@ static int wl1273_fm_vidioc_g_tuner(struct file *file, void *priv,
tuner->rangehigh = WL1273_FREQ(WL1273_BAND_OTHER_HIGH);
tuner->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_RDS |
- V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_RDS_BLOCK_IO;
+ V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_RDS_BLOCK_IO |
+ V4L2_TUNER_CAP_HWSEEK_BOUNDED | V4L2_TUNER_CAP_HWSEEK_WRAP;
if (radio->stereo)
tuner->audmode = V4L2_TUNER_MODE_STEREO;
diff --git a/drivers/media/radio/si470x/radio-si470x-common.c b/drivers/media/radio/si470x/radio-si470x-common.c
index 969cf49..d485b79 100644
--- a/drivers/media/radio/si470x/radio-si470x-common.c
+++ b/drivers/media/radio/si470x/radio-si470x-common.c
@@ -363,7 +363,7 @@ stop:
/* try again, if timed out */
if (retval == 0 && timed_out)
- return -EAGAIN;
+ return -ENODATA;
return retval;
}
@@ -596,7 +596,9 @@ static int si470x_vidioc_g_tuner(struct file *file, void *priv,
strcpy(tuner->name, "FM");
tuner->type = V4L2_TUNER_RADIO;
tuner->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO |
- V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_BLOCK_IO;
+ V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_BLOCK_IO |
+ V4L2_TUNER_CAP_HWSEEK_BOUNDED |
+ V4L2_TUNER_CAP_HWSEEK_WRAP;
/* range limits */
switch ((radio->registers[SYSCONFIG2] & SYSCONFIG2_BAND) >> 6) {
diff --git a/drivers/media/radio/wl128x/fmdrv_rx.c b/drivers/media/radio/wl128x/fmdrv_rx.c
index 43fb722..3dd9fc0 100644
--- a/drivers/media/radio/wl128x/fmdrv_rx.c
+++ b/drivers/media/radio/wl128x/fmdrv_rx.c
@@ -251,7 +251,7 @@ again:
if (!timeleft) {
fmerr("Timeout(%d sec),didn't get tune ended int\n",
jiffies_to_msecs(FM_DRV_RX_SEEK_TIMEOUT) / 1000);
- return -ETIMEDOUT;
+ return -ENODATA;
}
int_reason = fmdev->irq_info.flag & (FM_TUNE_COMPLETE | FM_BAND_LIMIT);
diff --git a/drivers/media/radio/wl128x/fmdrv_v4l2.c b/drivers/media/radio/wl128x/fmdrv_v4l2.c
index 080b96a..49a11ec 100644
--- a/drivers/media/radio/wl128x/fmdrv_v4l2.c
+++ b/drivers/media/radio/wl128x/fmdrv_v4l2.c
@@ -285,7 +285,9 @@ static int fm_v4l2_vidioc_g_tuner(struct file *file, void *priv,
tuner->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO |
((fmdev->rx.rds.flag == FM_RDS_ENABLE) ? V4L2_TUNER_SUB_RDS : 0);
tuner->capability = V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_RDS |
- V4L2_TUNER_CAP_LOW;
+ V4L2_TUNER_CAP_LOW |
+ V4L2_TUNER_CAP_HWSEEK_BOUNDED |
+ V4L2_TUNER_CAP_HWSEEK_WRAP;
tuner->audmode = (stereo_mono_mode ?
V4L2_TUNER_MODE_MONO : V4L2_TUNER_MODE_STEREO);
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c
index 582aace..ba2bc51 100644
--- a/sound/i2c/other/tea575x-tuner.c
+++ b/sound/i2c/other/tea575x-tuner.c
@@ -191,6 +191,8 @@ static int vidioc_g_tuner(struct file *file, void *priv,
strcpy(v->name, "FM");
v->type = V4L2_TUNER_RADIO;
v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;
+ if (!tea->cannot_read_data)
+ v->capability |= V4L2_TUNER_CAP_HWSEEK_BOUNDED;
v->rangelow = FREQ_LO;
v->rangehigh = FREQ_HI;
v->rxsubchans = tea->stereo ? V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO;
@@ -299,7 +301,7 @@ static int vidioc_s_hw_freq_seek(struct file *file, void *fh,
}
tea->val &= ~TEA575X_BIT_SEARCH;
snd_tea575x_set_freq(tea);
- return -EAGAIN;
+ return -ENODATA;
}
static int tea575x_s_ctrl(struct v4l2_ctrl *ctrl)
--
1.7.10
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [RFCv1 PATCH 4/5] videodev2.h: add frequency band information.
2012-05-27 11:50 ` [RFCv1 PATCH 1/5] videodev2.h: add new hwseek capability bits Hans Verkuil
2012-05-27 11:50 ` [RFCv1 PATCH 2/5] v4l2 spec: document the new v4l2_tuner capabilities Hans Verkuil
2012-05-27 11:50 ` [RFCv1 PATCH 3/5] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of EAGAIN Hans Verkuil
@ 2012-05-27 11:50 ` Hans Verkuil
2012-05-27 18:00 ` Hans de Goede
2012-05-27 11:50 ` [RFCv1 PATCH 5/5] V4L2 spec: add frequency band documentation Hans Verkuil
2012-05-27 17:56 ` [RFCv1 PATCH 1/5] videodev2.h: add new hwseek capability bits Hans de Goede
4 siblings, 1 reply; 11+ messages in thread
From: Hans Verkuil @ 2012-05-27 11:50 UTC (permalink / raw)
To: linux-media; +Cc: Hans de Goede, halli manjunatha, Hans Verkuil
From: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
include/linux/videodev2.h | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 2339678..013ee46 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -2023,7 +2023,8 @@ struct v4l2_tuner {
__u32 audmode;
__s32 signal;
__s32 afc;
- __u32 reserved[4];
+ __u32 band;
+ __u32 reserved[3];
};
struct v4l2_modulator {
@@ -2033,7 +2034,8 @@ struct v4l2_modulator {
__u32 rangelow;
__u32 rangehigh;
__u32 txsubchans;
- __u32 reserved[4];
+ __u32 band;
+ __u32 reserved[3];
};
/* Flags for the 'capability' field */
@@ -2048,6 +2050,11 @@ struct v4l2_modulator {
#define V4L2_TUNER_CAP_RDS 0x0080
#define V4L2_TUNER_CAP_RDS_BLOCK_IO 0x0100
#define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200
+#define V4L2_TUNER_CAP_BAND_FM_EUROPE_US 0x00010000
+#define V4L2_TUNER_CAP_BAND_FM_JAPAN 0x00020000
+#define V4L2_TUNER_CAP_BAND_FM_RUSSIAN 0x00040000
+#define V4L2_TUNER_CAP_BAND_FM_WEATHER 0x00080000
+#define V4L2_TUNER_CAP_BAND_AM_MW 0x00100000
/* Flags for the 'rxsubchans' field */
#define V4L2_TUNER_SUB_MONO 0x0001
@@ -2065,6 +2072,14 @@ struct v4l2_modulator {
#define V4L2_TUNER_MODE_LANG1 0x0003
#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004
+/* Values for the 'band' field */
+#define V4L2_TUNER_BAND_DEFAULT 0
+#define V4L2_TUNER_BAND_FM_EUROPE_US 1 /* 87.5 Mhz - 108 MHz */
+#define V4L2_TUNER_BAND_FM_JAPAN 2 /* 76 MHz - 90 MHz */
+#define V4L2_TUNER_BAND_FM_RUSSIAN 3 /* 65.8 MHz - 74 MHz */
+#define V4L2_TUNER_BAND_FM_WEATHER 4 /* 162.4 MHz - 162.55 MHz */
+#define V4L2_TUNER_BAND_AM_MW 5
+
struct v4l2_frequency {
__u32 tuner;
__u32 type; /* enum v4l2_tuner_type */
--
1.7.10
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [RFCv1 PATCH 5/5] V4L2 spec: add frequency band documentation.
2012-05-27 11:50 ` [RFCv1 PATCH 1/5] videodev2.h: add new hwseek capability bits Hans Verkuil
` (2 preceding siblings ...)
2012-05-27 11:50 ` [RFCv1 PATCH 4/5] videodev2.h: add frequency band information Hans Verkuil
@ 2012-05-27 11:50 ` Hans Verkuil
2012-05-27 18:11 ` Hans de Goede
2012-05-27 17:56 ` [RFCv1 PATCH 1/5] videodev2.h: add new hwseek capability bits Hans de Goede
4 siblings, 1 reply; 11+ messages in thread
From: Hans Verkuil @ 2012-05-27 11:50 UTC (permalink / raw)
To: linux-media; +Cc: Hans de Goede, halli manjunatha, Hans Verkuil
From: Hans Verkuil <hans.verkuil@cisco.com>
Based in part on an earlier patch from <hallimanju@gmail.com>.
Signed-off-by: Hans Verkuil <hans.verkuil@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 <structfield>type</structfield> field of the respective
<structfield>tuner</structfield> field contains the index number of
the tuner.</para>
- <para>Radio devices have exactly one tuner with index zero, no
-video inputs.</para>
+ <para>Radio input devices have one or more tuners, but these are
+obviously not associated with any video inputs.</para>
<para>To query and change tuner properties applications use the
&VIDIOC-G-TUNER; and &VIDIOC-S-TUNER; ioctl, respectively. The
&v4l2-tuner; returned by <constant>VIDIOC_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
<constant>VIDIOC_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
<constant>V4L2_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 <structfield>type</structfield> field of the
respective &v4l2-output; returned by the &VIDIOC-ENUMOUTPUT; ioctl is
set to <constant>V4L2_OUTPUT_TYPE_MODULATOR</constant> and its
<structfield>modulator</structfield> field contains the index number
-of the modulator. This specification does not define radio output
-devices.</para>
+of the modulator.</para>
+
+ <para>Radio output devices have one or more modulators, but these
+are obviously not associated with any video outputs.</para>
+
+ <para>A 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>
<para>To query and change modulator properties applications use
the &VIDIOC-G-MODULATOR; and &VIDIOC-S-MODULATOR; ioctl. Note that
<constant>VIDIOC_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 <constant>V4L2_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 <errorcode>EINVAL</errorcode>.</para>
- <para>Modulators have two writable properties, an audio
-modulation set and the radio frequency. To change the modulated audio
-subprograms, applications initialize the <structfield>index
-</structfield> and <structfield>txsubchans</structfield> fields and the
-<structfield>reserved</structfield> array and call the
-<constant>VIDIOC_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
+ <para>Modulators have three writable properties, an audio
+modulation set, the frequency band and the radio frequency. To change the
+modulated audio subprograms or frequency band, applications initialize the
+<structfield>index</structfield>, <structfield>band</structfield>,
+<structfield>txsubchans</structfield> and <structfield>reserved</structfield>
+fields and call the <constant>VIDIOC_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
modulation selected.</para>
- <para>To change the radio frequency the &VIDIOC-S-FREQUENCY; ioctl
+ <para>To change the frequency the &VIDIOC-S-FREQUENCY; ioctl
is available.</para>
<table pgwide="1" frame="none" id="v4l2-modulator">
@@ -110,16 +110,16 @@ change for example with the current video standard.</entry>
<row>
<entry>__u32</entry>
<entry><structfield>rangelow</structfield></entry>
- <entry>The lowest tunable frequency in units of 62.5
-KHz, or if the <structfield>capability</structfield> flag
+ <entry>The lowest tunable frequency of the current frequency band
+in units of 62.5 kHz, or if the <structfield>capability</structfield> flag
<constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5
Hz.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>rangehigh</structfield></entry>
- <entry>The highest tunable frequency in units of 62.5
-KHz, or if the <structfield>capability</structfield> flag
+ <entry>The highest tunable frequency of the current frequency band
+in units of 62.5 kHz, or if the <structfield>capability</structfield> flag
<constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5
Hz.</entry>
</row>
@@ -138,7 +138,17 @@ indicator, for example a stereo pilot tone.</entry>
</row>
<row>
<entry>__u32</entry>
- <entry><structfield>reserved</structfield>[4]</entry>
+ <entry><structfield>band</structfield></entry>
+ <entry spanname="hspan">The frequency band. The available bands are
+ defined in the <structfield>capability</structfield> field. The band
+ <constant>V4L2_TUNER_BAND_DEFAULT</constant> is always available. After changing
+ the band the current frequency will be clamped to the new frequency range.
+ See <xref linkend="radio-bands" /> for valid band values.
+ </entry>
+ </row>
+ <row>
+ <entry>__u32</entry>
+ <entry><structfield>reserved</structfield>[3]</entry>
<entry>Reserved for future extensions. Drivers and
applications must set the array to zero.</entry>
</row>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
index 95d5371..27a8916 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
@@ -68,10 +68,10 @@ structure. Drivers fill the rest of the structure or return an
applications shall begin at index zero, incrementing by one until the
driver returns <errorcode>EINVAL</errorcode>.</para>
- <para>Tuners have two writable properties, the audio mode and
-the radio frequency. To change the audio mode, applications initialize
-the <structfield>index</structfield>,
-<structfield>audmode</structfield> and
+ <para>Tuners have three writable properties, the audio mode, the frequency
+band and the radio frequency. To change the audio mode and band, applications
+initialize the <structfield>index</structfield>,
+<structfield>audmode</structfield>, <structfield>band</structfield> and
<structfield>reserved</structfield> fields and call the
<constant>VIDIOC_S_TUNER</constant> ioctl. This will
<emphasis>not</emphasis> change the current tuner, which is determined
@@ -80,7 +80,7 @@ if the requested mode is invalid or unsupported. Since this is a
<!-- FIXME -->write-only ioctl, it does not return the actually
selected audio mode.</para>
- <para>To change the radio frequency the &VIDIOC-S-FREQUENCY; ioctl
+ <para>To change the frequency the &VIDIOC-S-FREQUENCY; ioctl
is available.</para>
<table pgwide="1" frame="none" id="v4l2-tuner">
@@ -127,16 +127,16 @@ the structure refers to a radio tuner only the
<row>
<entry>__u32</entry>
<entry><structfield>rangelow</structfield></entry>
- <entry spanname="hspan">The lowest tunable frequency in
-units of 62.5 kHz, or if the <structfield>capability</structfield>
+ <entry spanname="hspan">The lowest tunable frequency of the current
+frequency band in units of 62.5 kHz, or if the <structfield>capability</structfield>
flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5
Hz.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>rangehigh</structfield></entry>
- <entry spanname="hspan">The highest tunable frequency in
-units of 62.5 kHz, or if the <structfield>capability</structfield>
+ <entry spanname="hspan">The highest tunable frequency of the current
+frequency band in units of 62.5 kHz, or if the <structfield>capability</structfield>
flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5
Hz.</entry>
</row>
@@ -226,7 +226,17 @@ settles at zero, &ie; range is what? --></entry>
</row>
<row>
<entry>__u32</entry>
- <entry><structfield>reserved</structfield>[4]</entry>
+ <entry><structfield>band</structfield></entry>
+ <entry spanname="hspan">The frequency band. The available bands are
+ defined in the <structfield>capability</structfield> field. The band
+ <constant>V4L2_TUNER_BAND_DEFAULT</constant> is always available. After changing
+ the band the current frequency will be clamped to the new frequency range.
+ See <xref linkend="radio-bands" /> for valid band values.
+ </entry>
+ </row>
+ <row>
+ <entry>__u32</entry>
+ <entry><structfield>reserved</structfield>[3]</entry>
<entry spanname="hspan">Reserved for future extensions. Drivers and
applications must set the array to zero.</entry>
</row>
@@ -340,6 +350,31 @@ radio tuners.</entry>
<entry>0x0200</entry>
<entry>The RDS data is parsed by the hardware and set via controls.</entry>
</row>
+ <row>
+ <entry><constant>V4L2_TUNER_CAP_BAND_FM_EUROPE_US</constant></entry>
+ <entry>0x010000</entry>
+ <entry>FM radio European or US band (87.5 Mhz - 108 MHz, exact range is hardware dependent).</entry>
+ </row>
+ <row>
+ <entry><constant>V4L2_TUNER_CAP_BAND_FM_JAPAN</constant></entry>
+ <entry>0x020000</entry>
+ <entry>FM radio Japan band (76 MHz - 90 MHz, exact range is hardware dependent).</entry>
+ </row>
+ <row>
+ <entry><constant>V4L2_TUNER_CAP_BAND_FM_RUSSIAN</constant></entry>
+ <entry>0x040000</entry>
+ <entry>FM radio OIRT or Russian band (65.8 MHz - 74 MHz, exact range is hardware dependent).</entry>
+ </row>
+ <row>
+ <entry><constant>V4L2_TUNER_CAP_BAND_FM_WEATHER</constant></entry>
+ <entry>0x080000</entry>
+ <entry>FM radio weather band (162.4 MHz - 162.55 MHz, exact range is hardware dependent).</entry>
+ </row>
+ <row>
+ <entry><constant>V4L2_TUNER_CAP_BAND_AM_MW</constant></entry>
+ <entry>0x100000</entry>
+ <entry>AM radio medium wave band (520 kHz - 1710 kHz, exact range is hardware dependent).</entry>
+ </row>
</tbody>
</tgroup>
</table>
@@ -532,6 +567,39 @@ Lang1/Lang1</entry>
</tgroup>
</table>
</refsect1>
+ <table pgwide="1" frame="none" id="radio-bands">
+ <title>Radio Band Types</title>
+ <tgroup cols="2">
+ &cs-str;
+ <tbody valign="top">
+ <row>
+ <entry><constant>V4L2_TUNER_BAND_DEFAULT</constant> </entry>
+ <entry>This is the default band, which should be the widest frequency range supported by
+ the hardware. This band is always available.</entry>
+ </row>
+ <row>
+ <entry><constant>V4L2_TUNER_BAND_FM_EUROPE_US</constant> </entry>
+ <entry>FM radio European or US band (87.5 Mhz - 108 MHz, exact range is hardware dependent).</entry>
+ </row>
+ <row>
+ <entry><constant>V4L2_TUNER_BAND_FM_JAPAN</constant> </entry>
+ <entry>FM radio Japan band (76 MHz - 90 MHz, exact range is hardware dependent).</entry>
+ </row>
+ <row>
+ <entry><constant>V4L2_TUNER_BAND_FM_RUSSIAN</constant> </entry>
+ <entry>FM radio OIRT or Russian band (65.8 MHz - 74 MHz, exact range is hardware dependent).</entry>
+ </row>
+ <row>
+ <entry><constant>V4L2_TUNER_BAND_FM_WEATHER</constant> </entry>
+ <entry>FM radio weather band (162.4 MHz - 162.55 MHz, exact range is hardware dependent).</entry>
+ </row>
+ <row>
+ <entry><constant>V4L2_TUNER_BAND_AM_MW</constant> </entry>
+ <entry>AM radio medium wave band (520 kHz - 1710 kHz, exact range is hardware dependent).</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
<refsect1>
&return-value;
@@ -541,7 +609,14 @@ Lang1/Lang1</entry>
<term><errorcode>EINVAL</errorcode></term>
<listitem>
<para>The &v4l2-tuner; <structfield>index</structfield> is
-out of bounds.</para>
+out of bounds or the <structfield>band</structfield> is invalid.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><errorcode>EBUSY</errorcode></term>
+ <listitem>
+ <para>An attempt was made to change the frequency band while a hardware
+frequency seek was in progress.</para>
</listitem>
</varlistentry>
</variablelist>
diff --git a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
index d58b648..d893d67 100644
--- a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
@@ -49,7 +49,8 @@
<refsect1>
<title>Description</title>
- <para>Start a hardware frequency seek from the current frequency.
+ <para>Start a hardware frequency seek from the current frequency covering
+the current frequency band.
To do this applications initialize the <structfield>tuner</structfield>,
<structfield>type</structfield>, <structfield>seek_upward</structfield>,
<structfield>spacing</structfield> and
--
1.7.10
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [RFCv1 PATCH 1/5] videodev2.h: add new hwseek capability bits.
2012-05-27 11:50 ` [RFCv1 PATCH 1/5] videodev2.h: add new hwseek capability bits Hans Verkuil
` (3 preceding siblings ...)
2012-05-27 11:50 ` [RFCv1 PATCH 5/5] V4L2 spec: add frequency band documentation Hans Verkuil
@ 2012-05-27 17:56 ` Hans de Goede
4 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2012-05-27 17:56 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media, halli manjunatha, Hans Verkuil
Looks good:
Acked-by: Hans de Goede <hdegoede@redhat.com>
On 05/27/2012 01:50 PM, Hans Verkuil wrote:
> From: Hans Verkuil<hans.verkuil@cisco.com>
>
> Tell the application whether the hardware seek is bounded and/or wraps around.
>
> Signed-off-by: Hans Verkuil<hans.verkuil@cisco.com>
> ---
> include/linux/videodev2.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index 370d111..2339678 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -2039,6 +2039,8 @@ struct v4l2_modulator {
> /* Flags for the 'capability' field */
> #define V4L2_TUNER_CAP_LOW 0x0001
> #define V4L2_TUNER_CAP_NORM 0x0002
> +#define V4L2_TUNER_CAP_HWSEEK_BOUNDED 0x0004
> +#define V4L2_TUNER_CAP_HWSEEK_WRAP 0x0008
> #define V4L2_TUNER_CAP_STEREO 0x0010
> #define V4L2_TUNER_CAP_LANG2 0x0020
> #define V4L2_TUNER_CAP_SAP 0x0020
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFCv1 PATCH 2/5] v4l2 spec: document the new v4l2_tuner capabilities
2012-05-27 11:50 ` [RFCv1 PATCH 2/5] v4l2 spec: document the new v4l2_tuner capabilities Hans Verkuil
@ 2012-05-27 17:58 ` Hans de Goede
0 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2012-05-27 17:58 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media, halli manjunatha, Hans Verkuil
Small typo, see comment inline, with that fixed:
Acked-by: Hans de Goede <hdegoede@redhat.com>
On 05/27/2012 01:50 PM, Hans Verkuil wrote:
> From: Hans Verkuil<hans.verkuil@cisco.com>
>
> Update the spec with the new capabilities and specify new error codes for
> S_HW_FREQ_SEEK.
>
> Signed-off-by: Hans Verkuil<hans.verkuil@cisco.com>
> ---
> .../DocBook/media/v4l/vidioc-g-frequency.xml | 6 ++++++
> Documentation/DocBook/media/v4l/vidioc-g-tuner.xml | 12 ++++++++++++
> .../DocBook/media/v4l/vidioc-s-hw-freq-seek.xml | 18 +++++++++++++++---
> 3 files changed, 33 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml b/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml
> index 69c178a..40e58a4 100644
> --- a/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml
> +++ b/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml
> @@ -135,6 +135,12 @@ bounds or the value in the<structfield>type</structfield> field is
> wrong.</para>
> </listitem>
> </varlistentry>
> +<varlistentry>
> + <term><errorcode>EBUSY</errorcode></term>
> + <listitem>
> + <para>A hardware seek is in progress.</para>
> + </listitem>
> +</varlistentry>
> </variablelist>
> </refsect1>
> </refentry>
> diff --git a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
> index 62a1aa2..95d5371 100644
> --- a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
> +++ b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
> @@ -276,6 +276,18 @@ can or must be switched. (B/G PAL tuners for example are typically not
> <constant>V4L2_TUNER_ANALOG_TV</constant> tuners can have this capability.</entry>
> </row>
> <row>
> + <entry><constant>V4L2_TUNER_CAP_HWSEEK_BOUNDED</constant></entry>
> + <entry>0x0004</entry>
> + <entry>If set, then this tuner supports the hardware seek functionality
> + where the seek stops when it reaches the end of the frequency range.</entry>
> + </row>
> + <row>
> + <entry><constant>V4L2_TUNER_CAP_HWSEEK_WRAP</constant></entry>
> + <entry>0x0008</entry>
> + <entry>If set, then this tuner supports the hardware seek functionality
> + where the seek wraps around when it reaches the end of the frequency range.</entry>
> + </row>
> + <row>
> <entry><constant>V4L2_TUNER_CAP_STEREO</constant></entry>
> <entry>0x0010</entry>
> <entry>Stereo audio reception is supported.</entry>
> diff --git a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
> index 407dfce..d58b648 100644
> --- a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
> +++ b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
> @@ -58,6 +58,9 @@ To do this applications initialize the<structfield>tuner</structfield>,
> call the<constant>VIDIOC_S_HW_FREQ_SEEK</constant> ioctl with a pointer
> to this structure.</para>
>
> +<para>If an error is returned, then the frequency original frequency will
> + be restored.</para>
> +
One frequency too many in that sentence :)
> <para>This ioctl is supported if the<constant>V4L2_CAP_HW_FREQ_SEEK</constant> capability is set.</para>
>
> <table pgwide="1" frame="none" id="v4l2-hw-freq-seek">
> @@ -87,7 +90,10 @@ field and the&v4l2-tuner;<structfield>index</structfield> field.</entry>
> <row>
> <entry>__u32</entry>
> <entry><structfield>wrap_around</structfield></entry>
> - <entry>If non-zero, wrap around when at the end of the frequency range, else stop seeking.</entry>
> + <entry>If non-zero, wrap around when at the end of the frequency range, else stop seeking.
> + The&v4l2-tuner;<structfield>capability</structfield> field will tell you what the
> + hardware supports.
> + </entry>
> </row>
> <row>
> <entry>__u32</entry>
> @@ -118,9 +124,15 @@ wrong.</para>
> </listitem>
> </varlistentry>
> <varlistentry>
> - <term><errorcode>EAGAIN</errorcode></term>
> + <term><errorcode>ENODATA</errorcode></term>
> + <listitem>
> + <para>The hardware seek found no channels.</para>
> + </listitem>
> +</varlistentry>
> +<varlistentry>
> + <term><errorcode>EBUSY</errorcode></term>
> <listitem>
> - <para>The ioctl timed-out. Try again.</para>
> + <para>Another hardware seek is already in progress.</para>
> </listitem>
> </varlistentry>
> </variablelist>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFCv1 PATCH 3/5] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of EAGAIN.
2012-05-27 11:50 ` [RFCv1 PATCH 3/5] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of EAGAIN Hans Verkuil
@ 2012-05-27 17:59 ` Hans de Goede
0 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2012-05-27 17:59 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media, halli manjunatha, Hans Verkuil
Looks good:
Acked-by: Hans de Goede <hdegoede@redhat.com>
On 05/27/2012 01:50 PM, Hans Verkuil wrote:
> From: Hans Verkuil<hans.verkuil@cisco.com>
>
> Set the new capability flags in G_TUNER and return ENODATA if no channels
> were found.
>
> Signed-off-by: Hans Verkuil<hans.verkuil@cisco.com>
> ---
> drivers/media/radio/radio-mr800.c | 5 +++--
> drivers/media/radio/radio-wl1273.c | 3 ++-
> drivers/media/radio/si470x/radio-si470x-common.c | 6 ++++--
> drivers/media/radio/wl128x/fmdrv_rx.c | 2 +-
> drivers/media/radio/wl128x/fmdrv_v4l2.c | 4 +++-
> sound/i2c/other/tea575x-tuner.c | 4 +++-
> 6 files changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c
> index 94cb6bc..3182b26 100644
> --- a/drivers/media/radio/radio-mr800.c
> +++ b/drivers/media/radio/radio-mr800.c
> @@ -295,7 +295,8 @@ static int vidioc_g_tuner(struct file *file, void *priv,
> v->type = V4L2_TUNER_RADIO;
> v->rangelow = FREQ_MIN * FREQ_MUL;
> v->rangehigh = FREQ_MAX * FREQ_MUL;
> - v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;
> + v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO |
> + V4L2_TUNER_CAP_HWSEEK_WRAP;
> v->rxsubchans = is_stereo ? V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO;
> v->audmode = radio->stereo ?
> V4L2_TUNER_MODE_STEREO : V4L2_TUNER_MODE_MONO;
> @@ -372,7 +373,7 @@ static int vidioc_s_hw_freq_seek(struct file *file, void *priv,
> timeout = jiffies + msecs_to_jiffies(30000);
> for (;;) {
> if (time_after(jiffies, timeout)) {
> - retval = -EAGAIN;
> + retval = -ENODATA;
> break;
> }
> if (schedule_timeout_interruptible(msecs_to_jiffies(10))) {
> diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c
> index f1b6070..e8428f5 100644
> --- a/drivers/media/radio/radio-wl1273.c
> +++ b/drivers/media/radio/radio-wl1273.c
> @@ -1514,7 +1514,8 @@ static int wl1273_fm_vidioc_g_tuner(struct file *file, void *priv,
> tuner->rangehigh = WL1273_FREQ(WL1273_BAND_OTHER_HIGH);
>
> tuner->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_RDS |
> - V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_RDS_BLOCK_IO;
> + V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_RDS_BLOCK_IO |
> + V4L2_TUNER_CAP_HWSEEK_BOUNDED | V4L2_TUNER_CAP_HWSEEK_WRAP;
>
> if (radio->stereo)
> tuner->audmode = V4L2_TUNER_MODE_STEREO;
> diff --git a/drivers/media/radio/si470x/radio-si470x-common.c b/drivers/media/radio/si470x/radio-si470x-common.c
> index 969cf49..d485b79 100644
> --- a/drivers/media/radio/si470x/radio-si470x-common.c
> +++ b/drivers/media/radio/si470x/radio-si470x-common.c
> @@ -363,7 +363,7 @@ stop:
>
> /* try again, if timed out */
> if (retval == 0&& timed_out)
> - return -EAGAIN;
> + return -ENODATA;
> return retval;
> }
>
> @@ -596,7 +596,9 @@ static int si470x_vidioc_g_tuner(struct file *file, void *priv,
> strcpy(tuner->name, "FM");
> tuner->type = V4L2_TUNER_RADIO;
> tuner->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO |
> - V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_BLOCK_IO;
> + V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_BLOCK_IO |
> + V4L2_TUNER_CAP_HWSEEK_BOUNDED |
> + V4L2_TUNER_CAP_HWSEEK_WRAP;
>
> /* range limits */
> switch ((radio->registers[SYSCONFIG2]& SYSCONFIG2_BAND)>> 6) {
> diff --git a/drivers/media/radio/wl128x/fmdrv_rx.c b/drivers/media/radio/wl128x/fmdrv_rx.c
> index 43fb722..3dd9fc0 100644
> --- a/drivers/media/radio/wl128x/fmdrv_rx.c
> +++ b/drivers/media/radio/wl128x/fmdrv_rx.c
> @@ -251,7 +251,7 @@ again:
> if (!timeleft) {
> fmerr("Timeout(%d sec),didn't get tune ended int\n",
> jiffies_to_msecs(FM_DRV_RX_SEEK_TIMEOUT) / 1000);
> - return -ETIMEDOUT;
> + return -ENODATA;
> }
>
> int_reason = fmdev->irq_info.flag& (FM_TUNE_COMPLETE | FM_BAND_LIMIT);
> diff --git a/drivers/media/radio/wl128x/fmdrv_v4l2.c b/drivers/media/radio/wl128x/fmdrv_v4l2.c
> index 080b96a..49a11ec 100644
> --- a/drivers/media/radio/wl128x/fmdrv_v4l2.c
> +++ b/drivers/media/radio/wl128x/fmdrv_v4l2.c
> @@ -285,7 +285,9 @@ static int fm_v4l2_vidioc_g_tuner(struct file *file, void *priv,
> tuner->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO |
> ((fmdev->rx.rds.flag == FM_RDS_ENABLE) ? V4L2_TUNER_SUB_RDS : 0);
> tuner->capability = V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_RDS |
> - V4L2_TUNER_CAP_LOW;
> + V4L2_TUNER_CAP_LOW |
> + V4L2_TUNER_CAP_HWSEEK_BOUNDED |
> + V4L2_TUNER_CAP_HWSEEK_WRAP;
> tuner->audmode = (stereo_mono_mode ?
> V4L2_TUNER_MODE_MONO : V4L2_TUNER_MODE_STEREO);
>
> diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c
> index 582aace..ba2bc51 100644
> --- a/sound/i2c/other/tea575x-tuner.c
> +++ b/sound/i2c/other/tea575x-tuner.c
> @@ -191,6 +191,8 @@ static int vidioc_g_tuner(struct file *file, void *priv,
> strcpy(v->name, "FM");
> v->type = V4L2_TUNER_RADIO;
> v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;
> + if (!tea->cannot_read_data)
> + v->capability |= V4L2_TUNER_CAP_HWSEEK_BOUNDED;
> v->rangelow = FREQ_LO;
> v->rangehigh = FREQ_HI;
> v->rxsubchans = tea->stereo ? V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO;
> @@ -299,7 +301,7 @@ static int vidioc_s_hw_freq_seek(struct file *file, void *fh,
> }
> tea->val&= ~TEA575X_BIT_SEARCH;
> snd_tea575x_set_freq(tea);
> - return -EAGAIN;
> + return -ENODATA;
> }
>
> static int tea575x_s_ctrl(struct v4l2_ctrl *ctrl)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFCv1 PATCH 4/5] videodev2.h: add frequency band information.
2012-05-27 11:50 ` [RFCv1 PATCH 4/5] videodev2.h: add frequency band information Hans Verkuil
@ 2012-05-27 18:00 ` Hans de Goede
0 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2012-05-27 18:00 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media, halli manjunatha, Hans Verkuil
Looks good:
Acked-by: Hans de Goede <hdegoede@redhat.com>
On 05/27/2012 01:50 PM, Hans Verkuil wrote:
> From: Hans Verkuil<hans.verkuil@cisco.com>
>
> Signed-off-by: Hans Verkuil<hans.verkuil@cisco.com>
> ---
> include/linux/videodev2.h | 19 +++++++++++++++++--
> 1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index 2339678..013ee46 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -2023,7 +2023,8 @@ struct v4l2_tuner {
> __u32 audmode;
> __s32 signal;
> __s32 afc;
> - __u32 reserved[4];
> + __u32 band;
> + __u32 reserved[3];
> };
>
> struct v4l2_modulator {
> @@ -2033,7 +2034,8 @@ struct v4l2_modulator {
> __u32 rangelow;
> __u32 rangehigh;
> __u32 txsubchans;
> - __u32 reserved[4];
> + __u32 band;
> + __u32 reserved[3];
> };
>
> /* Flags for the 'capability' field */
> @@ -2048,6 +2050,11 @@ struct v4l2_modulator {
> #define V4L2_TUNER_CAP_RDS 0x0080
> #define V4L2_TUNER_CAP_RDS_BLOCK_IO 0x0100
> #define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200
> +#define V4L2_TUNER_CAP_BAND_FM_EUROPE_US 0x00010000
> +#define V4L2_TUNER_CAP_BAND_FM_JAPAN 0x00020000
> +#define V4L2_TUNER_CAP_BAND_FM_RUSSIAN 0x00040000
> +#define V4L2_TUNER_CAP_BAND_FM_WEATHER 0x00080000
> +#define V4L2_TUNER_CAP_BAND_AM_MW 0x00100000
>
> /* Flags for the 'rxsubchans' field */
> #define V4L2_TUNER_SUB_MONO 0x0001
> @@ -2065,6 +2072,14 @@ struct v4l2_modulator {
> #define V4L2_TUNER_MODE_LANG1 0x0003
> #define V4L2_TUNER_MODE_LANG1_LANG2 0x0004
>
> +/* Values for the 'band' field */
> +#define V4L2_TUNER_BAND_DEFAULT 0
> +#define V4L2_TUNER_BAND_FM_EUROPE_US 1 /* 87.5 Mhz - 108 MHz */
> +#define V4L2_TUNER_BAND_FM_JAPAN 2 /* 76 MHz - 90 MHz */
> +#define V4L2_TUNER_BAND_FM_RUSSIAN 3 /* 65.8 MHz - 74 MHz */
> +#define V4L2_TUNER_BAND_FM_WEATHER 4 /* 162.4 MHz - 162.55 MHz */
> +#define V4L2_TUNER_BAND_AM_MW 5
> +
> struct v4l2_frequency {
> __u32 tuner;
> __u32 type; /* enum v4l2_tuner_type */
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFCv1 PATCH 5/5] V4L2 spec: add frequency band documentation.
2012-05-27 11:50 ` [RFCv1 PATCH 5/5] V4L2 spec: add frequency band documentation Hans Verkuil
@ 2012-05-27 18:11 ` Hans de Goede
0 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2012-05-27 18:11 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media, halli manjunatha, Hans Verkuil
Hi,
Comments inline.
On 05/27/2012 01:50 PM, Hans Verkuil wrote:
> From: Hans Verkuil<hans.verkuil@cisco.com>
>
> Based in part on an earlier patch from<hallimanju@gmail.com>.
>
> Signed-off-by: Hans Verkuil<hans.verkuil@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<structfield>type</structfield> field of the respective
> <structfield>tuner</structfield> field contains the index number of
> the tuner.</para>
>
> -<para>Radio devices have exactly one tuner with index zero, no
> -video inputs.</para>
> +<para>Radio 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.
> <para>To query and change tuner properties applications use the
> &VIDIOC-G-TUNER; and&VIDIOC-S-TUNER; ioctl, respectively. The
> &v4l2-tuner; returned by<constant>VIDIOC_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
> <constant>VIDIOC_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
> <constant>V4L2_CAP_TUNER</constant> flag in the&v4l2-capability;
> returned by the&VIDIOC-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. The<structfield>type</structfield> field of the
> respective&v4l2-output; returned by the&VIDIOC-ENUMOUTPUT; ioctl is
> set to<constant>V4L2_OUTPUT_TYPE_MODULATOR</constant> and its
> <structfield>modulator</structfield> field contains the index number
> -of the modulator. This specification does not define radio output
> -devices.</para>
> +of the modulator.</para>
> +
> +<para>Radio output devices have one or more modulators, but these
> +are obviously not associated with any video outputs.</para>
> +
> +<para>A 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>
>
> <para>To query and change modulator properties applications use
> the&VIDIOC-G-MODULATOR; and&VIDIOC-S-MODULATOR; ioctl. Note that
> <constant>VIDIOC_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<constant>V4L2_CAP_MODULATOR</constant> flag in
> the&v4l2-capability; returned by the&VIDIOC-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 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<errorcode>EINVAL</errorcode>.</para>
>
> -<para>Modulators have two writable properties, an audio
> -modulation set and the radio frequency. To change the modulated audio
> -subprograms, applications initialize the<structfield>index
> -</structfield> and<structfield>txsubchans</structfield> fields and the
> -<structfield>reserved</structfield> array and call the
> -<constant>VIDIOC_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
> +<para>Modulators have three writable properties, an audio
> +modulation set, the frequency band and the radio frequency. To change the
> +modulated audio subprograms or frequency band, applications initialize the
> +<structfield>index</structfield>,<structfield>band</structfield>,
> +<structfield>txsubchans</structfield> and<structfield>reserved</structfield>
> +fields and call the<constant>VIDIOC_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
> modulation selected.</para>
>
> -<para>To change the radio frequency the&VIDIOC-S-FREQUENCY; ioctl
> +<para>To change the frequency the&VIDIOC-S-FREQUENCY; ioctl
> is available.</para>
>
> <table pgwide="1" frame="none" id="v4l2-modulator">
> @@ -110,16 +110,16 @@ change for example with the current video standard.</entry>
> <row>
> <entry>__u32</entry>
> <entry><structfield>rangelow</structfield></entry>
> - <entry>The lowest tunable frequency in units of 62.5
> -KHz, or if the<structfield>capability</structfield> flag
> + <entry>The lowest tunable frequency of the current frequency band
> +in units of 62.5 kHz, or if the<structfield>capability</structfield> flag
> <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5
> Hz.</entry>
> </row>
> <row>
> <entry>__u32</entry>
> <entry><structfield>rangehigh</structfield></entry>
> - <entry>The highest tunable frequency in units of 62.5
> -KHz, or if the<structfield>capability</structfield> flag
> + <entry>The highest tunable frequency of the current frequency band
> +in units of 62.5 kHz, or if the<structfield>capability</structfield> flag
> <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5
> Hz.</entry>
> </row>
> @@ -138,7 +138,17 @@ indicator, for example a stereo pilot tone.</entry>
> </row>
> <row>
> <entry>__u32</entry>
> - <entry><structfield>reserved</structfield>[4]</entry>
> + <entry><structfield>band</structfield></entry>
> + <entry spanname="hspan">The frequency band. The available bands are
> + defined in the<structfield>capability</structfield> field. The band
> + <constant>V4L2_TUNER_BAND_DEFAULT</constant> is always available. After changing
> + the band the current frequency will be clamped to the new frequency range.
> + See<xref linkend="radio-bands" /> for valid band values.
> + </entry>
> + </row>
> + <row>
> + <entry>__u32</entry>
> + <entry><structfield>reserved</structfield>[3]</entry>
> <entry>Reserved for future extensions. Drivers and
> applications must set the array to zero.</entry>
> </row>
> diff --git a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
> index 95d5371..27a8916 100644
> --- a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
> +++ b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
> @@ -68,10 +68,10 @@ structure. Drivers fill the rest of the structure or return an
> applications shall begin at index zero, incrementing by one until the
> driver returns<errorcode>EINVAL</errorcode>.</para>
>
> -<para>Tuners have two writable properties, the audio mode and
> -the radio frequency. To change the audio mode, applications initialize
> -the<structfield>index</structfield>,
> -<structfield>audmode</structfield> and
> +<para>Tuners have three writable properties, the audio mode, the frequency
> +band and the radio frequency. To change the audio mode and band, applications
> +initialize the<structfield>index</structfield>,
> +<structfield>audmode</structfield>,<structfield>band</structfield> and
> <structfield>reserved</structfield> fields and call the
> <constant>VIDIOC_S_TUNER</constant> ioctl. This will
> <emphasis>not</emphasis> change the current tuner, which is determined
> @@ -80,7 +80,7 @@ if the requested mode is invalid or unsupported. Since this is a
> <!-- FIXME -->write-only ioctl, it does not return the actually
> selected audio mode.</para>
>
> -<para>To change the radio frequency the&VIDIOC-S-FREQUENCY; ioctl
> +<para>To change the frequency the&VIDIOC-S-FREQUENCY; ioctl
> is available.</para>
>
> <table pgwide="1" frame="none" id="v4l2-tuner">
> @@ -127,16 +127,16 @@ the structure refers to a radio tuner only the
> <row>
> <entry>__u32</entry>
> <entry><structfield>rangelow</structfield></entry>
> - <entry spanname="hspan">The lowest tunable frequency in
> -units of 62.5 kHz, or if the<structfield>capability</structfield>
> + <entry spanname="hspan">The lowest tunable frequency of the current
> +frequency band in units of 62.5 kHz, or if the<structfield>capability</structfield>
> flag<constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5
> Hz.</entry>
> </row>
> <row>
> <entry>__u32</entry>
> <entry><structfield>rangehigh</structfield></entry>
> - <entry spanname="hspan">The highest tunable frequency in
> -units of 62.5 kHz, or if the<structfield>capability</structfield>
> + <entry spanname="hspan">The highest tunable frequency of the current
> +frequency band in units of 62.5 kHz, or if the<structfield>capability</structfield>
> flag<constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5
> Hz.</entry>
> </row>
> @@ -226,7 +226,17 @@ settles at zero,&ie; range is what? --></entry>
> </row>
> <row>
> <entry>__u32</entry>
> - <entry><structfield>reserved</structfield>[4]</entry>
> + <entry><structfield>band</structfield></entry>
> + <entry spanname="hspan">The frequency band. The available bands are
> + defined in the<structfield>capability</structfield> field. The band
> + <constant>V4L2_TUNER_BAND_DEFAULT</constant> is always available. After changing
> + the band the current frequency will be clamped to the new frequency range.
> + See<xref linkend="radio-bands" /> for valid band values.
> + </entry>
> + </row>
> + <row>
> + <entry>__u32</entry>
> + <entry><structfield>reserved</structfield>[3]</entry>
> <entry spanname="hspan">Reserved for future extensions. Drivers and
> applications must set the array to zero.</entry>
> </row>
> @@ -340,6 +350,31 @@ radio tuners.</entry>
> <entry>0x0200</entry>
> <entry>The RDS data is parsed by the hardware and set via controls.</entry>
> </row>
> + <row>
> + <entry><constant>V4L2_TUNER_CAP_BAND_FM_EUROPE_US</constant></entry>
> + <entry>0x010000</entry>
> + <entry>FM radio European or US band (87.5 Mhz - 108 MHz, exact range is hardware dependent).</entry>
> + </row>
> + <row>
> + <entry><constant>V4L2_TUNER_CAP_BAND_FM_JAPAN</constant></entry>
> + <entry>0x020000</entry>
> + <entry>FM radio Japan band (76 MHz - 90 MHz, exact range is hardware dependent).</entry>
> + </row>
> + <row>
> + <entry><constant>V4L2_TUNER_CAP_BAND_FM_RUSSIAN</constant></entry>
> + <entry>0x040000</entry>
> + <entry>FM radio OIRT or Russian band (65.8 MHz - 74 MHz, exact range is hardware dependent).</entry>
> + </row>
> + <row>
> + <entry><constant>V4L2_TUNER_CAP_BAND_FM_WEATHER</constant></entry>
> + <entry>0x080000</entry>
> + <entry>FM radio weather band (162.4 MHz - 162.55 MHz, exact range is hardware dependent).</entry>
> + </row>
> + <row>
> + <entry><constant>V4L2_TUNER_CAP_BAND_AM_MW</constant></entry>
> + <entry>0x100000</entry>
> + <entry>AM radio medium wave band (520 kHz - 1710 kHz, exact range is hardware dependent).</entry>
> + </row>
> </tbody>
> </tgroup>
> </table>
> @@ -532,6 +567,39 @@ Lang1/Lang1</entry>
> </tgroup>
> </table>
> </refsect1>
> +<table pgwide="1" frame="none" id="radio-bands">
> +<title>Radio Band Types</title>
> +<tgroup cols="2">
> + &cs-str;
> + <tbody valign="top">
> + <row>
> + <entry><constant>V4L2_TUNER_BAND_DEFAULT</constant> </entry>
> + <entry>This is the default band, which should be the widest frequency range supported by
> + the hardware. This band is always available.</entry>
> + </row>
> + <row>
> + <entry><constant>V4L2_TUNER_BAND_FM_EUROPE_US</constant> </entry>
> + <entry>FM radio European or US band (87.5 Mhz - 108 MHz, exact range is hardware dependent).</entry>
> + </row>
> + <row>
> + <entry><constant>V4L2_TUNER_BAND_FM_JAPAN</constant> </entry>
> + <entry>FM radio Japan band (76 MHz - 90 MHz, exact range is hardware dependent).</entry>
> + </row>
> + <row>
> + <entry><constant>V4L2_TUNER_BAND_FM_RUSSIAN</constant> </entry>
> + <entry>FM radio OIRT or Russian band (65.8 MHz - 74 MHz, exact range is hardware dependent).</entry>
> + </row>
> + <row>
> + <entry><constant>V4L2_TUNER_BAND_FM_WEATHER</constant> </entry>
> + <entry>FM radio weather band (162.4 MHz - 162.55 MHz, exact range is hardware dependent).</entry>
> + </row>
> + <row>
> + <entry><constant>V4L2_TUNER_BAND_AM_MW</constant> </entry>
> + <entry>AM radio medium wave band (520 kHz - 1710 kHz, exact range is hardware dependent).</entry>
> + </row>
> + </tbody>
> +</tgroup>
> +</table>
>
> <refsect1>
> &return-value;
> @@ -541,7 +609,14 @@ Lang1/Lang1</entry>
> <term><errorcode>EINVAL</errorcode></term>
> <listitem>
> <para>The&v4l2-tuner;<structfield>index</structfield> is
> -out of bounds.</para>
> +out of bounds or the<structfield>band</structfield> is invalid.</para>
> + </listitem>
> +</varlistentry>
> +<varlistentry>
> + <term><errorcode>EBUSY</errorcode></term>
> + <listitem>
> + <para>An attempt was made to change the frequency band while a hardware
> +frequency seek was in progress.</para>
> </listitem>
> </varlistentry>
> </variablelist>
> diff --git a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
> index d58b648..d893d67 100644
> --- a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
> +++ b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
> @@ -49,7 +49,8 @@
> <refsect1>
> <title>Description</title>
>
> -<para>Start a hardware frequency seek from the current frequency.
> +<para>Start a hardware frequency seek from the current frequency covering
> +the current frequency band.
> To do this applications initialize the<structfield>tuner</structfield>,
> <structfield>type</structfield>,<structfield>seek_upward</structfield>,
> <structfield>spacing</structfield> and
The actual frequency band documentation part looks good :)
Regards,
Hans
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-05-27 18:11 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-27 11:50 [RFCv1 PATCH 0/5] Add hwseek caps and frequency bands Hans Verkuil
2012-05-27 11:50 ` [RFCv1 PATCH 1/5] videodev2.h: add new hwseek capability bits Hans Verkuil
2012-05-27 11:50 ` [RFCv1 PATCH 2/5] v4l2 spec: document the new v4l2_tuner capabilities Hans Verkuil
2012-05-27 17:58 ` Hans de Goede
2012-05-27 11:50 ` [RFCv1 PATCH 3/5] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of EAGAIN Hans Verkuil
2012-05-27 17:59 ` Hans de Goede
2012-05-27 11:50 ` [RFCv1 PATCH 4/5] videodev2.h: add frequency band information Hans Verkuil
2012-05-27 18:00 ` Hans de Goede
2012-05-27 11:50 ` [RFCv1 PATCH 5/5] V4L2 spec: add frequency band documentation Hans Verkuil
2012-05-27 18:11 ` Hans de Goede
2012-05-27 17:56 ` [RFCv1 PATCH 1/5] videodev2.h: add new hwseek capability bits Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).