#include <lib/base/init.h>
#include <lib/base/init_num.h>
-#include <lib/base/econfig.h>
#include <lib/base/eerror.h>
eAVSwitch *eAVSwitch::instance = 0;
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"};
return;
}
- write(fd, input[val], strlen(fb[0]));
+ write(fd, fb[val], strlen(fb[0]));
close(fd);
}
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) {
case 2:
write(fd, svideo, strlen(svideo));
break;
+ case 3:
+ write(fd, yuv, strlen(yuv));
+ break;
}
close(fd);
}
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<eAVSwitch> init_avswitch(eAutoInitNumbers::rc, "AVSwitch Driver");