diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2008-01-25 11:31:58 +0100 |
---|---|---|
committer | Patrick Boettcher <pb@linuxtv.org> | 2008-01-25 11:31:58 +0100 |
commit | f4a9737a2bdd72cb0d67a6c047dc9798cfdb48f4 (patch) | |
tree | e93009ab3465738b6d988e2e5042e7bd0a72129a /linux/drivers | |
parent | 37e8e0075faefb10bec87e27293c148236168495 (diff) | |
download | mediapointer-dvb-s2-f4a9737a2bdd72cb0d67a6c047dc9798cfdb48f4.tar.gz mediapointer-dvb-s2-f4a9737a2bdd72cb0d67a6c047dc9798cfdb48f4.tar.bz2 |
DiB7000P: correct tuning problem for 7MHz channel
From: Patrick Boettcher <pb@linuxtv.org>
Tuning problem for 7Mhz channels fixes
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/dvb/frontends/dib7000p.c | 10 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/dibx000_common.h | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/frontends/dib7000p.c b/linux/drivers/media/dvb/frontends/dib7000p.c index 4de739607..9b6702b70 100644 --- a/linux/drivers/media/dvb/frontends/dib7000p.c +++ b/linux/drivers/media/dvb/frontends/dib7000p.c @@ -36,8 +36,8 @@ struct dib7000p_state { u16 wbd_ref; - u8 current_band; - fe_bandwidth_t current_bandwidth; + u8 current_band; + u32 current_bandwidth; struct dibx000_agc_config *current_agc; u32 timf; @@ -1100,7 +1100,7 @@ static int dib7000p_get_frontend(struct dvb_frontend* fe, fep->inversion = INVERSION_AUTO; - fep->u.ofdm.bandwidth = state->current_bandwidth; + fep->u.ofdm.bandwidth = BANDWIDTH_TO_INDEX(state->current_bandwidth); switch ((tps >> 8) & 0x3) { case 0: fep->u.ofdm.transmission_mode = TRANSMISSION_MODE_2K; break; @@ -1157,10 +1157,8 @@ static int dib7000p_set_frontend(struct dvb_frontend* fe, int time, ret; dib7000p_set_output_mode(state, OUTMODE_HIGH_Z); - state->current_bandwidth = fep->u.ofdm.bandwidth; - dib7000p_set_bandwidth(state, BANDWIDTH_TO_KHZ(fep->u.ofdm.bandwidth)); - /* maybe the parameter has been changed */ + /* maybe the parameter has been changed */ state->sfn_workaround_active = buggy_sfn_workaround; if (fe->ops.tuner_ops.set_params) diff --git a/linux/drivers/media/dvb/frontends/dibx000_common.h b/linux/drivers/media/dvb/frontends/dibx000_common.h index 5e17275af..84e4d5362 100644 --- a/linux/drivers/media/dvb/frontends/dibx000_common.h +++ b/linux/drivers/media/dvb/frontends/dibx000_common.h @@ -128,6 +128,11 @@ enum dibx000_adc_states { (v) == BANDWIDTH_7_MHZ ? 7000 : \ (v) == BANDWIDTH_6_MHZ ? 6000 : 8000 ) +#define BANDWIDTH_TO_INDEX(v) ( \ + (v) == 8000 ? BANDWIDTH_8_MHZ : \ + (v) == 7000 ? BANDWIDTH_7_MHZ : \ + (v) == 6000 ? BANDWIDTH_6_MHZ : BANDWIDTH_8_MHZ ) + /* Chip output mode. */ #define OUTMODE_HIGH_Z 0 #define OUTMODE_MPEG2_PAR_GATED_CLK 1 |