[media] bttv: fix g_tuner capabilities override
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 6 Feb 2013 15:44:07 +0000 (12:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 5 Mar 2013 17:23:59 +0000 (14:23 -0300)
The capability field of v4l2_tuner should be ORed by the various subdevs
and by the main driver. In this case the stereo capability was dropped.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/i2c/tvaudio.c
drivers/media/pci/bt8xx/bttv-driver.c

index e3b33b78dd215024aa1f8f691811c1debe2badb9..4c91b355b55a1e8f9989ccc7d19fb1939ef5b665 100644 (file)
@@ -1803,7 +1803,7 @@ static int tvaudio_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
 
        vt->audmode = chip->audmode;
        vt->rxsubchans = desc->getrxsubchans(chip);
-       vt->capability = V4L2_TUNER_CAP_STEREO |
+       vt->capability |= V4L2_TUNER_CAP_STEREO |
                V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2;
 
        return 0;
index 46ead7d65af15ae57b0daa5b4c1d3d6dcea33663..0fdaef225c9e9e64ce119729881cdf35e0bde3a2 100644 (file)
@@ -2787,9 +2787,9 @@ static int bttv_g_tuner(struct file *file, void *priv,
                return -EINVAL;
 
        t->rxsubchans = V4L2_TUNER_SUB_MONO;
+       t->capability = V4L2_TUNER_CAP_NORM;
        bttv_call_all(btv, tuner, g_tuner, t);
        strcpy(t->name, "Television");
-       t->capability = V4L2_TUNER_CAP_NORM;
        t->type       = V4L2_TUNER_ANALOG_TV;
        if (btread(BT848_DSTATUS)&BT848_DSTATUS_HLOC)
                t->signal = 0xffff;