V4L/DVB (4934): Usbvision radio requires GainNormal at e register
authorMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 4 Dec 2006 11:31:35 +0000 (08:31 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 10 Dec 2006 11:05:51 +0000 (09:05 -0200)
Adds an option to select GainNormal at tda9887 and make usbvision
to use it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tda9887.c
drivers/media/video/usbvision/usbvision-core.c
include/media/tuner.h

index 87ffb0e84a7a063cd34589d8705e00d1a9b1b28b..fde576f1101cb3f980c9cb616aa3ae7ee1be48c3 100644 (file)
@@ -482,6 +482,12 @@ static int tda9887_set_config(struct tuner *t, char *buf)
                buf[1] &= ~cQSS;
        if (t->tda9887_config & TDA9887_GATING_18)
                buf[3] &= ~cGating_36;
+
+       if (t->tda9887_config & TDA9887_GAIN_NORMAL) {
+               radio_stereo.e &= ~cTunerGainLow;
+               radio_mono.e &= ~cTunerGainLow;
+       }
+
        return 0;
 }
 
index 0365c7f93972bc2ad12dc04b5d873e9bb6dd1ae9..b5aa3185402d4cb5767174f25698d0555e8d4e25 100644 (file)
@@ -2585,12 +2585,15 @@ static int attach_inform(struct i2c_client *client)
                case 0x4b:
                {
                        struct tuner_setup tun_setup;
+                       unsigned int tda9887_conf = TDA9887_GAIN_NORMAL;
 
                        tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
                        tun_setup.type = TUNER_TDA9887;
                        tun_setup.addr = client->addr;
 
                        call_i2c_clients(usbvision, TUNER_SET_TYPE_ADDR, &tun_setup);
+                       call_i2c_clients(usbvision,TDA9887_SET_CONFIG, &tda9887_conf);
+
                        break;
                }
                case 0x42:
index 3116e750132f2e7575e07d2caced3b21bdf34bdb..99acf847365caa81d4bab76a3dcd4e954fc145e0 100644 (file)
@@ -145,6 +145,7 @@ extern int tuner_debug;
 #define TDA9887_DEEMPHASIS_75          (3<<16)
 #define TDA9887_AUTOMUTE               (1<<18)
 #define TDA9887_GATING_18              (1<<19)
+#define TDA9887_GAIN_NORMAL            (1<<20)
 
 #ifdef __KERNEL__