break;
case eSecCommand::SET_POWER_LIMITING_MODE:
{
- if (m_need_rotor_workaround)
+ char proc_name[64];
+ sprintf(proc_name, "/proc/stb/frontend/%d/static_current_limiting", m_dvbid);
+ FILE *f=fopen(proc_name, "w");
+ if (f) // new interface exist?
+ {
+ bool slimiting = m_sec_sequence.current()->mode == eSecCommand::modeStatic;
+ if (fprintf(f, "%s", slimiting ? "on" : "off") <= 0)
+ eDebug("write %s failed!! (%m)", proc_name);
+ else
+ eDebug("[SEC] set %s current limiting", slimiting ? "static" : "dynamic");
+ fclose(f);
+ }
+ else if (m_need_rotor_workaround)
{
char dev[16];
int type;
if (feparm->getSystem(type) || type != m_type || !m_enabled)
return 0;
-
if (m_type == eDVBFrontend::feSatellite)
{
ASSERT(m_sec);
ret = m_sec->canTune(sat_parm, this, 1 << m_slotid);
if (ret > 1 && sat_parm.system == eDVBFrontendParametersSatellite::System::DVB_S && m_can_handle_dvbs2)
ret -= 1;
+ return ret;
}
else if (m_type == eDVBFrontend::feCable)
return 2; // more prio for cable frontends
- return 1;
+ else if (m_type == eDVBFrontend::feTerrestrial)
+ return 1;
+ return 0;
}
bool eDVBFrontend::setSlotInfo(ePyObject obj)
// HACK.. the rotor workaround is neede for all NIMs with LNBP21 voltage regulator...
m_need_rotor_workaround = !!strstr(m_description, "Alps BSBE1") ||
!!strstr(m_description, "Alps BSBE2") ||
- !!strstr(m_description, "Alps -S");
- m_can_handle_dvbs2 = !!strstr(m_description, "Alps BSBE2") || !!strstr(m_description, "bcm4501");
- eDebug("setSlotInfo for dvb frontend %d to slotid %d, descr %s, need rotorworkaround %s, enabled %s",
- m_dvbid, m_slotid, m_description, m_need_rotor_workaround ? "Yes" : "No", m_enabled ? "Yes" : "No" );
+ !!strstr(m_description, "Alps -S") ||
+ !!strstr(m_description, "BCM4501");
+ m_can_handle_dvbs2 = !!strstr(m_description, "Alps BSBE2") || !!strstr(m_description, "BCM4501");
+ 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;
arg_error:
PyErr_SetString(PyExc_StandardError,