diff options
author | Andrew de Quincy <devnull@localhost> | 2004-01-27 20:41:59 +0000 |
---|---|---|
committer | Andrew de Quincy <devnull@localhost> | 2004-01-27 20:41:59 +0000 |
commit | 6777a05be9a443aa8cf9add93573e4323e552858 (patch) | |
tree | 9d6b70c450bf05c2b963759ef8aed2f64342ec15 /linux/drivers/media/dvb/frontends | |
parent | 042368a5cca6b749b9f395132c48dacb469993c7 (diff) | |
download | mediapointer-dvb-s2-6777a05be9a443aa8cf9add93573e4323e552858.tar.gz mediapointer-dvb-s2-6777a05be9a443aa8cf9add93573e4323e552858.tar.bz2 |
Small tweaks. Better inversion handling, and changed how 6MHz is set in
tuner
Diffstat (limited to 'linux/drivers/media/dvb/frontends')
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda1004x.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda1004x.c b/linux/drivers/media/dvb/frontends/tda1004x.c index 6b02c4a66..68b76909c 100644 --- a/linux/drivers/media/dvb/frontends/tda1004x.c +++ b/linux/drivers/media/dvb/frontends/tda1004x.c @@ -643,8 +643,8 @@ static int tda10046h_init(struct dvb_i2c_bus *i2c, struct tda1004x_state *tda_st // tda setup tda1004x_write_mask(i2c, tda_state, TDA1004X_CONFC4, 0x20, 0); // disable DSP watchdog timer + tda1004x_write_mask(i2c, tda_state, TDA1004X_CONFC1, 0x40, 0x40); // TT TDA10046H needs inversion ON tda1004x_write_mask(i2c, tda_state, TDA1004X_AUTO, 8, 0); // select HP stream - tda1004x_write_mask(i2c, tda_state, TDA1004X_CONFC1, 0x40, 0); // no frequency inversion tda1004x_write_mask(i2c, tda_state, TDA1004X_CONFC1, 0x80, 0); // disable pulse killer tda1004x_write_byte(i2c, tda_state, TDA10046H_CONFPLL2, 10); // PLL M = 10 tda1004x_write_byte(i2c, tda_state, TDA10046H_CONFPLL3, 0); // PLL P = N = 0 @@ -812,9 +812,7 @@ static int tda1004x_set_frequency(struct dvb_i2c_bus *i2c, // work out filter switch (fe_params->u.ofdm.bandwidth) { case BANDWIDTH_6_MHZ: - // 6 MHz isn't supported directly, but set this to - // the 8 MHz setting in case we can fiddle it later - filter = 1; + filter = 0; break; case BANDWIDTH_7_MHZ: @@ -884,6 +882,7 @@ static int tda1004x_set_fe(struct dvb_i2c_bus *i2c, struct dvb_frontend_parameters *fe_params) { int tmp; + int inversion; dprintk("%s\n", __FUNCTION__); @@ -972,8 +971,14 @@ static int tda1004x_set_fe(struct dvb_i2c_bus *i2c, break; } + // need to invert the inversion for TT TDA10046H + inversion = fe_params->inversion; + if (tda_state->fe_type == FE_TYPE_TDA10046H) { + inversion = inversion ? INVERSION_OFF : INVERSION_ON; + } + // set inversion - switch (fe_params->inversion) { + switch (inversion) { case INVERSION_OFF: tda1004x_write_mask(i2c, tda_state, TDA1004X_CONFC1, 0x20, 0); break; @@ -985,10 +990,6 @@ static int tda1004x_set_fe(struct dvb_i2c_bus *i2c, default: return -EINVAL; } - - // temp hack - if (tda_state->fe_type == FE_TYPE_TDA10046H) - tda1004x_write_mask(i2c, tda_state, TDA1004X_CONFC1, 0x20, 0x20); // set guard interval switch (fe_params->u.ofdm.guard_interval) { |