提交 c184ca36 编写于 作者: J Jiri Benc 提交者: Linus Torvalds

[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: NJiri Benc <jbenc@suse.cz>
Cc: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 e99d3438
...@@ -360,6 +360,15 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -360,6 +360,15 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
set_freq(client,f->frequency); set_freq(client,f->frequency);
break; 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: case VIDIOC_G_TUNER:
{ {
struct v4l2_tuner *tuner = arg; struct v4l2_tuner *tuner = arg;
...@@ -367,6 +376,8 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -367,6 +376,8 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
SWITCH_V4L2; SWITCH_V4L2;
if (V4L2_TUNER_RADIO == t->mode && t->has_signal) if (V4L2_TUNER_RADIO == t->mode && t->has_signal)
tuner->signal = t->has_signal(client); tuner->signal = t->has_signal(client);
tuner->rangelow = tv_range[0] * 16;
tuner->rangehigh = tv_range[1] * 16;
break; break;
} }
default: default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册