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<eAVSwitch> init_avswitch(eAutoInitNumbers::rc, "AVSwitch Driver");
void setAspectRatio(int ratio);
void setVideomode(int mode);
void setInput(int val);
-
+ void setSlowblank(int val); // 1: on, 0: off
};
#endif
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
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)