Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 904a82e3 authored by Patrick Boettcher's avatar Patrick Boettcher Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (7074): DiB7000P: correct tuning problem for 7MHz channel



Tuning problem for 7Mhz channels fixes

Signed-off-by: default avatarPatrick Boettcher <pb@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 3cb2c39d
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ struct dib7000p_state {
	u16 wbd_ref;

	u8  current_band;
	fe_bandwidth_t current_bandwidth;
	u32 current_bandwidth;
	struct dibx000_agc_config *current_agc;
	u32 timf;

@@ -1074,7 +1074,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;
@@ -1131,8 +1131,6 @@ 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 */
	state->sfn_workaround_active = buggy_sfn_workaround;
+5 −0
Original line number Diff line number Diff line
@@ -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