aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb_ci/dvbci.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dvb_ci/dvbci.cpp')
-rw-r--r--lib/dvb_ci/dvbci.cpp25
1 files changed, 25 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");