V4L/DVB (4935): Added the capability of selecting fm gain by tuner
authorMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 4 Dec 2006 11:31:38 +0000 (08:31 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 10 Dec 2006 11:05:52 +0000 (09:05 -0200)
Some tuners require using cGainNormal instead of cGainLow for
high sensibility on FM reception.

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

index fcf8693e4d509e7fadbe818be5678ac5a557d1c9..1b9b0742f753f53c181391b24eceac1b88d6e3c9 100644 (file)
@@ -467,6 +467,8 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
                        config |= TDA9887_INTERCARRIER;
 /*             if (params->port1_set_for_fm_mono)
                        config &= ~TDA9887_PORT1_ACTIVE;*/
+               if (params->fm_gain_normal)
+                       config |= TDA9887_GAIN_NORMAL;
                i2c_clients_command(c->adapter, TDA9887_SET_CONFIG, &config);
        }
        if (4 != (rc = i2c_master_send(c,buffer,4)))
index 37dad07a8439434c26127c2c766ceb8b2c03354f..e5ad3fcfe9845d1ba8a37babcd3871461a141f29 100644 (file)
@@ -50,6 +50,10 @@ struct tuner_params {
           sensitivity. If this setting is 1, then set PORT2 to 1 to
           get proper FM reception. */
        unsigned int port2_fm_high_sensitivity:1;
+       /* Some Philips tuners use tda9887 cGainNormal to select the FM radio
+          sensitivity. If this setting is 1, e register will use cGainNormal
+          instead of cGainLow. */
+       unsigned int fm_gain_normal:1;
        /* Most tuners with a tda9887 use QSS mode. Some (cheaper) tuners
           use Intercarrier mode. If this setting is 1, then the tuner
           needs to be set to intercarrier mode. */