+ else
+ {
+ int fd = open("/proc/stb/video/videomode", O_WRONLY);
+ if(fd < 0) {
+ eDebug("cannot open /proc/stb/video/videomode");
+ return;
+ }
+ switch(mode) {
+ case 0:
+ write(fd, pal, strlen(pal));
+ break;
+ case 1:
+ write(fd, ntsc, strlen(ntsc));
+ break;
+ default:
+ eDebug("unknown videomode %d", mode);
+ }
+ close(fd);
+ }
+
+ m_video_mode = mode;
+}
+
+void eAVSwitch::setWSS(int val) // 0 = auto, 1 = auto(4:3_off)
+{
+ int fd;
+ if((fd = open("/proc/stb/denc/0/wss", O_WRONLY)) < 0) {
+ eDebug("cannot open /proc/stb/denc/0/wss");
+ return;
+ }
+ const char *wss[] = {
+ "off", "auto", "auto(4:3_off)", "4:3_full_format", "16:9_full_format",
+ "14:9_letterbox_center", "14:9_letterbox_top", "16:9_letterbox_center",
+ "16:9_letterbox_top", ">16:9_letterbox_center", "14:9_full_format"
+ };
+ write(fd, wss[val], strlen(wss[val]));
+// eDebug("set wss to %s", wss[val]);
+ close(fd);
+}
+
+void eAVSwitch::setSlowblank(int val)
+{
+ int fd;
+ if((fd = open("/proc/stb/avs/0/sb", O_WRONLY)) < 0) {
+ eDebug("cannot open /proc/stb/avs/0/sb");
+ return;
+ }
+ const char *sb[] = {"0", "6", "12", "vcr", "auto"};
+ write(fd, sb[val], strlen(sb[val]));
+// eDebug("set slow blanking to %s", sb[val]);