diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-04-17 13:22:15 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-26 11:53:42 -0300 |
commit | 4de2730a1d2742aea67f24d1041bdc5e0bad37e3 (patch) | |
tree | 25cd8c6aa973e31fa5c1f5dc6f786493fe116794 /drivers/media/dvb/dvb-usb/dibusb-common.c | |
parent | d7357a53ef4d59724ad80560e47102e0095555b6 (diff) |
V4L/DVB (4451): MT2060: IF1 Offset from EEPROM, several updates
- AGC gain set to 3
- The tuning sequence has been changed to match the DibCom driver ( from I2C
spy captures )
- For LITE-ON adapters : The IF1 frequency is now tuned according to the
calibration values stored in EEPROM.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Olivier DANET <odanet@caramail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dibusb-common.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dibusb-common.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c index e079ba95d38..88062b219b9 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/drivers/media/dvb/dvb-usb/dibusb-common.c @@ -234,12 +234,31 @@ EXPORT_SYMBOL(dibusb_dib3000mc_frontend_attach); int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d) { int ret; + u8 a,b; + u16 if1=1220; if (d->tuner_pass_ctrl) { struct dibusb_state *st = d->priv; d->tuner_pass_ctrl(d->fe, 1, stk3000p_mt2060_config.i2c_address); - /* check for mt2060 */ - if ((ret = mt2060_attach(&st->mt2060,&stk3000p_mt2060_config, &d->i2c_adap)) != 0) { + // First IF calibration for Liteon Sticks + if (d->udev->descriptor.idVendor == USB_VID_LITEON && + d->udev->descriptor.idProduct == USB_PID_LITEON_DVB_T_WARM) { + dibusb_read_eeprom_byte(d,0x7E,&a); + dibusb_read_eeprom_byte(d,0x7F,&b); + if (a == 0xFF && b == 0xFF) { + if1 = 1220; + } else + if (a == 0x00) { + if1 = 1220+b; + } else + if (a == 0x80) { + if1 = 1220-b; + } else { + warn("LITE-ON DVB-T Tuner : Strange IF1 calibration :%2X %2X\n",(int)a,(int)b); + if1 = 1220; + } + } + if ((ret = mt2060_attach(&st->mt2060,&stk3000p_mt2060_config, &d->i2c_adap,if1)) != 0) { /* not found - use panasonic pll parameters */ d->pll_addr = 0x60; d->pll_desc = &dvb_pll_env57h1xd5; |