diff options
| author | Ronny Strutz <ronny.strutz@multimedia-labs.de> | 2005-11-28 23:12:57 +0000 |
|---|---|---|
| committer | Ronny Strutz <ronny.strutz@multimedia-labs.de> | 2005-11-28 23:12:57 +0000 |
| commit | cb0260fc843d3d7386dd79ae977081d0ad082e04 (patch) | |
| tree | 8eef11e0d5ab25890ca849f9bcf775b46372eefc /lib/dvb_ci/dvbci.cpp | |
| parent | 669088fb85f6d0e6c0f7c424df2d1c5dc1141d84 (diff) | |
| download | enigma2-cb0260fc843d3d7386dd79ae977081d0ad082e04.tar.gz enigma2-cb0260fc843d3d7386dd79ae977081d0ad082e04.zip | |
enable TS when appmanager is ready
(tuner-A to input0)
Diffstat (limited to 'lib/dvb_ci/dvbci.cpp')
| -rw-r--r-- | lib/dvb_ci/dvbci.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index 8f1fcac9..a4bc4ff3 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -76,6 +76,16 @@ int eDVBCIInterfaces::reset(int slotid) return slot->reset(); } +int eDVBCIInterfaces::enableTS(int slotid, int enable) +{ + eDVBCISlot *slot; + + if( (slot = getSlot(slotid)) == 0 ) + return -1; + + return slot->enableTS(enable); +} + int eDVBCIInterfaces::initialize(int slotid) { eDVBCISlot *slot; @@ -253,6 +263,7 @@ void eDVBCISlot::data(int what) if(what == eSocketNotifier::Priority) { if(state != stateRemoved) { state = stateRemoved; + enableTS(0); printf("ci removed\n"); notifier->setRequested(eSocketNotifier::Read); //HACK @@ -327,6 +338,7 @@ eDVBCISlot::eDVBCISlot(eMainloop *context, int nr) eDVBCISlot::~eDVBCISlot() { + enableTS(0); } int eDVBCISlot::getSlotID() @@ -338,6 +350,8 @@ int eDVBCISlot::reset() { printf("edvbcislot: reset requested\n"); + enableTS(0); + ioctl(fd, 0); return 0; @@ -472,4 +486,22 @@ int eDVBCISlot::sendCAPMT(eDVBServicePMTHandler *pmthandler, const std::vector<u } +int eDVBCISlot::enableTS(int enable) +{ + printf("eDVBCISlot::enableTS(%d)\n", enable); + + FILE *f; + if((f = fopen("/proc/stb/tsmux/input0", "wb")) == NULL) { + printf("cannot open /proc/stb/audio/j1_mute\n"); + return; + } + + fprintf(f, "%s", enable?"CI":"A"); + + fclose(f); + + return 0; +} + + eAutoInitP0<eDVBCIInterfaces> init_eDVBCIInterfaces(eAutoInitNumbers::dvb, "CI Slots"); |
