diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-20 06:37:36 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-20 06:37:36 -0300 |
commit | 14cb5f7ce8f344cf94d204f0bb656b76498586d1 (patch) | |
tree | 1a6694319c7eee5a4063f6a88da89bc39929e7c1 /linux/drivers/media/radio/radio-rtrack2.c | |
parent | 94c3fcdb21ca688e10e33e58b83d589223f91cfa (diff) | |
download | mediapointer-dvb-s2-14cb5f7ce8f344cf94d204f0bb656b76498586d1.tar.gz mediapointer-dvb-s2-14cb5f7ce8f344cf94d204f0bb656b76498586d1.tar.bz2 |
Radio-rtrack2.c Added VIDIOC_[GS]_AUDIO and VIDIOC_[S|G]_INPUT
From: Douglas Landgraf <dougsland@gmail.com>
Implements VIDIOC_[GS]_AUDIO and VIDIOC_[S|G]_INPUT on radio-rtrack2
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/radio/radio-rtrack2.c')
-rw-r--r-- | linux/drivers/media/radio/radio-rtrack2.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/linux/drivers/media/radio/radio-rtrack2.c b/linux/drivers/media/radio/radio-rtrack2.c index 9ba7c5d52..e8ab31ab6 100644 --- a/linux/drivers/media/radio/radio-rtrack2.c +++ b/linux/drivers/media/radio/radio-rtrack2.c @@ -250,6 +250,38 @@ static int vidioc_s_ctrl(struct file *file, void *priv, return -EINVAL; } +static int vidioc_g_audio(struct file *file, void *priv, + struct v4l2_audio *a) +{ + if (a->index > 1) + return -EINVAL; + + strcpy(a->name, "Radio"); + a->capability = V4L2_AUDCAP_STEREO; + return 0; +} + +static int vidioc_g_input(struct file *filp, void *priv, unsigned int *i) +{ + *i = 0; + return 0; +} + +static int vidioc_s_input(struct file *filp, void *priv, unsigned int i) +{ + if (i != 0) + return -EINVAL; + return 0; +} + +static int vidioc_s_audio(struct file *file, void *priv, + struct v4l2_audio *a) +{ + if (a->index != 0) + return -EINVAL; + return 0; +} + static struct rt_device rtrack2_unit; static const struct file_operations rtrack2_fops = { @@ -276,6 +308,10 @@ static struct video_device rtrack2_radio= .vidioc_queryctrl = vidioc_queryctrl, .vidioc_g_ctrl = vidioc_g_ctrl, .vidioc_s_ctrl = vidioc_s_ctrl, + .vidioc_g_audio = vidioc_g_audio, + .vidioc_s_audio = vidioc_s_audio, + .vidioc_g_input = vidioc_g_input, + .vidioc_s_input = vidioc_s_input, }; static int __init rtrack2_init(void) |