diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-06-24 14:47:56 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2006-06-24 14:47:56 +0200 |
commit | bfb61b19e1ac6aba274aa46f23ed8dc621c88a86 (patch) | |
tree | faf37257d318065a1dcb24ec1ec3736d427a7583 /linux/drivers/media/video/tuner-core.c | |
parent | 7b3bc6a8a45954a235cdceccbd474d01e36468b4 (diff) | |
download | mediapointer-dvb-s2-bfb61b19e1ac6aba274aa46f23ed8dc621c88a86.tar.gz mediapointer-dvb-s2-bfb61b19e1ac6aba274aa46f23ed8dc621c88a86.tar.bz2 |
Always switch tuner mode when calling VIDIOC_S_FREQUENCY.
From: Hans Verkuil <hverkuil@xs4all.nl>
Fixes the weird and incorrect condition in VIDIOC_S_FREQUENCY.
The tuner should always be switched to the mode specified in the
v4l2_frequency struct. Much simpler and also corresponding to the
v4l2 specification.
The old condition made it impossible to switch from radio to
analog tv mode using VIDIOC_S_FREQUENCY. Instead the (tv) frequency would
be given to the radio tuner.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index be47ad3b3..5718aef03 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -794,14 +794,10 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) { struct v4l2_frequency *f = arg; + if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY") + == EINVAL) + return 0; switch_v4l2(); - if ((V4L2_TUNER_RADIO == f->type && V4L2_TUNER_RADIO != t->mode) - || (V4L2_TUNER_DIGITAL_TV == f->type - && V4L2_TUNER_DIGITAL_TV != t->mode)) { - if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY") - == EINVAL) - return 0; - } set_freq(client,f->frequency); break; |