diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-01-25 19:00:45 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 16:34:56 +0100 |
commit | 140dcc46ede8dcd9032bbe0ce52eb4df104a1ab0 (patch) | |
tree | cc24b1e7ab2a8f2cb35ec2d0472d5de9cf936899 /drivers/media/radio/radio-maxiradio.c | |
parent | V4L/DVB (5149): Convert radio-maxiradio to use video_ioctl2 (diff) | |
download | linux-140dcc46ede8dcd9032bbe0ce52eb4df104a1ab0.tar.xz linux-140dcc46ede8dcd9032bbe0ce52eb4df104a1ab0.zip |
V4L/DVB (5150): Implement VIDIOC_[GS]_AUDIO on maxiradio
v4l1-compat requires those two ioctls to translate VIDIOC[SG]RADIO
into V4L2 calls.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/radio/radio-maxiradio.c')
-rw-r--r-- | drivers/media/radio/radio-maxiradio.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index 2fc866086d13..40494dc5b7ff 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c @@ -220,6 +220,26 @@ static int vidioc_s_tuner (struct file *file, void *priv, return 0; } +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_s_audio (struct file *file, void *priv, + struct v4l2_audio *a) +{ + if (a->index != 0) + return -EINVAL; + + return 0; +} + static int vidioc_s_frequency (struct file *file, void *priv, struct v4l2_frequency *f) { @@ -304,6 +324,8 @@ static struct video_device maxiradio_radio = .vidioc_querycap = vidioc_querycap, .vidioc_g_tuner = vidioc_g_tuner, .vidioc_s_tuner = vidioc_s_tuner, + .vidioc_g_audio = vidioc_g_audio, + .vidioc_s_audio = vidioc_s_audio, .vidioc_g_frequency = vidioc_g_frequency, .vidioc_s_frequency = vidioc_s_frequency, .vidioc_queryctrl = vidioc_queryctrl, |