diff options
author | Holger Waechtler <devnull@localhost> | 2002-11-18 17:46:34 +0000 |
---|---|---|
committer | Holger Waechtler <devnull@localhost> | 2002-11-18 17:46:34 +0000 |
commit | 00ea83254c949d68b911eb856e503a18939c11b4 (patch) | |
tree | 704212045fd13b541d41f3afb828a97d12e527e5 /linux/drivers/media/dvb/frontends | |
parent | deba33346d82d60a6d3a2e3717979776a9f66fbc (diff) | |
download | mediapointer-dvb-s2-00ea83254c949d68b911eb856e503a18939c11b4.tar.gz mediapointer-dvb-s2-00ea83254c949d68b911eb856e503a18939c11b4.tar.bz2 |
removed debug+test code
Diffstat (limited to 'linux/drivers/media/dvb/frontends')
-rw-r--r-- | linux/drivers/media/dvb/frontends/alps_bsru6.c | 49 |
1 files changed, 10 insertions, 39 deletions
diff --git a/linux/drivers/media/dvb/frontends/alps_bsru6.c b/linux/drivers/media/dvb/frontends/alps_bsru6.c index 60877c8c5..5b6acf34a 100644 --- a/linux/drivers/media/dvb/frontends/alps_bsru6.c +++ b/linux/drivers/media/dvb/frontends/alps_bsru6.c @@ -27,7 +27,6 @@ #include "compat.h" #include "dvb_frontend.h" -#define CONFIG_ALPS_BSRU6_IS_LG_TDQBS00X 1 static int debug = 0; #define dprintk if (debug) printk @@ -39,11 +38,7 @@ static int debug = 0; static struct dvb_frontend_info bsru6_info = { -#ifdef CONFIG_ALPS_BSRU6_IS_LG_TDQBS00X - name: "LG TDQB-S00x", -#else - name: "Alps BSRU6", -#endif + name: "stv0299 based (e.g. Alps BSRU6 or LG TDQB-S00x)", type: FE_QPSK, frequency_min: 950000, frequency_max: 2150000, @@ -55,7 +50,7 @@ struct dvb_frontend_info bsru6_info = { notifier_delay: 0, caps: FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | - FE_CAN_QPSK + FE_CAN_INVERSION_AUTO | FE_CAN_QPSK }; @@ -262,40 +257,16 @@ int stv0299_init (struct dvb_i2c_bus *i2c) static -int stv0299_set_inversion (struct dvb_i2c_bus *i2c, - fe_spectral_inversion_t inversion) +int stv0299_check_inversion (struct dvb_i2c_bus *i2c) { - u8 val; - dprintk ("%s\n", __FUNCTION__); -#ifdef CONFIG_ALPS_BSRU6_IS_LG_TDQBS00X /* reversed I/Q pins */ - switch (inversion) { - case INVERSION_AUTO: - return -EOPNOTSUPP; - case INVERSION_OFF: - val = stv0299_readreg (i2c, 0x0c); - return stv0299_writereg (i2c, 0x0c, val & 0xfe); - case INVERSION_ON: - val = stv0299_readreg (i2c, 0x0c); - return stv0299_writereg (i2c, 0x0c, val | 0x01); - default: - return -EINVAL; - }; -#else - switch (inversion) { - case INVERSION_AUTO: - return -EOPNOTSUPP; - case INVERSION_OFF: - val = stv0299_readreg (i2c, 0x0c); - return stv0299_writereg (i2c, 0x0c, val | 0x01); - case INVERSION_ON: - val = stv0299_readreg (i2c, 0x0c); - return stv0299_writereg (i2c, 0x0c, val & 0xfe); - default: - return -EINVAL; - }; -#endif + if ((stv0299_readreg (i2c, 0x1b) & 0x98) != 0x98) { + u8 val = stv0299_readreg (i2c, 0x0c); + return stv0299_writereg (i2c, 0x0c, val ^ 0x01); + } + + return 0; } @@ -628,9 +599,9 @@ int bsru6_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) struct dvb_frontend_parameters *p = arg; tsa5059_set_tv_freq (i2c, p->frequency, 3); - stv0299_set_inversion (i2c, p->inversion); stv0299_set_FEC (i2c, p->u.qpsk.fec_inner); stv0299_set_symbolrate (i2c, p->u.qpsk.symbol_rate); + stv0299_check_inversion (i2c); tsa5059_set_tv_freq (i2c, p->frequency, 0); stv0299_writereg (i2c, 0x22, 0x00); stv0299_writereg (i2c, 0x23, 0x00); |