diff options
Diffstat (limited to 'lib/driver/avswitch.cpp')
| -rw-r--r-- | lib/driver/avswitch.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/driver/avswitch.cpp b/lib/driver/avswitch.cpp index 80c7755b..5038ee53 100644 --- a/lib/driver/avswitch.cpp +++ b/lib/driver/avswitch.cpp @@ -26,6 +26,27 @@ 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); +} + void eAVSwitch::setColorFormat(int format) { /* |
