]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
V4L/DVB (4533): Tda9887: add configuration setting for L standard PLL gating
authorTrent Piepho <xyzzy@speakeasy.org>
Fri, 25 Aug 2006 01:43:45 +0000 (22:43 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 26 Sep 2006 15:30:34 +0000 (12:30 -0300)
Add a tuner config parameter for TDA9887, default_pll_gating_18, that
changes the L standard PLL gating value from 36% to 0% (datasheet says
0%, tda9887 code says 18%).
Turn this on for Microtune 4049FM5, as recomended by tuner datasheet.

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

index 8dab481d384aa58b292de4dd26fd6155c8fda1ac..87ffb0e84a7a063cd34589d8705e00d1a9b1b28b 100644 (file)
@@ -480,6 +480,8 @@ static int tda9887_set_config(struct tuner *t, char *buf)
        }
        if ((t->tda9887_config & TDA9887_INTERCARRIER_NTSC) && (t->std & V4L2_STD_NTSC))
                buf[1] &= ~cQSS;
+       if (t->tda9887_config & TDA9887_GATING_18)
+               buf[3] &= ~cGating_36;
        return 0;
 }
 
index 4cfe71ba7304cd237bada76a5a138ab2d3c4a116..63db4e97ae6ce57a6003d55b0b0c6a187cc46e6e 100644 (file)
@@ -331,6 +331,8 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
                        else if (params->default_top_high)
                                config |= TDA9887_TOP(params->default_top_high);
                }
+               if (params->default_pll_gating_18)
+                       config |= TDA9887_GATING_18;
                i2c_clients_command(c->adapter, TDA9887_SET_CONFIG, &config);
        }
        tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n",
index 8b542599ed471c0f84c9e4247d627178d87a4fd9..8fff642fad56fa8e2579c2741d96818ea6850d94 100644 (file)
@@ -650,6 +650,7 @@ static struct tuner_params tuner_microtune_4049_fm5_params[] = {
                .count  = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges),
                .has_tda9887 = 1,
                .port1_invert_for_secam_lc = 1,
+               .default_pll_gating_18 = 1,
        },
 };
 
index 3c43b95f4c0dd5062b07b5d3864027b0ca0aff89..37dad07a8439434c26127c2c766ceb8b2c03354f 100644 (file)
@@ -72,6 +72,9 @@ struct tuner_params {
        unsigned int port2_invert_for_secam_lc:1;
        /* Some cards require PORT1 to be 1 for mono Radio FM and 0 for stereo. */
        unsigned int port1_set_for_fm_mono:1;
+       /* Select 18% (or according to datasheet 0%) L standard PLL gating,
+          vs the driver default of 36%. */
+       unsigned int default_pll_gating_18:1;
        /* Default tda9887 TOP value in dB for the low band. Default is 0.
           Range: -16:+15 */
        signed int default_top_low:5;
index 2f7b00b08e8817224c5827ab09e7f13bd376d883..3116e750132f2e7575e07d2caced3b21bdf34bdb 100644 (file)
@@ -144,6 +144,7 @@ extern int tuner_debug;
 #define TDA9887_DEEMPHASIS_50          (2<<16)
 #define TDA9887_DEEMPHASIS_75          (3<<16)
 #define TDA9887_AUTOMUTE               (1<<18)
+#define TDA9887_GATING_18              (1<<19)
 
 #ifdef __KERNEL__