--- /dev/null
+#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");
--- /dev/null
+#ifndef __avswitch_h
+#define __avswitch_h
+
+class eAVSwitch
+{
+ static eAVSwitch *instance;
+
+ int avsfd;
+protected:
+public:
+ eAVSwitch();
+ ~eAVSwitch();
+
+ static eAVSwitch *getInstance();
+
+ void setColorFormat(int format);
+};
+
+#endif