X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/6ab0c6597ccd51505adfe339f0a1f5635c0c33cd..b99b683520ad715cc5734e384eaf1cdee6c2e722:/lib/driver/avswitch.cpp diff --git a/lib/driver/avswitch.cpp b/lib/driver/avswitch.cpp index 80c7755b..482a0f06 100644 --- a/lib/driver/avswitch.cpp +++ b/lib/driver/avswitch.cpp @@ -26,6 +26,45 @@ eAVSwitch *eAVSwitch::getInstance() return instance; } +void eAVSwitch::setInput(int val) +{ + /* + 0-encoder + 1-scart + 2-aux + */ + + char *input[] = {"encoder", "scart", "aux"}; + + int fd; + + if((fd = open("/proc/stb/avs/0/input", O_WRONLY)) < 0) { + printf("cannot open /proc/stb/avs/0/input\n"); + return; + } + + write(fd, input[val], strlen(input[val])); + close(fd); + + if (val == 1) + setFastBlank(0); +} + +void eAVSwitch::setFastBlank(int val) +{ + int fd; + char *fb[] = {"low", "high", "vcr"}; + + + if((fd = open("/proc/stb/avs/0/fb", O_WRONLY)) < 0) { + printf("cannot open /proc/stb/avs/0/fb\n"); + return; + } + + write(fd, fb[val], strlen(fb[0])); + close(fd); +} + void eAVSwitch::setColorFormat(int format) { /*