small private epg fix
[enigma2.git] / lib / dvb / frontend.cpp
index 8ba68a593dea7625fa6a7ad4a3773e1cd7521172..1040d7cd55ae1a1d29077ee42010c7c735bb7c14 100644 (file)
@@ -1739,7 +1739,11 @@ RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where)
                                ePythonConfigQuery::getConfigValue("config.terrestrial.enable_5V", enable_5V);
                                if (enable_5V == "yes")
                                        m_sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage13) );
+                               else
+                                       m_sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltageOff) );
                        }
+                       else
+                               m_sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltageOff) );
                        m_sec_sequence.push_back( eSecCommand(eSecCommand::SET_FRONTEND) );
                }
                break;
@@ -1770,7 +1774,7 @@ RESULT eDVBFrontend::connectStateChange(const Slot1<void,iDVBFrontend*> &stateCh
 
 RESULT eDVBFrontend::setVoltage(int voltage)
 {
-       if (m_type != feSatellite)
+       if (m_type == feCable)
                return -1;
 #if HAVE_DVB_API_VERSION < 3
        secVoltage vlt;
@@ -1812,7 +1816,7 @@ 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)
+       if (m_type == feSatellite && ::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