aboutsummaryrefslogtreecommitdiff
path: root/lib/driver/avswitch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/driver/avswitch.cpp')
-rw-r--r--lib/driver/avswitch.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/driver/avswitch.cpp b/lib/driver/avswitch.cpp
index d582db81..a936aa54 100644
--- a/lib/driver/avswitch.cpp
+++ b/lib/driver/avswitch.cpp
@@ -1,6 +1,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
+#include <string.h>
#include <lib/base/init.h>
#include <lib/base/init_num.h>
@@ -81,6 +82,19 @@ eAVSwitch *eAVSwitch::getInstance()
return instance;
}
+bool eAVSwitch::haveScartSwitch()
+{
+ char tmp[255];
+ int fd = open("/proc/stb/avs/0/input_choices", O_RDONLY);
+ if(fd < 0) {
+ eDebug("cannot open /proc/stb/avs/0/input_choices");
+ return false;
+ }
+ read(fd, tmp, 255);
+ close(fd);
+ return !!strstr(tmp, "scart");
+}
+
void eAVSwitch::setInput(int val)
{
/*