diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-07-04 18:35:40 +0200 |
---|---|---|
committer | Patrick Boettcher <pb@linuxtv.org> | 2006-07-04 18:35:40 +0200 |
commit | e94018d54aa38ab9118db9a3e312f09f7eabd4ee (patch) | |
tree | e99fbf7e0c130564d8c8dd3610f4559816a2860a /linux/drivers/media/dvb/dvb-usb | |
parent | 8fbac88a9c801be025c283275f2eb6585a5cc454 (diff) | |
download | mediapointer-dvb-s2-e94018d54aa38ab9118db9a3e312f09f7eabd4ee.tar.gz mediapointer-dvb-s2-e94018d54aa38ab9118db9a3e312f09f7eabd4ee.tar.bz2 |
Update for MT2060 to use dvb_tuner_ops
From: Olivier DANET <odanet@caramail.com>
new tuner api
minor fixes for tuning
Signed-off-by: Olivier DANET <odanet@caramail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dibusb-common.c | 45 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dibusb.h | 1 |
2 files changed, 9 insertions, 37 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c b/linux/drivers/media/dvb/dvb-usb/dibusb-common.c index 9b4e33090..d04b92f94 100644 --- a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/linux/drivers/media/dvb/dvb-usb/dibusb-common.c @@ -168,40 +168,6 @@ int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val) } EXPORT_SYMBOL(dibusb_read_eeprom_byte); -static struct mt2060_config stk3000p_mt2060_config = { - .i2c_address = 0x60, -}; - -static int dibusb_tuner_init(struct dvb_frontend *fe) -{ - struct dvb_usb_device *d = fe->dvb->priv; - struct dibusb_state *st = d->priv; - - if (d->tuner_pass_ctrl && st->mt2060_present) { - int ret; - d->tuner_pass_ctrl(d->fe, 1, stk3000p_mt2060_config.i2c_address); - ret = mt2060_init(&st->mt2060); - d->tuner_pass_ctrl(d->fe, 0, 0); - return ret; - } - return dvb_usb_pll_init_i2c(fe); -} - -static int dibusb_tuner_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep) -{ - struct dvb_usb_device *d = fe->dvb->priv; - struct dibusb_state *st = d->priv; - - if (d->tuner_pass_ctrl && st->mt2060_present) { - int ret; - d->tuner_pass_ctrl(d->fe, 1, stk3000p_mt2060_config.i2c_address); - ret = mt2060_set(&st->mt2060,fep); - d->tuner_pass_ctrl(d->fe,0,0); - return ret; - } - return dvb_usb_pll_set_i2c(fe,fep); -} - static const struct dib3000p_agc_config dib3000p_agc_panasonic_env57h1xd5 = { { 0x51, 0x301d, 0x0, 0x1cc7, 0xdc29, 0x570a, 0xbae1, 0x8ccd, 0x3b6d, 0x551d, 0xa, 0x951e } @@ -212,11 +178,15 @@ static const struct dib3000p_agc_config dib3000p_agc_microtune_mt2060 = { 0xa8f6, 0x5eb8, 0x65ff, 0x40ff, 0x8a, 0x1114 } }; +static struct mt2060_config stk3000p_mt2060_config = { + .i2c_address = 0x60, +}; + int dibusb_dib3000mc_frontend_attach(struct dvb_usb_device *d) { struct dib3000_config demod_cfg; struct dibusb_state *st = d->priv; - +#if 0 <<<<<<< /home/users/pboettcher/devel/v4l-dvb.stk3000p/linux/drivers/media/dvb/dvb-usb/dibusb-common.c demod_cfg.agc = &dib3000p_agc_panasonic_env57h1xd5; demod_cfg.pll_set = dibusb_tuner_set; @@ -231,13 +201,14 @@ int dibusb_dib3000mc_frontend_attach(struct dvb_usb_device *d) d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl; return 0; } - +#endif return -ENODEV; } EXPORT_SYMBOL(dibusb_dib3000mc_frontend_attach); int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d) { +#if 0 <<<<<<< /home/users/pboettcher/devel/v4l-dvb.stk3000p/linux/drivers/media/dvb/dvb-usb/dibusb-common.c int ret; u8 a,b; @@ -284,6 +255,8 @@ int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d) >>>>>>> /tmp/dibusb-common.c~other.VjLUsN return 0; +#endif + return -ENODEV; } EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach); diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb.h b/linux/drivers/media/dvb/dvb-usb/dibusb.h index 7fd57d053..e21de8b66 100644 --- a/linux/drivers/media/dvb/dvb-usb/dibusb.h +++ b/linux/drivers/media/dvb/dvb-usb/dibusb.h @@ -97,7 +97,6 @@ struct dibusb_state { struct dib_fe_xfer_ops ops; - struct mt2060_state mt2060; int mt2060_present; /* for RC5 remote control */ |