fix no more working teletext / ac3
[enigma2.git] / lib / dvb / frontend.cpp
index d7bc6737118b8651ca9f534c691c751e9ae3633d..af627e26a9683717cfdcdf7d2b45e24e2258af1e 100644 (file)
@@ -637,7 +637,7 @@ void eDVBFrontend::feEvent(int w)
                                sec_fe->m_data[CSW] = sec_fe->m_data[UCSW] = sec_fe->m_data[TONEBURST] = -1; // reset diseqc
                        }
                }
-               if (m_state != state && ((m_idleInputpower[0] && m_idleInputpower[1]) || (sec_fe->m_data[ROTOR_POS] == sec_fe->m_data[NEW_ROTOR_POS])))
+               if (m_state != state)
                {
                        m_state = state;
                        m_stateChanged(this);
@@ -732,7 +732,8 @@ int eDVBFrontend::readFrontendData(int type)
                                                {250,1123}, {260,1058}, {270,1004}, {280,957}, {290,920},
                                                {300,890}
                                        };
-                                       long regval = 0xFFFF - ((snr / 3) + 0xA100), // revert some dvb api calulations to get the real register value
+                                       int add=strchr(m_description, '.') ? 0xA250 : 0xA100;
+                                       long regval = 0xFFFF - ((snr / 3) + add), // revert some dvb api calulations to get the real register value
                                                Imin=0,
                                                Imax=30,
                                                i;
@@ -1513,6 +1514,8 @@ void eDVBFrontend::tuneLoop()  // called by m_tuneTimer
                                                setSecSequencePos(cmd.steps);
                                                m_state = stateLock;
                                                m_stateChanged(this);
+                                               feEvent(-1);
+                                               m_sn->start();
                                                break;
                                        }
                                }
@@ -2348,13 +2351,14 @@ int eDVBFrontend::isCompatibleWith(ePtr<iDVBFrontendParameters> &feparm)
 
 bool eDVBFrontend::setSlotInfo(ePyObject obj)
 {
-       ePyObject Id, Descr, Enabled;
-       if (!PyTuple_Check(obj) || PyTuple_Size(obj) != 3)
+       ePyObject Id, Descr, Enabled, IsDVBS2;
+       if (!PyTuple_Check(obj) || PyTuple_Size(obj) != 4)
                goto arg_error;
        Id = PyTuple_GET_ITEM(obj, 0);
        Descr = PyTuple_GET_ITEM(obj, 1);
        Enabled = PyTuple_GET_ITEM(obj, 2);
-       if (!PyInt_Check(Id) || !PyString_Check(Descr) || !PyBool_Check(Enabled))
+       IsDVBS2 = PyTuple_GET_ITEM(obj, 3);
+       if (!PyInt_Check(Id) || !PyString_Check(Descr) || !PyBool_Check(Enabled) || !PyBool_Check(IsDVBS2))
                goto arg_error;
        strcpy(m_description, PyString_AS_STRING(Descr));
        m_slotid = PyInt_AsLong(Id);
@@ -2364,7 +2368,7 @@ bool eDVBFrontend::setSlotInfo(ePyObject obj)
                !!strstr(m_description, "Alps BSBE2") ||
                !!strstr(m_description, "Alps -S") ||
                !!strstr(m_description, "BCM4501");
-       m_can_handle_dvbs2 = !!strstr(m_description, "Alps BSBE2") || !!strstr(m_description, "BCM4501");
+       m_can_handle_dvbs2 = IsDVBS2 == Py_True;
        eDebug("setSlotInfo for dvb frontend %d to slotid %d, descr %s, need rotorworkaround %s, enabled %s, DVB-S2 %s",
                m_dvbid, m_slotid, m_description, m_need_rotor_workaround ? "Yes" : "No", m_enabled ? "Yes" : "No", m_can_handle_dvbs2 ? "Yes" : "No" );
        return true;