X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fdriver%2Favswitch.cpp;h=12a8f7d9b9848139025b8cdce8eef52be4356f2c;hb=f70fe619f352c00df9ab2bfa345164e0ca196b6b;hp=40db19ae03bc52b3eb4a6b04145c6dacd5eef748;hpb=c31bef10af2174fc72b9e5658edc81681da4e47e;p=vuplus_dvbapp diff --git a/lib/driver/avswitch.cpp b/lib/driver/avswitch.cpp index 40db19a..12a8f7d 100644 --- a/lib/driver/avswitch.cpp +++ b/lib/driver/avswitch.cpp @@ -6,7 +6,6 @@ #include #include -#include #include eAVSwitch *eAVSwitch::instance = 0; @@ -46,6 +45,13 @@ void eAVSwitch::setInput(int val) write(fd, input[val], strlen(input[val])); close(fd); + if (val == 1) + setFastBlank(2); +} + +void eAVSwitch::setFastBlank(int val) +{ + int fd; char *fb[] = {"low", "high", "vcr"}; @@ -54,7 +60,7 @@ void eAVSwitch::setInput(int val) return; } - write(fd, input[val], strlen(fb[0])); + write(fd, fb[val], strlen(fb[0])); close(fd); } @@ -68,6 +74,7 @@ void eAVSwitch::setColorFormat(int format) char *cvbs="cvbs"; char *rgb="rgb"; char *svideo="svideo"; + char *yuv="yuv"; int fd; if((fd = open("/proc/stb/avs/0/colorformat", O_WRONLY)) < 0) { @@ -84,6 +91,9 @@ void eAVSwitch::setColorFormat(int format) case 2: write(fd, svideo, strlen(svideo)); break; + case 3: + write(fd, yuv, strlen(yuv)); + break; } close(fd); } @@ -140,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");