Skip to content

Commit

Permalink
[unicable] incorrect behavior of linked tuners fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
dvb-adenin committed Feb 7, 2017
1 parent 06c45a5 commit badcf21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/dvb/frontend.cpp
Expand Up @@ -2927,13 +2927,14 @@ RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where)
if(has_prev())
{
eDVBFrontend *fe = (eDVBFrontend *)this;
fe->getTop(this, fe);
getTop(this, fe);

int state;
fe->getState(state);
if (state != eDVBFrontend::stateClosed)
{
eSecCommandList sec_takeover_sequence;
sec_takeover_sequence.push_front(eSecCommand(eSecCommand::CHANGE_TUNER_TYPE, m_type));
sec_takeover_sequence.push_front(eSecCommand(eSecCommand::TAKEOVER, (long)this));
fe->setSecSequence(sec_takeover_sequence, (eDVBFrontend *)this);
eDebug("takeover_sec %d",fe->getDVBID());
Expand Down
6 changes: 4 additions & 2 deletions lib/dvb/sec.cpp
Expand Up @@ -534,7 +534,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, const eDVB
{
case 1:
eDebugNoSimulate("JESS (EN50607)");
if(gfrq)
if(lnb_param.SatCR_switch_reliable)
{
long inv;
frontend.getData(eDVBFrontend::SPECTINV_CNT, inv);
Expand All @@ -547,7 +547,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, const eDVB
case 0:
default:
eDebugNoSimulate("Unicable (EN50494)");
if(gfrq)
if(lnb_param.SatCR_switch_reliable)
{
long inv;
frontend.getData(eDVBFrontend::SPECTINV_CNT, inv);
Expand Down Expand Up @@ -1262,6 +1262,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, const eDVB
if (state != eDVBFrontend::stateClosed)
{
eSecCommandList sec_takeover_sequence;
sec_takeover_sequence.push_front(eSecCommand(eSecCommand::CHANGE_TUNER_TYPE,((eDVBFrontend *)&frontend)->getCurrentType()));
sec_takeover_sequence.push_front(eSecCommand(eSecCommand::TAKEOVER, (long)&frontend));
fe->setSecSequence(sec_takeover_sequence, (eDVBFrontend *)&frontend);
eDebugNoSimulate("takeover_sec %d",fe->getDVBID());
Expand Down Expand Up @@ -1367,6 +1368,7 @@ void eDVBSatelliteEquipmentControl::prepareTurnOffSatCR(iDVBFrontend &frontend)
if (state != eDVBFrontend::stateClosed)
{
eSecCommandList sec_takeover_sequence;
sec_takeover_sequence.push_front(eSecCommand(eSecCommand::CHANGE_TUNER_TYPE,((eDVBFrontend *)&frontend)->getCurrentType()));
sec_takeover_sequence.push_front(eSecCommand(eSecCommand::TAKEOVER, (long)&frontend));
fe->setSecSequence(sec_takeover_sequence, (eDVBFrontend *)&frontend);
eDebug("takeover_sec %d",fe->getDVBID());
Expand Down

0 comments on commit badcf21

Please sign in to comment.