diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2009-03-15 11:58:52 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2009-03-15 11:58:52 +0100 |
| commit | a2b81eb390ee9cfb892734251429a062a4fa77e4 (patch) | |
| tree | fc16726c6f861f2ec9924d36beca93ccf6630354 /lib/dvb_ci | |
| parent | 0d6533c82c3703b19af8afabe1121db1d9848a60 (diff) | |
| download | enigma2-a2b81eb390ee9cfb892734251429a062a4fa77e4.tar.gz enigma2-a2b81eb390ee9cfb892734251429a062a4fa77e4.zip | |
add "High bitrate support" choice in CI Setup (needs new drivers to work)
Diffstat (limited to 'lib/dvb_ci')
| -rw-r--r-- | lib/dvb_ci/dvbci.cpp | 25 | ||||
| -rw-r--r-- | lib/dvb_ci/dvbci.h | 2 | ||||
| -rw-r--r-- | lib/dvb_ci/dvbci_ui.cpp | 5 | ||||
| -rw-r--r-- | lib/dvb_ci/dvbci_ui.h | 2 |
4 files changed, 34 insertions, 0 deletions
diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index 8fa1bca2..ce1f7d66 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -938,6 +938,14 @@ PyObject *eDVBCIInterfaces::readCICaIds(int slotid) return 0; } +int eDVBCIInterfaces::setCIClockRate(int slotid, int rate) +{ + eDVBCISlot *slot = getSlot(slotid); + if (slot) + return slot->setClockRate(rate); + return -1; +} + int eDVBCISlot::send(const unsigned char *data, size_t len) { int res=0; @@ -1323,4 +1331,21 @@ int eDVBCISlot::setSource(data_source source) return 0; } +int eDVBCISlot::setClockRate(int rate) +{ + char buf[64]; + snprintf(buf, 64, "/proc/stb/tsmux/ci%d_tsclk", slotid); + FILE *ci = fopen(buf, "wb"); + if (ci) + { + if (rate) + fprintf(ci, "high"); + else + fprintf(ci, "normal"); + fclose(ci); + return 0; + } + return -1; +} + eAutoInitP0<eDVBCIInterfaces> init_eDVBCIInterfaces(eAutoInitNumbers::dvb, "CI Slots"); diff --git a/lib/dvb_ci/dvbci.h b/lib/dvb_ci/dvbci.h index c11a1203..cdaaf904 100644 --- a/lib/dvb_ci/dvbci.h +++ b/lib/dvb_ci/dvbci.h @@ -94,6 +94,7 @@ public: void removeService(uint16_t program_number=0xFFFF); int getNumOfServices() { return running_services.size(); } int setSource(data_source source); + int setClockRate(int); }; struct CIPmtHandler @@ -146,6 +147,7 @@ public: int getMMIState(int slot); int sendCAPMT(int slot); int setInputSource(int tunerno, data_source source); + int setCIClockRate(int slot, int rate); #ifdef SWIG public: #endif diff --git a/lib/dvb_ci/dvbci_ui.cpp b/lib/dvb_ci/dvbci_ui.cpp index af613c43..b1bfdc25 100644 --- a/lib/dvb_ci/dvbci_ui.cpp +++ b/lib/dvb_ci/dvbci_ui.cpp @@ -71,5 +71,10 @@ int eDVBCI_UI::getMMIState(int slot) return eDVBCIInterfaces::getInstance()->getMMIState(slot); } +int eDVBCI_UI::setClockRate(int slot, int rate) +{ + return eDVBCIInterfaces::getInstance()->setCIClockRate(slot, rate); +} + //FIXME: correct "run/startlevel" eAutoInitP0<eDVBCI_UI> init_dvbciui(eAutoInitNumbers::rc, "DVB-CI UI"); diff --git a/lib/dvb_ci/dvbci_ui.h b/lib/dvb_ci/dvbci_ui.h index b53ab02d..65b0f95d 100644 --- a/lib/dvb_ci/dvbci_ui.h +++ b/lib/dvb_ci/dvbci_ui.h @@ -13,6 +13,7 @@ class eDVBCI_UI: public eMMI_UI #endif void stateChanged(int val) { ciStateChanged(val); } public: + enum { rateNormal, rateHigh }; PSignal1<void,int> ciStateChanged; #ifndef SWIG eDVBCI_UI(); @@ -26,6 +27,7 @@ public: int answerMenu(int slot, int answer); int answerEnq(int slot, char *val); int cancelEnq(int slot); + int setClockRate(int slot, int rate); }; #endif |
