X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FAVSwitch.py;h=65c979d8284f9f5914d6320120405df7456e8e7b;hp=044ea43c75cf01575d8f82af97e8c9e6f32e5cb2;hb=8d6a064f7a6f3b38ddf2940290b0ebdc6b4d5356;hpb=6f461023bf90fd89dd96a8463b5cdeb2f3fd0feb diff --git a/lib/python/Components/AVSwitch.py b/lib/python/Components/AVSwitch.py index 044ea43..65c979d 100644 --- a/lib/python/Components/AVSwitch.py +++ b/lib/python/Components/AVSwitch.py @@ -151,3 +151,14 @@ def InitAVSwitch(): iAVSwitch.setInput("ENCODER") # init on startup SystemInfo["ScartSwitch"] = eAVSwitch.getInstance().haveScartSwitch() + try: + can_downmix = open("/proc/stb/audio/ac3_choices", "r").read()[:-1].find("downmix") != -1 + except: + can_downmix = False + + SystemInfo["CanDownmixAC3"] = can_downmix + if can_downmix: + def setAC3Downmix(configElement): + open("/proc/stb/audio/ac3", "w").write(configElement.value and "downmix" or "passthrough") + config.av.downmix_ac3 = ConfigYesNo(default = False) + config.av.downmix_ac3.addNotifier(setAC3Downmix)