From 6eb082c12a2f61f6aef4093abaae55a3e0e30843 Mon Sep 17 00:00:00 2001 From: BPanther Date: Fri, 17 Jan 2020 20:42:48 +0100 Subject: [PATCH] vuplus: dvb wait delay for ci response --- common/ca_ci.cpp | 17 ++++++++++++++++- include/ca_ci.h | 6 ++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/common/ca_ci.cpp b/common/ca_ci.cpp index 36f161e..8828775 100644 --- a/common/ca_ci.cpp +++ b/common/ca_ci.cpp @@ -1918,7 +1918,7 @@ void cCA::SetTSClock(u32 Speed, int slot) * and here too. * On the other hand: or ci_clock will be set here for all ci slots ???? */ - char buf[64]; + char buf[64]; snprintf(buf, 64, "/proc/stb/tsmux/ci%d_tsclk", slot); FILE *ci = fopen(buf, "wb"); printf("%s -> %s to: %s\n", FILENAME, __func__, Speed > 9 * 1000000 ? "extra_high" : Speed > 6 * 1000000 ? "high" : "normal"); @@ -1934,3 +1934,18 @@ void cCA::SetTSClock(u32 Speed, int slot) fclose(ci); } } + +#if BOXMODEL_VUPLUS_ALL +void cCA::SetCIDelay(int Delay) +{ + char buf[64]; + snprintf(buf, 64, "/proc/stb/tsmux/rmx_delay"); + FILE *ci = fopen(buf, "wb"); + printf("%s -> %s to: %i\n", FILENAME, __func__, Delay); + if (ci) + { + fprintf(ci, "%i", Delay); + fclose(ci); + } +} +#endif diff --git a/include/ca_ci.h b/include/ca_ci.h index 9766545..63e59a4 100644 --- a/include/ca_ci.h +++ b/include/ca_ci.h @@ -328,6 +328,12 @@ public: /// Sets the frequency (in Hz) of the TS stream input (only valid for CI) /// sh4 unused void SetTSClock(u32 Speed, int slot = 0); + +#if BOXMODEL_VUPLUS_ALL + /// dvb wait delay for ci response + void SetCIDelay(int Delay); +#endif + /// Start the CA module /// sh4 unused bool Start(void);