diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-03-13 19:15:07 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-03-13 19:15:07 +0000 |
| commit | 8d6a064f7a6f3b38ddf2940290b0ebdc6b4d5356 (patch) | |
| tree | 86ef2e0873ae472991712545f2a6b63d594c17b5 /lib/python | |
| parent | 6f461023bf90fd89dd96a8463b5cdeb2f3fd0feb (diff) | |
| download | enigma2-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')
| -rw-r--r-- | lib/python/Components/AVSwitch.py | 11 | ||||
| -rw-r--r-- | lib/python/Plugins/SystemPlugins/Videomode/plugin.py | 6 |
2 files changed, 16 insertions, 1 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) diff --git a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py index aac25d6b..031d2c12 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py @@ -1,6 +1,6 @@ from Screens.Screen import Screen from Plugins.Plugin import PluginDescriptor - +from Components.SystemInfo import SystemInfo from Components.ConfigList import ConfigListScreen from Components.config import getConfigListEntry, config from Components.config import config @@ -83,9 +83,13 @@ class VideoSetup(Screen, ConfigListScreen): self.list.append(getConfigListEntry(_("Color Format"), config.av.colorformat)) if level >= 1: self.list.append(getConfigListEntry(_("WSS on 4:3"), config.av.wss)) + if SystemInfo["ScartSwitch"]: + self.list.append(getConfigListEntry(_("Auto scart switching"), config.av.vcrswitch)) if level >= 1: self.list.append(getConfigListEntry(_("AC3 default"), config.av.defaultac3)) + if SystemInfo["CanDownmixAC3"]: + self.list.append(getConfigListEntry(_("AC3 downmix"), config.av.downmix_ac3)) self["config"].list = self.list self["config"].l.setList(self.list) |
