more prio for linked and satpos dependent tuners when the base tuner is in use
authorghost <andreas.monzner@multimedia-labs.de>
Mon, 6 Jul 2009 10:03:06 +0000 (12:03 +0200)
committerghost <andreas.monzner@multimedia-labs.de>
Mon, 6 Jul 2009 10:03:06 +0000 (12:03 +0200)
lib/dvb/sec.cpp

index 25567ce80a78c3e57278eabe607824c1568da1f9..83092d8e8e5309f72f06626fd9ead9a45c7eabb3 100644 (file)
@@ -148,7 +148,7 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite
                                        if ( di_param.m_diseqc_mode == eDVBSatelliteDiseqcParameters::V1_2 )  // ROTOR
                                                rotor = true;
 
                                        if ( di_param.m_diseqc_mode == eDVBSatelliteDiseqcParameters::V1_2 )  // ROTOR
                                                rotor = true;
 
-                                       ret=10000;
+                                       ret = 10000;
                                }
                                else
                                {
                                }
                                else
                                {
@@ -165,8 +165,10 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite
                                                ( diseqc && (ucsw != linked_ucsw || toneburst != linked_toneburst) ) ||
                                                ( rotor && rotor_pos != sat.orbital_position ) )
                                        {
                                                ( diseqc && (ucsw != linked_ucsw || toneburst != linked_toneburst) ) ||
                                                ( rotor && rotor_pos != sat.orbital_position ) )
                                        {
-                                               ret=0;
+                                               ret = 0;
                                        }
                                        }
+                                       else
+                                               ret += 15;
                                        eSecDebugNoSimulate("ret2 %d", ret);
                                        if (ret) // special case when this tuner is linked to a satpos dependent tuner
                                        {
                                        eSecDebugNoSimulate("ret2 %d", ret);
                                        if (ret) // special case when this tuner is linked to a satpos dependent tuner
                                        {
@@ -193,7 +195,9 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite
                                                if (satpos_depends_to_fe->m_inuse) // if the dependent frontend is in use?
                                                {
                                                        if (!rotor || rotor_pos != sat.orbital_position) // new orbital position not equal to current orbital pos?
                                                if (satpos_depends_to_fe->m_inuse) // if the dependent frontend is in use?
                                                {
                                                        if (!rotor || rotor_pos != sat.orbital_position) // new orbital position not equal to current orbital pos?
-                                                               ret=0;
+                                                               ret = 0;
+                                                       else
+                                                               ret += 10;
                                                }
                                        }
                                        else // current fe is dependent of another tuner ... (so this fe can't turn the rotor!)
                                                }
                                        }
                                        else // current fe is dependent of another tuner ... (so this fe can't turn the rotor!)
@@ -220,7 +224,7 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite
                                                lnb_param.m_lof_hi : lnb_param.m_lof_lo;
                                        int tuner_freq = abs(sat.frequency - lof);
                                        if (tuner_freq < 900000 || tuner_freq > 2200000)
                                                lnb_param.m_lof_hi : lnb_param.m_lof_lo;
                                        int tuner_freq = abs(sat.frequency - lof);
                                        if (tuner_freq < 900000 || tuner_freq > 2200000)
-                                               ret=0;
+                                               ret = 0;
                                }
 
                                if (ret && lnb_param.m_prio != -1)
                                }
 
                                if (ret && lnb_param.m_prio != -1)