]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (5151): Implement VIDIOC_[GS]_AUDIO on aztech
authorMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 25 Jan 2007 18:10:31 +0000 (15:10 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 21 Feb 2007 15:34:56 +0000 (13:34 -0200)
v4l1-compat requires those two ioctls to translate VIDIOC[SG]RADIO
into V4L2 calls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/radio/radio-aztech.c

index 91d69c8ad3cd86bce4fe386ece0724d4d59798f6..9bf25820169b64e6e093b2edc155de76a47e06ed 100644 (file)
@@ -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,