Skip to content

Commit

Permalink
[PATCH] video/tuner: add VIDEO_G_FREQUENCY and freq range to VIDIOC_G…
Browse files Browse the repository at this point in the history
…_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>
  • Loading branch information
Jiri Benc authored and Linus Torvalds committed May 7, 2005
1 parent e99d343 commit c184ca3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,24 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
set_freq(client,f->frequency);
break;
}
case VIDIOC_G_FREQUENCY:
{
struct v4l2_frequency *f = arg;

SWITCH_V4L2;
f->type = t->mode;
f->frequency = t->freq;
break;
}
case VIDIOC_G_TUNER:
{
struct v4l2_tuner *tuner = arg;

SWITCH_V4L2;
if (V4L2_TUNER_RADIO == t->mode && t->has_signal)
tuner->signal = t->has_signal(client);
tuner->rangelow = tv_range[0] * 16;
tuner->rangehigh = tv_range[1] * 16;
break;
}
default:
Expand Down

0 comments on commit c184ca3

Please sign in to comment.