summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-04-17 18:22:15 +0200
committerPatrick Boettcher <pb@linuxtv.org>2006-04-17 18:22:15 +0200
commitafdbbc48eaea9b0d9a539643a88aa5a74a63dde3 (patch)
tree5674cd86af4571d16269b8bcedb0265baef1ec09 /linux/drivers/media/dvb/dvb-usb
parent392ad50208a490ee5ee73ac59e809ad366019c00 (diff)
downloadmediapointer-dvb-s2-afdbbc48eaea9b0d9a539643a88aa5a74a63dde3.tar.gz
mediapointer-dvb-s2-afdbbc48eaea9b0d9a539643a88aa5a74a63dde3.tar.bz2
MT2060: IF1 Offset from EEPROM, several updates
From: Patrick Boettcher <pb@linuxtv.org> - 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>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dibusb-common.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c b/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
index e079ba95d..88062b219 100644
--- a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/linux/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;