The attached patch significantly improves tuning lock times for all three s5h1409 based devices I have tested with so far. However, because of the large number of devices affected, I would like to solicit people with products that use the s5h1409 to test the patch and report back any problems before it gets committed. To test the patch, check out the latest v4l-dvb and apply the patch: hg clone http://linuxtv.org/hg/v4l-dvb cd v4l-dvb patch -p1 < s5h1409_tuning_speedup.patch make make install make unload reboot Based on the data collected thus far, this patch should address some long-standing issues with long times to reach tuning lock and intermittent lock failures. Comments welcome. Thanks, Devin -- Devin J. Heitmueller http://www.devinheitmueller.com AIM: devinheitmueller
s5h1409: Perform s5h1409 soft reset after tuning From: Devin Heitmueller <dheitmueller@xxxxxxxxxxx> Just like with the s5h1411, the s5h1409 needs a soft-reset in order for it to know that the tuner has been told to change frequencies. This change changes the behavior from "random tuning times between 500ms to complete tuning lock failures" to "tuning lock consistently within 700ms". Thanks to Robert Krakora <rob.krakora@xxxxxxxxxxxxxxxxxxxxx> for doing initial testing of the patch on the KWorld 330U. Signed-off-by: Devin Heitmueller <dheitmueller@xxxxxxxxxxx> diff -r 4a06b5c3344f linux/drivers/media/dvb/frontends/s5h1409.c --- a/linux/drivers/media/dvb/frontends/s5h1409.c Mon Dec 29 22:17:09 2008 -0500 +++ b/linux/drivers/media/dvb/frontends/s5h1409.c Mon Jan 19 19:50:29 2009 -0500 @@ -545,9 +545,6 @@ s5h1409_enable_modulation(fe, p->u.vsb.modulation); - /* Allow the demod to settle */ - msleep(100); - if (fe->ops.tuner_ops.set_params) { if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); @@ -561,6 +558,10 @@ s5h1409_set_qam_amhum_mode(fe); s5h1409_set_qam_interleave_mode(fe); } + + /* Issue a reset to the demod so it knows to resync against the + newly tuned frequency */ + s5h1409_softreset(fe); return 0; }