]> git.karo-electronics.de Git - linux-beck.git/commitdiff
V4L/DVB (12216): saa7134: set RDS capability if applicable.
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 20 Jun 2009 09:09:52 +0000 (06:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 12 Sep 2009 15:17:32 +0000 (12:17 -0300)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134-video.c
drivers/media/video/saa7134/saa7134.h

index 94a023a14bbc7109843cd7ebae941204d9659604..cb78c956d810fc1c83fdce543f95ba568f15b603 100644 (file)
@@ -1012,8 +1012,10 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
                sd = v4l2_i2c_new_probed_subdev_addr(&dev->v4l2_dev,
                                &dev->i2c_adap, "saa6588", "saa6588",
                                saa7134_boards[dev->board].rds_addr);
-               if (sd)
+               if (sd) {
                        printk(KERN_INFO "%s: found RDS decoder\n", dev->name);
+                       dev->has_rds = 1;
+               }
        }
 
        request_submodules(dev);
index bf4c99d191508b5612ff6dc813a3b29f64a749ec..58854df5382b0620a94015db5681827082e41210 100644 (file)
@@ -1819,6 +1819,8 @@ static int saa7134_querycap(struct file *file, void  *priv,
                V4L2_CAP_READWRITE |
                V4L2_CAP_STREAMING |
                V4L2_CAP_TUNER;
+       if (dev->has_rds)
+               cap->capabilities |= V4L2_CAP_RDS_CAPTURE;
        if (saa7134_no_overlay <= 0)
                cap->capabilities |= V4L2_CAP_VIDEO_OVERLAY;
 
index fb564f14887cc0e814f0adcb29a738595cea937c..ab28a691e09a120f81f721a29b75920b4f8c581f 100644 (file)
@@ -539,6 +539,7 @@ struct saa7134_dev {
        struct i2c_adapter         i2c_adap;
        struct i2c_client          i2c_client;
        unsigned char              eedata[256];
+       int                        has_rds;
 
        /* video overlay */
        struct v4l2_framebuffer    ovbuf;