aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorJiri Benc <jbenc@suse.cz>2005-05-07 00:30:42 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-07 01:09:28 -0400
commitc184ca3681ee9ae0bb63cb591e1e16f42536415c (patch)
tree8501d28eaee55072a77148847a3564516d93c694 /drivers/media/video
parente99d3438e4db1ef9e4cae5ad3946c76f4ffd268d (diff)
[PATCH] video/tuner: add VIDEO_G_FREQUENCY and freq range to VIDIOC_G_TUNER
This patch adds a VIDIOC_G_FREQUENCY command to tuner-core.c and sets lowest and highest tunable frequencies in v4l2_tuner structure returned by VIDIOC_G_TUNER command. Signed-off-by: Jiri Benc <jbenc@suse.cz> Cc: Gerd Knorr <kraxel@bytesex.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/tuner-core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index c7d0c9f093fa..6212388edb75 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -360,6 +360,15 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
360 set_freq(client,f->frequency); 360 set_freq(client,f->frequency);
361 break; 361 break;
362 } 362 }
363 case VIDIOC_G_FREQUENCY:
364 {
365 struct v4l2_frequency *f = arg;
366
367 SWITCH_V4L2;
368 f->type = t->mode;
369 f->frequency = t->freq;
370 break;
371 }
363 case VIDIOC_G_TUNER: 372 case VIDIOC_G_TUNER:
364 { 373 {
365 struct v4l2_tuner *tuner = arg; 374 struct v4l2_tuner *tuner = arg;
@@ -367,6 +376,8 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
367 SWITCH_V4L2; 376 SWITCH_V4L2;
368 if (V4L2_TUNER_RADIO == t->mode && t->has_signal) 377 if (V4L2_TUNER_RADIO == t->mode && t->has_signal)
369 tuner->signal = t->has_signal(client); 378 tuner->signal = t->has_signal(client);
379 tuner->rangelow = tv_range[0] * 16;
380 tuner->rangehigh = tv_range[1] * 16;
370 break; 381 break;
371 } 382 }
372 default: 383 default: