diff options
author | Andrew de Quincy <devnull@localhost> | 2004-11-22 22:40:31 +0000 |
---|---|---|
committer | Andrew de Quincy <devnull@localhost> | 2004-11-22 22:40:31 +0000 |
commit | d85f1d36e71071dbc71b7f7d39a9deeff79d2d28 (patch) | |
tree | 8e70e945fff6e3d4015b24c13420cf0338df6bc7 /linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | |
parent | f987c2122368b96ff0924561ad34b66fbf50506e (diff) | |
download | mediapointer-dvb-s2-d85f1d36e71071dbc71b7f7d39a9deeff79d2d28.tar.gz mediapointer-dvb-s2-d85f1d36e71071dbc71b7f7d39a9deeff79d2d28.tar.bz2 |
Added support for grundig 29504-491
Diffstat (limited to 'linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c')
-rw-r--r-- | linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index 7dc5da7f5..04ed094f8 100644 --- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c @@ -27,6 +27,7 @@ #include "cx22700.h" #include "tda1004x.h" #include "stv0299.h" +#include "tda8083.h" #include <linux/dvb/frontend.h> #include <linux/dvb/dmx.h> @@ -1320,6 +1321,31 @@ static struct stv0299_config alps_bsru6_config = { .pll_set = alps_bsru6_pll_set, }; +static int ttusb_novas_grundig_49501_491_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +{ + struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; + u8 buf[4]; + u32 div; + struct i2c_msg msg = {.addr = 0x61,.flags = 0,.buf = buf,.len = sizeof(buf) }; + + div = params->frequency / 125; + + buf[0] = (div >> 8) & 0x7f; + buf[1] = div & 0xff; + buf[2] = 0x8e; + buf[3] = 0x00; + + if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1) + return -EIO; + + return 0; +} + +static struct tda8083_config ttusb_novas_grundig_49501_491_config = { + + .demod_address = 0x68, + .pll_set = ttusb_novas_grundig_49501_491_pll_set, +}; @@ -1329,18 +1355,26 @@ static void frontend_init(struct ttusb* ttusb) case 0x1003: // Hauppauge/TT Nova-USB-S budget (stv0299/ALPS BSRU6(tsa5059) // try the ALPS BSRU6 first ttusb->fe = stv0299_attach(&alps_bsru6_config, &ttusb->i2c_adap); - if (ttusb->fe != NULL) break; + if (ttusb->fe != NULL) + break; + + // Grundig 29504-491 + ttusb->fe = tda8083_attach(&ttusb_novas_grundig_49501_491_config, &ttusb->i2c_adap); + if (ttusb->fe != NULL) + break; break; case 0x1005: // Hauppauge/TT Nova-USB-t budget (tda10046/Philips td1316(tda6651tt) OR cx22700/ALPS TDMB7(??)) // try the ALPS TDMB7 first ttusb->fe = cx22700_attach(&alps_tdmb7_config, &ttusb->i2c_adap); - if (ttusb->fe != NULL) break; + if (ttusb->fe != NULL) + break; // Philips td1316 ttusb->fe = tda10046_attach(&philips_tdm1316l_config, &ttusb->i2c_adap); - if (ttusb->fe != NULL) break; + if (ttusb->fe != NULL) + break; break; } |