X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/c9a51ec6920b556e2faf337a890cca04cc6a2141..913cbe91fcba552dc14d6123572398415b40eb40:/lib/dvb/frontend.cpp diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index 10e89453..0319c4c9 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -666,15 +666,28 @@ void eDVBFrontend::feEvent(int w) #if HAVE_DVB_API_VERSION < 3 if (event.type == FE_COMPLETION_EV) #else - eDebug("(%d)fe event: status %x, inversion %s", m_dvbid, event.status, (event.parameters.inversion == INVERSION_ON) ? "on" : "off"); + eDebug("(%d)fe event: status %x, inversion %s, m_tuning %d", m_dvbid, event.status, (event.parameters.inversion == INVERSION_ON) ? "on" : "off", m_tuning); if (event.status & FE_HAS_LOCK) #endif { state = stateLock; } else { - if (m_tuning) + if (m_tuning) { state = stateTuning; +#if HAVE_DVB_API_VERSION >= 3 + if (event.status & FE_TIMEDOUT) { + eDebug("FE_TIMEDOUT! ..abort"); + m_tuneTimer->stop(); + timeout(); + return; + } + ++m_tuning; +#else + m_tuneTimer->stop(); + timeout(); +#endif + } else { eDebug("stateLostLock"); @@ -860,7 +873,7 @@ int eDVBFrontend::readFrontendData(int type) if (snr != 0) ret = 10 * (int)(-100 * (log10(snr) - log10(255))); } - else if (!strcmp(m_description, "BCM4506")) + else if (strstr(m_description, "BCM4506") || strstr(m_description, "BCM4505")) ret = (snr * 100) >> 8; if (type == signalQuality) @@ -2387,9 +2400,9 @@ RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where) if (!m_simulate) { m_tuneTimer->start(0,true); + m_tuning = 1; if (m_state != stateTuning) { - m_tuning = 1; m_state = stateTuning; m_stateChanged(this); }