[linux-dvb] Lost lock problems over extended periods of time

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

 



It seems I only need to set the tone when it loses lock. Here is my current 
hack:

diff -a -u -r1.96 dvb_frontend.c
--- dvb_frontend.c      17 Nov 2004 14:30:33 -0000      1.96
+++ dvb_frontend.c      8 Jun 2005 15:22:15 -0000
@@ -507,9 +507,22 @@
                        else {
                                /* if we _WERE_ tuned, but now don't have a 
lock,
                                 * need to zigzag */
-                               fe->state = FESTATE_ZIGZAG_FAST;
-                               fe->started_auto_step = fe->auto_step;
-                               check_wrapped = 0;
+                       printk("DVB: LOST LOCK - attempting retune\n");
+                          if (fe->frontend->ops->set_tone)
+                             fe->frontend->ops->set_tone(fe->frontend, 0);
+                          mdelay(100);
+                          fe->frontend->ops->read_status(fe->frontend, &s);
+                          if (s & FE_HAS_LOCK) {
+                             printk("DVB: REGAINED LOCK WITH SIMPLE TONE 
setting\n");
+                             fe->state = FESTATE_TUNED;
+                             continue;
+                          }
+
+                          printk("DVB: TRYING COMPLETE RETUNE\n");
+                           fe->state = FESTATE_ZIGZAG_FAST;
+                           fe->started_auto_step = fe->auto_step;
+                           check_wrapped = 0;
+                          continue;
                        }
                }

When it dies, I see the following in dmesg:
DVB: LOST LOCK - attempting retune
DVB: REGAINED LOCK WITH SIMPLE TONE setting

So what the hell would cause that? I've got printks in the 
set_tone()/set_voltage()/etc functions, and nothing is calling them. All it 
does once the initial lock is gained is request the frontend lock status.

OK, Now I'm going to try setting the tone again every 60 seconds in the 
frontend loop.



[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux