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

Commit 763fbaf6 authored by Manu Abraham's avatar Manu Abraham Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (9443): Bug: Bandwidth calculation



Bug #1: The 5 tap equaliser is set to correct simple perturbations
like reflections on the IF cable for DVB-S. In the case of DVB-S2
a more powerful equalizer is used to correct the filter group delay
allowing the bandwidth to be reduced by a factor of 1/3

Bug #2: The ZIF tuner takes badwidth to be set in Hz

Signed-off-by: default avatarManu Abraham <manu@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 27a330d1
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -1554,8 +1554,7 @@ static enum dvbfe_search stb0899_search(struct dvb_frontend *fe, struct dvbfe_pa
	}
	}
	dprintk(verbose, FE_DEBUG, 1, "delivery system=%d", state->delsys);
	dprintk(verbose, FE_DEBUG, 1, "delivery system=%d", state->delsys);


	SearchRange = 3000000; /* Search Bandwidth (3 Mhz, was initially 10  Mhz)	*/
	SearchRange = 10000000;
//	SearchRange = 10000000; /* Search Bandwidth (3 Mhz, was initially 10  Mhz)	*/
	dprintk(verbose, FE_DEBUG, 1, "Frequency=%d, Srate=%d", i_params->freq, i_params->srate);
	dprintk(verbose, FE_DEBUG, 1, "Frequency=%d, Srate=%d", i_params->freq, i_params->srate);
	/* checking Search Range is meaningless for a fixed 3 Mhz			*/
	/* checking Search Range is meaningless for a fixed 3 Mhz			*/
	if (INRANGE(i_params->srate, 1000000, 45000000)) {
	if (INRANGE(i_params->srate, 1000000, 45000000)) {
@@ -1626,7 +1625,7 @@ static enum dvbfe_search stb0899_search(struct dvb_frontend *fe, struct dvbfe_pa
			internal->srch_range		= SearchRange;
			internal->srch_range		= SearchRange;


			if (state->config->tuner_set_bandwidth)
			if (state->config->tuner_set_bandwidth)
				state->config->tuner_set_bandwidth(fe, (135 * (stb0899_carr_width(state) + SearchRange)) / 100);
				state->config->tuner_set_bandwidth(fe, (stb0899_carr_width(state) + SearchRange));
			if (state->config->tuner_get_bandwidth)
			if (state->config->tuner_get_bandwidth)
				state->config->tuner_get_bandwidth(fe, &internal->tuner_bw);
				state->config->tuner_get_bandwidth(fe, &internal->tuner_bw);


+1 −1
Original line number Original line Diff line number Diff line
@@ -269,7 +269,7 @@ static int stb6100_set_bandwidth(struct dvb_frontend *fe, u32 bandwidth)


	dprintk(verbose, FE_DEBUG, 1, "set bandwidth to %u kHz", bandwidth);
	dprintk(verbose, FE_DEBUG, 1, "set bandwidth to %u kHz", bandwidth);


	bandwidth *= 1000 / 2;	/* kHz -> Hz, bw / 2 */
	bandwidth /= 2; /* ZIF */


	if (bandwidth > 36000000)	/* F[4:0] BW/2 max =31+5=36 mhz for F=31	*/
	if (bandwidth > 36000000)	/* F[4:0] BW/2 max =31+5=36 mhz for F=31	*/
		tmp = 31;
		tmp = 31;