aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/frontend.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-01-01 14:00:05 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-01-01 14:00:05 +0000
commit1578c510eba1e58dae172b4b594cdaf263e988f0 (patch)
tree79b48be8662df32e361789720bb145c3522f888a /lib/dvb/frontend.cpp
parent64fdc7815a0b07777d9c9706f02317d325f8f773 (diff)
downloadenigma2-1578c510eba1e58dae172b4b594cdaf263e988f0.tar.gz
enigma2-1578c510eba1e58dae172b4b594cdaf263e988f0.zip
enable/disable higher lnb voltage is now working
Diffstat (limited to 'lib/dvb/frontend.cpp')
-rw-r--r--lib/dvb/frontend.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp
index 0cb910fb..a081a37f 100644
--- a/lib/dvb/frontend.cpp
+++ b/lib/dvb/frontend.cpp
@@ -614,7 +614,7 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer
break;
case eSecCommand::IF_INPUTPOWER_DELTA_GOTO:
{
- int idleInputpower = m_idleInputpower[m_curVoltage == iDVBFrontend::voltage13 ? 0 : 1];
+ int idleInputpower = m_idleInputpower[ (m_curVoltage&1) ? 0 : 1];
eSecCommand::rotor &cmd = m_sec_sequence.current()->measure;
const char *txt = cmd.direction ? "running" : "stopped";
eDebug("[SEC] waiting for rotor %s %d, idle %d, delta %d",
@@ -965,9 +965,9 @@ RESULT eDVBFrontend::setVoltage(int voltage)
#if HAVE_DVB_API_VERSION < 3
secVoltage vlt;
#else
+ bool increased=false;
fe_sec_voltage_t vlt;
#endif
-
m_curVoltage=voltage;
switch (voltage)
{
@@ -976,9 +976,23 @@ RESULT eDVBFrontend::setVoltage(int voltage)
m_data[i]=-1;
vlt = SEC_VOLTAGE_OFF;
break;
+ case voltage13_5:
+#if HAVE_DVB_API_VERSION < 3
+ vlt = SEC_VOLTAGE_13_5;
+ break;
+#else
+ increased = true;
+#endif
case voltage13:
vlt = SEC_VOLTAGE_13;
break;
+ case voltage18_5:
+#if HAVE_DVB_API_VERSION < 3
+ vlt = SEC_VOLTAGE_18_5;
+ break;
+#else
+ increased = true;
+#endif
case voltage18:
vlt = SEC_VOLTAGE_18;
break;
@@ -988,6 +1002,8 @@ RESULT eDVBFrontend::setVoltage(int voltage)
#if HAVE_DVB_API_VERSION < 3
return ::ioctl(m_secfd, SEC_SET_VOLTAGE, vlt);
#else
+ if (::ioctl(m_fd, FE_ENABLE_HIGH_LNB_VOLTAGE, increased) < 0)
+ perror("FE_ENABLE_HIGH_LNB_VOLTAGE");
return ::ioctl(m_fd, FE_SET_VOLTAGE, vlt);
#endif
}