+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);
+}
+