diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-09-02 13:55:37 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-09-02 13:55:37 +0200 |
commit | 2ffcc66af2cb3f379fd8445c019b0cac1c2cc275 (patch) | |
tree | 80f1bcaf8fe0366438aa62487c7aa7ac0fdac165 | |
parent | 85904ae23d301839c67af479fd66ee0fe4d6c5cd (diff) | |
download | vdr-2ffcc66af2cb3f379fd8445c019b0cac1c2cc275.tar.gz vdr-2ffcc66af2cb3f379fd8445c019b0cac1c2cc275.tar.bz2 |
Re-introduced the code that waits for a tuner lock in VDR/device.c
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | device.c | 11 |
3 files changed, 15 insertions, 1 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d5ce36d9..40ced81a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -791,6 +791,7 @@ Malcolm Caldwell <malcolm.caldwell@ntu.edu.au> for modifying LOF handling to allow for C-band reception for reporting a crash in creating a new timer in case there is no device in the system that can actually receive any channel + for suggesting to re-introduced the code that waits for a tuner lock in VDR/device.c Ludwig Nussel <ludwig.nussel@web.de> for making the LIRC thread avoid high CPU load in case the connection to LIRC gets lost @@ -3765,3 +3765,7 @@ Video Disk Recorder Revision History - Made LIRC command parsing more robust (thanks to Ville Skyttä). - Introduced a separate 'plugins-install' target in the Makefile (thanks to Daniel Thompson). +- Re-introduced the code that waits for a tuner lock in VDR/device.c, since + apparently some users actually need it. It's not active by default, you'll have + to define the WAIT_FOR_TUNER_LOCK macro in that file if you need it (suggested + by Malcolm Caldwell). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.107 2005/08/27 09:01:09 kls Exp $ + * $Id: device.c 1.108 2005/09/02 13:52:31 kls Exp $ */ #include "device.h" @@ -1185,6 +1185,15 @@ bool cDevice::AttachReceiver(cReceiver *Receiver) return false; if (Receiver->device == this) return true; +// activate the following line if you need it - actually the driver should be fixed! +//#define WAIT_FOR_TUNER_LOCK +#ifdef WAIT_FOR_TUNER_LOCK +#define TUNER_LOCK_TIMEOUT 5000 // ms + if (!HasLock(TUNER_LOCK_TIMEOUT)) { + esyslog("ERROR: device %d has no lock, can't attach receiver!", CardIndex() + 1); + return false; + } +#endif cMutexLock MutexLock(&mutexReceiver); for (int i = 0; i < MAXRECEIVERS; i++) { if (!receiver[i]) { |