diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-01-25 15:10:31 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 13:34:56 -0200 |
commit | 676b0ac7aa409d326d92ca46c65bba20bebb3c1c (patch) | |
tree | 158ccf040e0c051afefba31fbb908e170dc41db8 /drivers/media/radio | |
parent | 140dcc46ede8dcd9032bbe0ce52eb4df104a1ab0 (diff) | |
download | linux-676b0ac7aa409d326d92ca46c65bba20bebb3c1c.tar.bz2 |
V4L/DVB (5151): Implement VIDIOC_[GS]_AUDIO on aztech
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')
-rw-r--r-- | drivers/media/radio/radio-aztech.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c index 91d69c8ad3cd..9bf25820169b 100644 --- a/drivers/media/radio/radio-aztech.c +++ b/drivers/media/radio/radio-aztech.c @@ -226,6 +226,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) { @@ -326,6 +346,8 @@ static struct video_device aztech_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, |