X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FNimManager.py;h=bd1a3638c47ba484f6c9d511f48710ac8616f7b7;hp=d8a7c5c2f09e2491227913d7572057a0f60ee797;hb=3c919c91a7778a049bad0317f6f7df86ff509415;hpb=cdfd7a570b5b0813c8f62fc76deed949d7a11803 diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index d8a7c5c..bd1a363 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -390,6 +390,7 @@ class SecConfigure: if currLnb.diseqcMode.value == "1_0": currCO = currLnb.commandOrder1_0.value + sec.setRepeats(0) else: currCO = currLnb.commandOrder.value @@ -1360,25 +1361,32 @@ def InitNimManager(nimmgr): slot_id = configElement.slot_id if nimmgr.nim_slots[slot_id].description == 'Alps BSBE2': open("/proc/stb/frontend/%d/tone_amplitude" %(fe_id), "w").write(configElement.value) - + def tunerTypeChanged(nimmgr, configElement): fe_id = configElement.fe_id - print "tunerTypeChanged feid %d to mode %s" % (fe_id, configElement.value) - try: - oldvalue = open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "r").readline() - open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "w").write("0") - except: - print "[info] no /sys/module/dvb_core/parameters/dvb_shutdown_timeout available" - frontend = eDVBResourceManager.getInstance().allocateRawChannel(fe_id).getFrontend() - frontend.closeFrontend() - open("/proc/stb/frontend/%d/mode" % (fe_id), "w").write(configElement.value) - frontend.reopenFrontend() - try: - open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "w").write(oldvalue) - except: - print "[info] no /sys/module/dvb_core/parameters/dvb_shutdown_timeout available" - nimmgr.enumerateNIMs() - + + cur_type = int(open("/proc/stb/frontend/%d/mode" % (fe_id), "r").read()) + if cur_type != int(configElement.value): + print "tunerTypeChanged feid %d from %d to mode %d" % (fe_id, cur_type, int(configElement.value)) + + try: + oldvalue = open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "r").readline() + open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "w").write("0") + except: + print "[info] no /sys/module/dvb_core/parameters/dvb_shutdown_timeout available" + + frontend = eDVBResourceManager.getInstance().allocateRawChannel(fe_id).getFrontend() + frontend.closeFrontend() + open("/proc/stb/frontend/%d/mode" % (fe_id), "w").write(configElement.value) + frontend.reopenFrontend() + try: + open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "w").write(oldvalue) + except: + print "[info] no /sys/module/dvb_core/parameters/dvb_shutdown_timeout available" + nimmgr.enumerateNIMs() + else: + print "tuner type is already already %d" %cur_type + empty_slots = 0 for slot in nimmgr.nim_slots: x = slot.slot