aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/AVSwitch.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-03-13 19:15:07 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-03-13 19:15:07 +0000
commit8d6a064f7a6f3b38ddf2940290b0ebdc6b4d5356 (patch)
tree86ef2e0873ae472991712545f2a6b63d594c17b5 /lib/python/Components/AVSwitch.py
parent6f461023bf90fd89dd96a8463b5cdeb2f3fd0feb (diff)
downloadenigma2-8d6a064f7a6f3b38ddf2940290b0ebdc6b4d5356.tar.gz
enigma2-8d6a064f7a6f3b38ddf2940290b0ebdc6b4d5356.zip
add config option to enable/disable ac3 downmix (when its possible with used
hardware)
Diffstat (limited to 'lib/python/Components/AVSwitch.py')
-rw-r--r--lib/python/Components/AVSwitch.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/python/Components/AVSwitch.py b/lib/python/Components/AVSwitch.py
index 044ea43c..65c979d8 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)