Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Another issue: frontend timeout value and low symbol rates



On Monday 23 February 2004 18:02, Andrew de Quincey wrote:
> On Monday 23 February 2004 17:46, Johannes Stezenbach wrote:
> > Andrew de Quincey wrote:
> > > Hi, I've finally found the problem (after much fiddling)
> > >
> > > The linux core drivers already do the seeking-about mechanism you
> > > suggest if it can't lock on to the supplied base frequency. And that
> > > works fine (seeks about in steps of symbolrate/16000).
> > >
> > > The problem is that with the frontend driver as it is/was, it retunes
> > > the TSA5959 PLL every time. Retuning the PLL every few milliseconds
> > > doesn't seem to agree with this module.
> > >
> > > Also, the PLL resolution is quite low (500kHz). I initially tried
> > > increasing the resolution of the PLL but that didn't seem to help. If
> > > anything, it seemed to worsen matters.
> > >
> > > Instead, if the frequency change is quite small (i.e. its obviously
> > > seeking about), I program the derotator frequency registers with the
> > > offset. I can now reliably lock on to any frequency/symbolrate within a
> > > reasonable time (i.e. sub-second).
> >
> > If you're confident that this is a general improvement (i.e. you didn't
> > break anything when fixing tuning on low-SR TPs), please commit.
> > Or post patches for others to try, please.
>
> Yup, willdo. I'm just cleaning it up right now.

In the meantime, I've found another problem in dvb_frontend.c:

Although the code has the ability to scan about on frequencies surrounding the requested frequency, 
it isn't actually being given the time to do so. The following patch fixes this, and ensures at least one 
cycle of scanning completes before giving up. The reason I haven't checked this in is because I'm 
worried it breaks something else, and I want to give anyone time to object.

As Robert points out, low symbol rate channels are much more sensitive to errors in the requested frequency. 
Unless I have this patch in my code, I am again not able to tune to any low symbol rate channels. It seems the 
su1278 is _VERY_ picky about frequencies with low symbol rate channels, and very frequently needs the 
scanning behaviour to work.

The current timeout of 2*HZ is not nearly enough; there seems to be a large delay between the 
FE_SET_FRONTEND ioctl, and the commencement of the scanning behaviour.. 

(the stv0299 patch is coming along; will commit soon).

Index: dvb_frontend.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/dvb-core/dvb_frontend.c,v
retrieving revision 1.59
diff -a -u -b -r1.59 dvb_frontend.c
--- dvb_frontend.c      7 Feb 2004 16:19:23 -0000       1.59
+++ dvb_frontend.c      23 Feb 2004 19:46:27 -0000
@@ -483,7 +483,7 @@
                                dvb_frontend_recover (fe);
                                delay = HZ/5;
                        }
-                       if (jiffies - fe->lost_sync_jiffies > TIMEOUT) {
+                       if ((jiffies - fe->lost_sync_jiffies > TIMEOUT) && (fe->lost_sync_count > 32)) {
                                s |= FE_TIMEDOUT;
                                if ((fe->status & FE_TIMEDOUT) == 0)
                                        fe->timeout_count++;


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index