aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-01-19 00:21:14 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-01-19 00:21:14 +0000
commitd59ce3f9c60c4466006ad1e148cec9a6e3a29cb2 (patch)
treece262674f321e0ddacbcd09c8e2d058a25b982f8 /lib
parentd250965754894689707739e6d12d7cf6a6f13d5e (diff)
downloadenigma2-d59ce3f9c60c4466006ad1e148cec9a6e3a29cb2.tar.gz
enigma2-d59ce3f9c60c4466006ad1e148cec9a6e3a29cb2.zip
retune on lostlock is now working :)
Diffstat (limited to 'lib')
-rw-r--r--lib/dvb/dvb.cpp6
-rw-r--r--lib/dvb/dvb.h1
-rw-r--r--lib/dvb/frontend.cpp4
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp
index 5c8c2cf6..32e19308 100644
--- a/lib/dvb/dvb.cpp
+++ b/lib/dvb/dvb.cpp
@@ -591,8 +591,9 @@ void eDVBChannel::frontendStateChanged(iDVBFrontend*fe)
ourstate = state_tuning;
} else if (state == iDVBFrontend::stateLostLock)
{
- eDebug("OURSTATE: lost lock");
- ourstate = state_unavailable;
+ eDebug("OURSTATE: lost lock.. retune");
+ ourstate = state_tuning;
+ m_frontend->get().tune(*m_feparm);
} else if (state == iDVBFrontend::stateFailed)
{
eDebug("OURSTATE: failed");
@@ -652,6 +653,7 @@ RESULT eDVBChannel::setChannel(const eDVBChannelID &channelid, ePtr<iDVBFrontend
/* if tuning fails, shutdown the channel immediately. */
int res;
res = m_frontend->get().tune(*feparm);
+ m_feparm = feparm;
if (res)
{
diff --git a/lib/dvb/dvb.h b/lib/dvb/dvb.h
index 511ef9aa..5fc2f043 100644
--- a/lib/dvb/dvb.h
+++ b/lib/dvb/dvb.h
@@ -225,6 +225,7 @@ public:
int getUseCount() { return m_use_count; }
private:
+ ePtr<iDVBFrontendParameters> m_feparm; // for retune on lostlock
ePtr<eDVBAllocatedFrontend> m_frontend;
ePtr<eDVBAllocatedDemux> m_demux, m_decoder_demux;
diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp
index a4a94a21..f4cbd307 100644
--- a/lib/dvb/frontend.cpp
+++ b/lib/dvb/frontend.cpp
@@ -400,9 +400,7 @@ void eDVBFrontend::feEvent(int w)
else
{
state = stateLostLock;
-
- if (m_state != stateLostLock)
- eDebug("FIXME: we lost lock, so we might have to retune.");
+ m_data[0] = m_data[1] = m_data[2] = -1; // reset diseqc
}
}
if (m_state != state)