summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-09-17 12:53:46 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2011-09-17 12:53:46 +0200
commitb40cd95dcccf7a37901d660d49a3ac1ff6bdecc8 (patch)
treee9835fe06a9f909cfc225299deaaa08498cef657 /dvbdevice.c
parentb228086355b16dfa872a93f1d2366fb0b28740e1 (diff)
downloadvdr-b40cd95dcccf7a37901d660d49a3ac1ff6bdecc8.tar.gz
vdr-b40cd95dcccf7a37901d660d49a3ac1ff6bdecc8.tar.bz2
Added random timeout to avoid SCR device interference
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index 175d708d..726159ff 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 2.46 2011/09/17 11:41:01 kls Exp $
+ * $Id: dvbdevice.c 2.47 2011/09/17 12:53:46 kls Exp $
*/
#include "dvbdevice.h"
@@ -32,6 +32,8 @@
#define ATSC_TUNE_TIMEOUT 9000 //ms
#define ATSC_LOCK_TIMEOUT 2000 //ms
+#define SCR_RANDOM_TIMEOUT 500 // ms (add random value up to this when tuning SCR device to avoid lockups)
+
// --- DVB Parameter Maps ----------------------------------------------------
const tDvbParameterMap InversionValues[] = {
@@ -663,7 +665,7 @@ void cDvbTuner::Action(void)
break;
case tsSet:
tunerStatus = SetFrontend() ? tsTuned : tsIdle;
- Timer.Set(tuneTimeout);
+ Timer.Set(tuneTimeout + (scr ? rand() % SCR_RANDOM_TIMEOUT : 0));
continue;
case tsTuned:
if (Timer.TimedOut()) {