aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/frontends/dib7000p.c10
-rw-r--r--drivers/media/dvb/frontends/dibx000_common.h5
2 files changed, 9 insertions, 6 deletions
diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c
index 0396a6f31ef8..47c23e29753e 100644
--- a/drivers/media/dvb/frontends/dib7000p.c
+++ b/drivers/media/dvb/frontends/dib7000p.c
@@ -35,8 +35,8 @@ struct dib7000p_state {
35 35
36 u16 wbd_ref; 36 u16 wbd_ref;
37 37
38 u8 current_band; 38 u8 current_band;
39 fe_bandwidth_t current_bandwidth; 39 u32 current_bandwidth;
40 struct dibx000_agc_config *current_agc; 40 struct dibx000_agc_config *current_agc;
41 u32 timf; 41 u32 timf;
42 42
@@ -1074,7 +1074,7 @@ static int dib7000p_get_frontend(struct dvb_frontend* fe,
1074 1074
1075 fep->inversion = INVERSION_AUTO; 1075 fep->inversion = INVERSION_AUTO;
1076 1076
1077 fep->u.ofdm.bandwidth = state->current_bandwidth; 1077 fep->u.ofdm.bandwidth = BANDWIDTH_TO_INDEX(state->current_bandwidth);
1078 1078
1079 switch ((tps >> 8) & 0x3) { 1079 switch ((tps >> 8) & 0x3) {
1080 case 0: fep->u.ofdm.transmission_mode = TRANSMISSION_MODE_2K; break; 1080 case 0: fep->u.ofdm.transmission_mode = TRANSMISSION_MODE_2K; break;
@@ -1131,10 +1131,8 @@ static int dib7000p_set_frontend(struct dvb_frontend* fe,
1131 int time, ret; 1131 int time, ret;
1132 1132
1133 dib7000p_set_output_mode(state, OUTMODE_HIGH_Z); 1133 dib7000p_set_output_mode(state, OUTMODE_HIGH_Z);
1134 state->current_bandwidth = fep->u.ofdm.bandwidth;
1135 dib7000p_set_bandwidth(state, BANDWIDTH_TO_KHZ(fep->u.ofdm.bandwidth));
1136 1134
1137 /* maybe the parameter has been changed */ 1135 /* maybe the parameter has been changed */
1138 state->sfn_workaround_active = buggy_sfn_workaround; 1136 state->sfn_workaround_active = buggy_sfn_workaround;
1139 1137
1140 if (fe->ops.tuner_ops.set_params) 1138 if (fe->ops.tuner_ops.set_params)
diff --git a/drivers/media/dvb/frontends/dibx000_common.h b/drivers/media/dvb/frontends/dibx000_common.h
index 5e17275afd25..84e4d5362922 100644
--- a/drivers/media/dvb/frontends/dibx000_common.h
+++ b/drivers/media/dvb/frontends/dibx000_common.h
@@ -128,6 +128,11 @@ enum dibx000_adc_states {
128 (v) == BANDWIDTH_7_MHZ ? 7000 : \ 128 (v) == BANDWIDTH_7_MHZ ? 7000 : \
129 (v) == BANDWIDTH_6_MHZ ? 6000 : 8000 ) 129 (v) == BANDWIDTH_6_MHZ ? 6000 : 8000 )
130 130
131#define BANDWIDTH_TO_INDEX(v) ( \
132 (v) == 8000 ? BANDWIDTH_8_MHZ : \
133 (v) == 7000 ? BANDWIDTH_7_MHZ : \
134 (v) == 6000 ? BANDWIDTH_6_MHZ : BANDWIDTH_8_MHZ )
135
131/* Chip output mode. */ 136/* Chip output mode. */
132#define OUTMODE_HIGH_Z 0 137#define OUTMODE_HIGH_Z 0
133#define OUTMODE_MPEG2_PAR_GATED_CLK 1 138#define OUTMODE_MPEG2_PAR_GATED_CLK 1