diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2011-05-03 11:41:36 +0200 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2011-05-03 11:41:36 +0200 |
| commit | d6dd733f6a7ade7f07b0721e576d66e56cf8b563 (patch) | |
| tree | 25c037d8eb29416ccdf5c2300edff72cd7cbd34f /lib/python | |
| parent | 316f6a4f78d654e7822431cca75659709c6c3fee (diff) | |
| parent | e34d976be38fb06fb8819379198e89fb591d987f (diff) | |
| download | enigma2-d6dd733f6a7ade7f07b0721e576d66e56cf8b563.tar.gz enigma2-d6dd733f6a7ade7f07b0721e576d66e56cf8b563.zip | |
Merge remote-tracking branch 'remotes/origin/bug_739_fix_CT_tuner_timer_bug'
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/NimManager.py | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 7f7dd5c4..bd1a3638 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -1361,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 |
