From f70fe619f352c00df9ab2bfa345164e0ca196b6b Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Wed, 8 Feb 2006 01:09:01 +0000 Subject: [PATCH] fix slowblank --- lib/driver/avswitch.cpp | 12 ++++++++++++ lib/driver/avswitch.h | 2 +- lib/python/Components/AVSwitch.py | 5 +++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/driver/avswitch.cpp b/lib/driver/avswitch.cpp index 2556ab0d..12a8f7d9 100644 --- a/lib/driver/avswitch.cpp +++ b/lib/driver/avswitch.cpp @@ -150,5 +150,17 @@ void eAVSwitch::setVideomode(int mode) close(fd); } +void eAVSwitch::setSlowblank(int val) +{ + int fd; + if((fd = open("/proc/stb/avs/0/sb", O_WRONLY)) < 0) { + printf("cannot open /proc/stb/avs/0/sb\n"); + return; + } + const char *s = val ? "auto" : "vcr"; + write(fd, s, strlen(s)); + close(fd); +} + //FIXME: correct "run/startlevel" eAutoInitP0 init_avswitch(eAutoInitNumbers::rc, "AVSwitch Driver"); diff --git a/lib/driver/avswitch.h b/lib/driver/avswitch.h index d765e02a..ea451314 100644 --- a/lib/driver/avswitch.h +++ b/lib/driver/avswitch.h @@ -21,7 +21,7 @@ public: void setAspectRatio(int ratio); void setVideomode(int mode); void setInput(int val); - + void setSlowblank(int val); // 1: on, 0: off }; #endif diff --git a/lib/python/Components/AVSwitch.py b/lib/python/Components/AVSwitch.py index b36dc4a2..d98f411f 100644 --- a/lib/python/Components/AVSwitch.py +++ b/lib/python/Components/AVSwitch.py @@ -3,7 +3,7 @@ import os from enigma import * class AVSwitch: - INPUT = { "ENCODER": 0, "SCART": 1, "AUX": 2 } + INPUT = { "ENCODER": (0, 1), "SCART": (1, 0), "AUX": (2, 1) } def __init__(self): pass @@ -38,7 +38,8 @@ class AVSwitch: self.checkWSS() def setInput(self, input): - eAVSwitch.getInstance().setInput(self.INPUT[input]) + eAVSwitch.getInstance().setInput(self.INPUT[input][0]) + eAVSwitch.getInstance().setSlowblank(self.INPUT[input][1]) # FIXME why do we have to reset the colorformat? bug in avs-driver? eAVSwitch.getInstance().setColorFormat(config.av.colorformat.value) -- 2.30.2