git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix no more turning positioner after leave positioner setup in some cases
[enigma2.git]
/
lib
/
dvb
/
sec.cpp
diff --git
a/lib/dvb/sec.cpp
b/lib/dvb/sec.cpp
index 71c8a19cfd10a3ed5874a13c8a4a46ecae79e667..44cbe709d4d3cde2a789f49b9f8bf93b5dc76938 100644
(file)
--- a/
lib/dvb/sec.cpp
+++ b/
lib/dvb/sec.cpp
@@
-37,7
+37,7
@@
void eDVBSatelliteEquipmentControl::setParam(int param, int value)
}
eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBRegisteredFrontend> &avail_frontends, eSmartPtrList<eDVBRegisteredFrontend> &avail_simulate_frontends)
}
eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBRegisteredFrontend> &avail_frontends, eSmartPtrList<eDVBRegisteredFrontend> &avail_simulate_frontends)
- :m_lnbidx((sizeof(m_lnbs) / sizeof(eDVBSatelliteLNBParameters))-1), m_curSat(m_lnbs[0].m_satellites.end()), m_avail_frontends(avail_frontends), m_avail_simulate_frontends(avail_simulate_frontends), m_rotorMoving(
false
)
+ :m_lnbidx((sizeof(m_lnbs) / sizeof(eDVBSatelliteLNBParameters))-1), m_curSat(m_lnbs[0].m_satellites.end()), m_avail_frontends(avail_frontends), m_avail_simulate_frontends(avail_simulate_frontends), m_rotorMoving(
0
)
{
if (!instance)
instance = this;
{
if (!instance)
instance = this;
@@
-156,6
+156,11
@@
int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite
ret = 15000;
}
ret = 15000;
}
+ if (sat.no_rotor_command_on_tune && !rotor) {
+ eSecDebugNoSimulate("no rotor but no_rotor_command_on_tune is set.. ignore lnb %d", idx);
+ continue;
+ }
+
eSecDebugNoSimulate("ret1 %d", ret);
if (linked_in_use)
eSecDebugNoSimulate("ret1 %d", ret);
if (linked_in_use)
@@
-976,7
+981,8
@@
RESULT eDVBSatelliteEquipmentControl::clear()
for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it)
{
long tmp;
for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it)
{
long tmp;
- if (!strcmp(it->m_frontend->getDescription(), "BCM4501 (internal)") && !it->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, tmp) && tmp != -1)
+ char c;
+ if (sscanf(it->m_frontend->getDescription(), "BCM450%c (internal)", &c) == 1 && !it->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, tmp) && tmp != -1)
{
FILE *f=fopen("/proc/stb/tsmux/lnb_b_input", "w");
if (!f || fwrite("B", 1, 1, f) != 1)
{
FILE *f=fopen("/proc/stb/tsmux/lnb_b_input", "w");
if (!f || fwrite("B", 1, 1, f) != 1)
@@
-1385,8
+1391,8
@@
RESULT eDVBSatelliteEquipmentControl::setTunerLinked(int tu1, int tu2)
if (tu1 != tu2)
{
eDVBRegisteredFrontend *p1=NULL, *p2=NULL;
if (tu1 != tu2)
{
eDVBRegisteredFrontend *p1=NULL, *p2=NULL;
-
- for (
eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin())
; it != m_avail_frontends.end(); ++it)
+ eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin());
+ for (; it != m_avail_frontends.end(); ++it)
{
if (it->m_frontend->getSlotID() == tu1)
p1 = *it;
{
if (it->m_frontend->getSlotID() == tu1)
p1 = *it;
@@
-1395,9
+1401,10
@@
RESULT eDVBSatelliteEquipmentControl::setTunerLinked(int tu1, int tu2)
}
if (p1 && p2)
{
}
if (p1 && p2)
{
+ char c;
p1->m_frontend->setData(eDVBFrontend::LINKED_PREV_PTR, (long)p2);
p2->m_frontend->setData(eDVBFrontend::LINKED_NEXT_PTR, (long)p1);
p1->m_frontend->setData(eDVBFrontend::LINKED_PREV_PTR, (long)p2);
p2->m_frontend->setData(eDVBFrontend::LINKED_NEXT_PTR, (long)p1);
- if (!strcmp(p1->m_frontend->getDescription(), p2->m_frontend->getDescription()) &&
!strcmp(p1->m_frontend->getDescription(), "BCM4501 (internal)")
)
+ if (!strcmp(p1->m_frontend->getDescription(), p2->m_frontend->getDescription()) &&
sscanf(p1->m_frontend->getDescription(), "BCM450%c (internal)", &c) == 1
)
{
FILE *f=fopen("/proc/stb/tsmux/lnb_b_input", "w");
if (!f || fwrite("A", 1, 1, f) != 1)
{
FILE *f=fopen("/proc/stb/tsmux/lnb_b_input", "w");
if (!f || fwrite("A", 1, 1, f) != 1)
@@
-1411,7
+1418,8
@@
RESULT eDVBSatelliteEquipmentControl::setTunerLinked(int tu1, int tu2)
}
p1=p2=NULL;
}
p1=p2=NULL;
- for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_simulate_frontends.begin()); it != m_avail_simulate_frontends.end(); ++it)
+ it=m_avail_simulate_frontends.begin();
+ for (; it != m_avail_simulate_frontends.end(); ++it)
{
if (it->m_frontend->getSlotID() == tu1)
p1 = *it;
{
if (it->m_frontend->getSlotID() == tu1)
p1 = *it;
@@
-1478,7
+1486,10
@@
bool eDVBSatelliteEquipmentControl::isRotorMoving()
return m_rotorMoving;
}
return m_rotorMoving;
}
-void eDVBSatelliteEquipmentControl::setRotorMoving(bool b)
+void eDVBSatelliteEquipmentControl::setRotorMoving(
int slot_no,
bool b)
{
{
- m_rotorMoving=b;
+ if (b)
+ m_rotorMoving |= (1 << slot_no);
+ else
+ m_rotorMoving &= ~(1 << slot_no);
}
}