2 #include <lib/dvb/sec.h>
3 #if HAVE_DVB_API_VERSION < 3
4 #include <ost/frontend.h>
5 #define INVERSION Inversion
6 #define FREQUENCY Frequency
7 #define FEC_INNER FEC_inner
8 #define SYMBOLRATE SymbolRate
10 #include <linux/dvb/frontend.h>
11 #define INVERSION inversion
12 #define FREQUENCY frequency
13 #define FEC_INNER fec_inner
14 #define SYMBOLRATE symbol_rate
16 #include <lib/base/eerror.h>
18 DEFINE_REF(eDVBSatelliteEquipmentControl);
20 eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl()
24 RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, eDVBFrontendParametersSatellite &sat)
27 eDebug("(very) ugly and hardcoded eDVBSatelliteEquipmentControl");
29 if (sat.frequency > 11700000)
35 parm.FREQUENCY = sat.frequency - 10600000;
37 parm.FREQUENCY = sat.frequency - 9750000;
39 // frontend.sentDiseqc(...);
41 parm.INVERSION = (!sat.inversion) ? INVERSION_ON : INVERSION_OFF;
48 parm.u.qpsk.FEC_INNER = FEC_AUTO;
51 parm.u.qpsk.SYMBOLRATE = sat.symbol_rate;
53 frontend.setVoltage((sat.polarisation == eDVBFrontendParametersSatellite::Polarisation::Vertical) ? iDVBFrontend::voltage13 : iDVBFrontend::voltage18);
55 eDVBDiseqcCommand diseqc;
58 diseqc.data[0] = 0xe0;
59 diseqc.data[1] = 0x10;
60 diseqc.data[2] = 0x38;
61 diseqc.data[3] = 0xF0;
66 if (sat.polarisation == eDVBFrontendParametersSatellite::Polarisation::Horizontal)
69 frontend.sendDiseqc(diseqc);
70 frontend.setTone(hi ? iDVBFrontend::toneOn : iDVBFrontend::toneOff);