diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-01-08 14:32:39 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-01-08 14:32:39 +0100 |
commit | 2b3821cc88e3caf087ec10246d9e9239270d3c60 (patch) | |
tree | 1f1e0017befeadb5326f91ffff30d2c5662ae654 /dvbdevice.c | |
parent | acaa5494041afad36ba2b8c32af36b70ca6cf88e (diff) | |
download | vdr-2b3821cc88e3caf087ec10246d9e9239270d3c60.tar.gz vdr-2b3821cc88e3caf087ec10246d9e9239270d3c60.tar.bz2 |
cDvbTuner::ExecuteDiseqc() now makes sure only one tuner sends SCR commands at any given time
Diffstat (limited to 'dvbdevice.c')
-rw-r--r-- | dvbdevice.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dvbdevice.c b/dvbdevice.c index c93328f5..acd71264 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.51 2012/01/07 10:42:47 kls Exp $ + * $Id: dvbdevice.c 2.52 2012/01/08 14:30:04 kls Exp $ */ #include "dvbdevice.h" @@ -642,6 +642,9 @@ void cDvbTuner::ExecuteDiseqc(const cDiseqc *Diseqc, unsigned int *Frequency) CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, SEC_VOLTAGE_13)); // must explicitly turn on LNB power lnbPowerTurnedOn = true; } + static cMutex Mutex; + if (Diseqc->IsScr()) + Mutex.Lock(); struct dvb_diseqc_master_cmd cmd; const char *CurrentAction = NULL; for (;;) { @@ -662,6 +665,8 @@ void cDvbTuner::ExecuteDiseqc(const cDiseqc *Diseqc, unsigned int *Frequency) } if (scr) ResetToneAndVoltage(); // makes sure we don't block the bus! + if (Diseqc->IsScr()) + Mutex.Unlock(); } void cDvbTuner::ResetToneAndVoltage(void) |