aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2008-03-25 23:30:11 +0000
committerFelix Domke <tmbinc@elitedvb.net>2008-03-25 23:30:11 +0000
commit5d6e862f8d4aa80b0907f520237ac28aa1247829 (patch)
treedccd634d3b39504fc470f1cdbf8d31461190c523 /lib/python/Plugins
parenta1627486eb6eb3726ffbfbe3cbe12810813224bc (diff)
downloadenigma2-5d6e862f8d4aa80b0907f520237ac28aa1247829.tar.gz
enigma2-5d6e862f8d4aa80b0907f520237ac28aa1247829.zip
fix wss, slowblank, standby without scartswitch (requires new drivers)
Diffstat (limited to 'lib/python/Plugins')
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py44
1 files changed, 42 insertions, 2 deletions
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
index ade2035d..893fa5f6 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
@@ -58,6 +58,7 @@ class VideoHardware:
def __init__(self):
self.last_modes_preferred = [ ]
self.on_hotplug = CList()
+ self.standby = False
self.readAvailableModes()
@@ -66,7 +67,16 @@ class VideoHardware:
self.readPreferredModes()
+ # take over old AVSwitch component :)
+ from Components.AVSwitch import AVSwitch
+# config.av.colorformat.notifiers = [ ]
+ config.av.aspectratio.notifiers = [ ]
+ config.av.tvsystem.notifiers = [ ]
+ config.av.wss.notifiers = [ ]
+ AVSwitch.setInput = self.AVSwitchSetInput
+
config.av.aspect.addNotifier(self.updateAspect)
+ config.av.wss.addNotifier(self.updateAspect)
config.av.policy_169.addNotifier(self.updateAspect)
config.av.policy_43.addNotifier(self.updateAspect)
@@ -75,6 +85,11 @@ class VideoHardware:
# self.timer.callback.append(self.readPreferredModes)
# self.timer.start(1000)
+
+ def AVSwitchSetInput(self, mode):
+ self.standby = mode == "SCART"
+ self.updateStandby()
+
def readAvailableModes(self):
try:
modes = open("/proc/stb/video/videomode_choices").read()[:-1]
@@ -205,7 +220,6 @@ class VideoHardware:
rate = config.av.videorate[mode].value
self.setMode(port, mode, rate)
-
def updateAspect(self, cfgelement):
# determine aspect = {any,4:3,16:9,16:10}
@@ -252,9 +266,35 @@ class VideoHardware:
aspect = "4:3"
policy = {"letterbox": "letterbox", "panscan": "panscan", "scale": "bestfit"}[config.av.policy_169.value]
- print "-> setting aspect, policy", aspect, policy
+ if not config.av.wss.value:
+ wss = "auto(4:3_off)"
+ else:
+ wss = "auto"
+
+ print "-> setting aspect, policy, wss", aspect, policy, wss
open("/proc/stb/video/aspect", "w").write(aspect)
open("/proc/stb/video/policy", "w").write(policy)
+ open("/proc/stb/denc/0/wss", "w").write(wss)
+ self.updateSlowblank()
+
+ def updateSlowblank(self):
+ if self.standby:
+ from Components.SystemInfo import SystemInfo
+ if SystemInfo["ScartSwitch"]:
+ mode = "scart"
+ sb = "vcr"
+ else:
+ mode = "off"
+ sb = "0"
+ else:
+ mode = "encoder"
+ sb = "auto"
+
+ open("/proc/stb/avs/0/sb", "w").write(sb)
+ open("/proc/stb/avs/0/input", "w").write(mode)
+
+ def updateStandby(self):
+ self.updateSlowblank()
config.av.edid_override = ConfigYesNo(default = False)
video_hw = VideoHardware()