summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-01-25 16:10:31 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-01-25 16:10:31 -0200
commitadac799136b064fd08852b7ea1ef826b3ed7a7bc (patch)
tree3dfa031bd0d3b60fdf383e8f3ff2d23e0cc11a9d /linux/drivers
parentc369e78082f650bc897742b3b0d3ef65a52653bd (diff)
downloadmediapointer-dvb-s2-adac799136b064fd08852b7ea1ef826b3ed7a7bc.tar.gz
mediapointer-dvb-s2-adac799136b064fd08852b7ea1ef826b3ed7a7bc.tar.bz2
Implement VIDIOC_[GS]_AUDIO on aztech
From: Mauro Carvalho Chehab <mchehab@infradead.org> 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 'linux/drivers')
-rw-r--r--linux/drivers/media/radio/radio-aztech.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/linux/drivers/media/radio/radio-aztech.c b/linux/drivers/media/radio/radio-aztech.c
index c112b56e6..198eec12c 100644
--- a/linux/drivers/media/radio/radio-aztech.c
+++ b/linux/drivers/media/radio/radio-aztech.c
@@ -231,6 +231,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)
{
@@ -331,6 +351,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,