Mailing List archive

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

[linux-dvb] Re: Transponder switching taking considerably longer



Johannes Stezenbach wrote:
> 
> Klaus Schmidinger wrote:
> > Johannes Stezenbach wrote:
> > >
> > > Klaus Schmidinger wrote:
> > > >
> > > > Switching transponders works very fast with this, but right after a
> > > > channel switch (even between channels on the same transponder) there
> > > > are glitches in audio and video :-(
> > >
> > > Hm, I don't see why. Can anyone confirm this?
> >
> > The problem is the introduction of the dvb_frontend_internal_ioctl(&fe->frontend, FE_RESET, NULL)
> > call in dvb_frontend_thread() in case of (fe->lost_sync_count < 10).
> > I added a printk() to see how often this is triggered and I have this rather often,
> > sometimes even after the chanel has been switched to for quite a while.
> > Apparently this is what causes the glitches, because if I remove this call,
> > all is fine again (although the tuning between transponders is slow again).
> >
> > Are you sure this change does what you intend it to do?
> 
> No ;-}
> Because I did not check how it is implemented in each frontend driver.
> 
> But AFAIK the intention of FE_RESET is to restart the frontend's
> signal aquisition algorithms. It is also only called in
> dvb_frontend_thread() when the lock has already been lost.
> 
> I guess the problem for you might be that there is a significant
> frequency offset, but the changed dvb_frontend.c achieves a lock without
> doing a zig-zag scan, so you get a quick initial lock but the signal
> is weak. To correct this problem we would have to read the AFC value
> from the frontend and correct the frequency if the offset is too large.
> OTOH we've had other problems with AFC in the past...
> 
> Could you check my hypothesis by applying the following patch?
> 
> Index: dvb_frontend.c
> ===================================================================
> RCS file: /cvs/linuxtv/DVB/driver/dvb_frontend.c,v
> retrieving revision 1.49
> diff -u -p -r1.49 dvb_frontend.c
> --- dvb_frontend.c      31 Jul 2003 18:08:56 -0000      1.49
> +++ dvb_frontend.c      1 Aug 2003 14:16:05 -0000
> @@ -243,10 +243,15 @@ void dvb_frontend_add_event (struct dvb_
>         memcpy (&e->parameters, &fe->parameters,
>                 sizeof (struct dvb_frontend_parameters));
> 
> -       if (status & FE_HAS_LOCK)
> +       if (status & FE_HAS_LOCK) {
>                 dvb_frontend_internal_ioctl (&fe->frontend,
>                                              FE_GET_FRONTEND,
>                                              &e->parameters);
> +               printk("AFC: f=%d, f_is=%d, offset=%d\n",
> +                               fe->parameters.frequency,
> +                               e->parameters.frequency,
> +                               fe->parameters.frequency - e->parameters.frequency);
> +       }
>         events->eventw = wp;
> 
>         up (&events->sem);
> 
> I get small offset values < +/-700.
> 
> I don't know what to do now. We could re-tune if abs(offset) > some_value.
> Hmm.
> 
> Johannes

Here's what I get:

Aug  1 16:36:50 video kernel: AFC: f=1354000, f_is=1354214, offset=-214
Aug  1 16:37:03 video kernel: AFC: f=1588000, f_is=1588214, offset=-214
Aug  1 16:37:08 video kernel: AFC: f=1880000, f_is=1880644, offset=-644
Aug  1 16:37:22 video kernel: AFC: f=1588000, f_is=1588214, offset=-214
Aug  1 16:37:35 video kernel: AFC: f=1237000, f_is=1237214, offset=-214
Aug  1 16:37:39 video kernel: AFC: f=1588000, f_is=1588214, offset=-214
Aug  1 16:37:49 video kernel: AFC: f=1237000, f_is=1237214, offset=-214
Aug  1 16:38:14 video kernel: AFC: f=1588000, f_is=1588214, offset=-214
Aug  1 16:38:32 video kernel: AFC: f=1880000, f_is=1880859, offset=-859
Aug  1 16:38:38 video kernel: AFC: f=1588000, f_is=1588214, offset=-214
Aug  1 16:38:43 video kernel: AFC: f=1880000, f_is=1880859, offset=-859
Aug  1 16:38:50 video kernel: AFC: f=1588000, f_is=1588214, offset=-214
Aug  1 16:38:52 video kernel: AFC: f=1237000, f_is=1237214, offset=-214
Aug  1 16:39:01 video kernel: AFC: f=1510000, f_is=1510214, offset=-214
Aug  1 16:39:02 video kernel: AFC: f=1237000, f_is=1237214, offset=-214
Aug  1 16:39:41 video kernel: AFC: f=1237000, f_is=1237214, offset=-214
Aug  1 16:39:48 video kernel: AFC: f=1588000, f_is=1588214, offset=-214
Aug  1 16:39:55 video kernel: AFC: f=1880000, f_is=1879141, offset=859
Aug  1 16:39:59 video kernel: AFC: f=1588000, f_is=1588214, offset=-214

If you consider +/-700 as small, I guess these aren't too large, either.

Klaus


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



Home | Main Index | Thread Index