aboutsummaryrefslogtreecommitdiff
path: root/lib/driver/avswitch.cpp
diff options
context:
space:
mode:
authorRonny Strutz <ronny.strutz@multimedia-labs.de>2005-09-02 21:40:11 +0000
committerRonny Strutz <ronny.strutz@multimedia-labs.de>2005-09-02 21:40:11 +0000
commit9458c6fcf07885c97e8b627b035c848267ee2d0c (patch)
treeb0f516f28bdc77c46d4c43f25af4da30f94e3940 /lib/driver/avswitch.cpp
parentce7f5539437fff074b1c3388d575660f24011f66 (diff)
downloadenigma2-9458c6fcf07885c97e8b627b035c848267ee2d0c.tar.gz
enigma2-9458c6fcf07885c97e8b627b035c848267ee2d0c.zip
avswitch
Diffstat (limited to 'lib/driver/avswitch.cpp')
-rw-r--r--lib/driver/avswitch.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/driver/avswitch.cpp b/lib/driver/avswitch.cpp
new file mode 100644
index 00000000..31db25a4
--- /dev/null
+++ b/lib/driver/avswitch.cpp
@@ -0,0 +1,41 @@
+#include <lib/driver/avswitch.h>
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#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;
+
+eAVSwitch::eAVSwitch()
+{
+ ASSERT(!instance);
+ instance = this;
+
+ avsfd = open("/dev/dbox/avs0", O_RDWR);
+}
+
+eAVSwitch::~eAVSwitch()
+{
+ if(avsfd > 0)
+ close(avsfd);
+}
+
+eAVSwitch *eAVSwitch::getInstance()
+{
+ return instance;
+}
+
+void eAVSwitch::setColorFormat(int format)
+{
+ printf("eAVSwitch::setColorFormat(%d)\n",format);
+ /*there are no ioctl for controling this in avs - scart api needed
+ no, not the gillem one */
+}
+
+//FIXME: correct "run/startlevel"
+eAutoInitP0<eAVSwitch> init_avswitch(eAutoInitNumbers::rc, "AVSwitch Driver");