[linux-dvb] dib7000p tuning problem solved [ported to dib7000m]

Darren Salt linux at youmustbejoking.demon.co.uk
Mon Jan 21 18:31:39 CET 2008


I demand that Soeren Moch may or may not have written...

> The attached patch solves all my vdr tuning problems on a dib7000p
> nova-t stick as far as I could check within the last weekend.

> Perhaps this patch can also help nova-t-500 users.

You should add a Signed-off-by line for that, and it'd help if you use "hg
diff" and add these lines to your ~/.hgrc:
  [diff]
  git=true
  showfunc=true

Anyway, I've ported it for dib7000m devices (such as my Nova-T stick). It's
as yet not *really* tested, but it doesn't seem to be causing new problems so
far.

People are welcome to try it (give it time with the device left connected)
and add 'Tested-By:' lines; I'll add a 'Signed-off-by:' later should all
continue to go well; even if it doesn't fix my particular problem (it
probably won't; I suspect that it's a userland problem - redbutton from March
last year tending to fail if the device has been plugged in for a while;
perhaps in use earlier, though I'm not certain whether this is relevant), it
does seem to be "obviously correct". Assuming that the dib7000p patch is
correct, of course :-)

----8<----
Trivial port of Soeren Moch's patch for dib7000p devices to the dib7000m driver.

diff --git a/linux/drivers/media/dvb/frontends/dib7000m.c b/linux/drivers/media/dvb/frontends/dib7000m.c
--- a/linux/drivers/media/dvb/frontends/dib7000m.c
+++ b/linux/drivers/media/dvb/frontends/dib7000m.c
@@ -1207,7 +1207,9 @@ static int dib7000m_set_frontend(struct 
 				struct dvb_frontend_parameters *fep)
 {
 	struct dib7000m_state *state = fe->demodulator_priv;
-	int time;
+	int time, retval;
+
+	dib7000m_set_output_mode(state, OUTMODE_HIGH_Z);
 
 	state->current_bandwidth = fep->u.ofdm.bandwidth;
 	dib7000m_set_bandwidth(state, BANDWIDTH_TO_KHZ(fep->u.ofdm.bandwidth));
@@ -1242,10 +1244,12 @@ static int dib7000m_set_frontend(struct 
 		dib7000m_get_frontend(fe, fep);
 	}
 
+	retval = dib7000m_tune(fe, fep);
+
 	/* make this a config parameter */
 	dib7000m_set_output_mode(state, OUTMODE_MPEG2_FIFO);
 
-	return dib7000m_tune(fe, fep);
+	return retval;
 }
 
 static int dib7000m_read_status(struct dvb_frontend *fe, fe_status_t *stat)
----8<----

-- 
| Darren Salt    | linux or ds at              | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Output less CO2 => avoid boiling weather.     TIME IS RUNNING OUT *FAST*.

The idle mind knows not what it is that it wants.



More information about the linux-dvb mailing list