Mailing List archive

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

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



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


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



Home | Main Index | Thread Index