Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8b811cf0c618915b286b5f829a77349a200b814c
Commit:     8b811cf0c618915b286b5f829a77349a200b814c
Parent:     ec709bb801a98dcac0a95c060c431eda73e31587
Author:     Douglas Landgraf <[EMAIL PROTECTED]>
AuthorDate: Fri Apr 20 06:37:36 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 15:45:44 2007 -0300

    V4L/DVB (5539): Radio-rtrack2.c Added VIDIOC_[GS]_AUDIO and 
VIDIOC_[S|G]_INPUT
    
    Implements VIDIOC_[GS]_AUDIO and VIDIOC_[S|G]_INPUT on radio-rtrack2
    
    Signed-off-by: Douglas Schilling Landgraf <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/radio/radio-rtrack2.c |   36 +++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/drivers/media/radio/radio-rtrack2.c 
b/drivers/media/radio/radio-rtrack2.c
index 4239a7f..9b493b3 100644
--- a/drivers/media/radio/radio-rtrack2.c
+++ b/drivers/media/radio/radio-rtrack2.c
@@ -249,6 +249,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 = {
@@ -275,6 +307,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)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to