]> err.no Git - linux-2.6/blobdiff - drivers/media/dvb/dvb-usb/dibusb-common.c
V4L/DVB (8451): dw2102: fix in-kernel compilation
[linux-2.6] / drivers / media / dvb / dvb-usb / dibusb-common.c
index fd3a9902f98d472662f69ee96690c5d11d673814..8ee6cd4da9e7c1053099792ef5ec0700bbd29ccf 100644 (file)
@@ -169,7 +169,7 @@ EXPORT_SYMBOL(dibusb_read_eeprom_byte);
 // Config Adjacent channels  Perf -cal22
 static struct dibx000_agc_config dib3000p_mt2060_agc_config = {
        .band_caps = BAND_VHF | BAND_UHF,
-       .setup     = (0 << 15) | (0 << 14) | (1 << 13) | (1 << 12) | (29 << 0),
+       .setup     = (1 << 8) | (5 << 5) | (1 << 4) | (1 << 3) | (0 << 2) | (2 << 0),
 
        .agc1_max = 48497,
        .agc1_min = 23593,
@@ -196,10 +196,14 @@ static struct dib3000mc_config stk3000p_dib3000p_config = {
        .ln_adc_level = 0x1cc7,
 
        .output_mpeg2_in_188_bytes = 1,
+
+       .agc_command1 = 1,
+       .agc_command2 = 1,
 };
 
 static struct dibx000_agc_config dib3000p_panasonic_agc_config = {
-       .setup    = (0 << 15) | (0 << 14) | (1 << 13) | (1 << 12) | (29 << 0),
+       .band_caps = BAND_VHF | BAND_UHF,
+       .setup     = (1 << 8) | (5 << 5) | (1 << 4) | (1 << 3) | (0 << 2) | (2 << 0),
 
        .agc1_max = 56361,
        .agc1_min = 22282,
@@ -219,6 +223,9 @@ static struct dibx000_agc_config dib3000p_panasonic_agc_config = {
        .agc2_slope2 = 0x1e,
 };
 
+#if defined(CONFIG_DVB_DIB3000MC) ||                                   \
+       (defined(CONFIG_DVB_DIB3000MC_MODULE) && defined(MODULE))
+
 static struct dib3000mc_config mod3000p_dib3000p_config = {
        &dib3000p_panasonic_agc_config,
 
@@ -226,6 +233,9 @@ static struct dib3000mc_config mod3000p_dib3000p_config = {
        .ln_adc_level = 0x1cc7,
 
        .output_mpeg2_in_188_bytes = 1,
+
+       .agc_command1 = 1,
+       .agc_command2 = 1,
 };
 
 int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *adap)
@@ -288,7 +298,7 @@ int dibusb_dib3000mc_tuner_attach(struct dvb_usb_adapter *adap)
        tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1);
        if (dvb_attach(mt2060_attach, adap->fe, tun_i2c, &stk3000p_mt2060_config, if1) == NULL) {
                /* not found - use panasonic pll parameters */
-               if (dvb_attach(dvb_pll_attach, adap->fe, 0x60, tun_i2c, &dvb_pll_env57h1xd5) == NULL)
+               if (dvb_attach(dvb_pll_attach, adap->fe, 0x60, tun_i2c, DVB_PLL_ENV57H1XD5) == NULL)
                        return -ENOMEM;
        } else {
                st->mt2060_present = 1;
@@ -298,6 +308,7 @@ int dibusb_dib3000mc_tuner_attach(struct dvb_usb_adapter *adap)
        return 0;
 }
 EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach);
+#endif
 
 /*
  * common remote control stuff