diff options
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 e079ba95d384..88062b219b91 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); | |||
234 | int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d) | 234 | int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d) |
235 | { | 235 | { |
236 | int ret; | 236 | int ret; |
237 | u8 a,b; | ||
238 | u16 if1=1220; | ||
237 | 239 | ||
238 | if (d->tuner_pass_ctrl) { | 240 | if (d->tuner_pass_ctrl) { |
239 | struct dibusb_state *st = d->priv; | 241 | struct dibusb_state *st = d->priv; |
240 | d->tuner_pass_ctrl(d->fe, 1, stk3000p_mt2060_config.i2c_address); | 242 | d->tuner_pass_ctrl(d->fe, 1, stk3000p_mt2060_config.i2c_address); |
241 | /* check for mt2060 */ | 243 | // First IF calibration for Liteon Sticks |
242 | if ((ret = mt2060_attach(&st->mt2060,&stk3000p_mt2060_config, &d->i2c_adap)) != 0) { | 244 | if (d->udev->descriptor.idVendor == USB_VID_LITEON && |
245 | d->udev->descriptor.idProduct == USB_PID_LITEON_DVB_T_WARM) { | ||
246 | dibusb_read_eeprom_byte(d,0x7E,&a); | ||
247 | dibusb_read_eeprom_byte(d,0x7F,&b); | ||
248 | if (a == 0xFF && b == 0xFF) { | ||
249 | if1 = 1220; | ||
250 | } else | ||
251 | if (a == 0x00) { | ||
252 | if1 = 1220+b; | ||
253 | } else | ||
254 | if (a == 0x80) { | ||
255 | if1 = 1220-b; | ||
256 | } else { | ||
257 | warn("LITE-ON DVB-T Tuner : Strange IF1 calibration :%2X %2X\n",(int)a,(int)b); | ||
258 | if1 = 1220; | ||
259 | } | ||
260 | } | ||
261 | if ((ret = mt2060_attach(&st->mt2060,&stk3000p_mt2060_config, &d->i2c_adap,if1)) != 0) { | ||
243 | /* not found - use panasonic pll parameters */ | 262 | /* not found - use panasonic pll parameters */ |
244 | d->pll_addr = 0x60; | 263 | d->pll_addr = 0x60; |
245 | d->pll_desc = &dvb_pll_env57h1xd5; | 264 | d->pll_desc = &dvb_pll_env57h1xd5; |