diff -u --recursive --new-file --exclude=zImage --exclude=time.h --exclude=compile.h --exclude=config.ini --exclude='.*' --exclude=System.map --exclude='*.[oa]' --exclude=buildit --exclude=defconfig v461/arch/arm/special/Makefile seeburg/arch/arm/special/Makefile
--- v461/arch/arm/special/Makefile	Wed May  5 17:07:51 2004
+++ seeburg/arch/arm/special/Makefile	Tue Aug  7 16:57:59 2007
@@ -78,7 +78,7 @@
 endif
 
 ifdef CONFIG_EMPEG_INPUT
-  L_OBJS += empeg_input.o empeg_input_fiq.o
+  L_OBJS += empeg_input.o empeg_input_fiq.o seeburg.o
 endif
 
 ifdef CONFIG_EMPEG_STATE
diff -u --recursive --new-file --exclude=zImage --exclude=time.h --exclude=compile.h --exclude=config.ini --exclude='.*' --exclude=System.map --exclude='*.[oa]' --exclude=buildit --exclude=defconfig v461/arch/arm/special/notify.c seeburg/arch/arm/special/notify.c
--- v461/arch/arm/special/notify.c	Tue Aug  7 14:49:54 2007
+++ seeburg/arch/arm/special/notify.c	Tue Aug  7 16:47:31 2007
@@ -38,6 +38,7 @@
 	= {"FidTime", "Artist", "FID", "Genre", "MixerInput", "Track", "Sound", "Title", "Volume", "L", "Other"};
 unsigned char  notify_chars[NOTIFY_MAX_LINES] = "#AFGMNSTVLO";
 #define NOTIFY_FIDLINE		2		// index of 'F' in notify_chars[]
+#define NOTIFY_SOUNDLINE	6		// index of 'S' in notify_chars[]
 #define NOTIFY_MAX_LENGTH	64
 static char notify_data[NOTIFY_MAX_LINES][NOTIFY_MAX_LENGTH] = {{0,},};
 
@@ -47,6 +48,13 @@
 	return &notify_data[NOTIFY_FIDLINE][2];
 }
 
+
+const char *
+notify_sound (void)
+{
+	return &notify_data[NOTIFY_SOUNDLINE][0];
+}
+
 #undef DEBUG_NOTIFY
 #ifdef DEBUG_NOTIFY
 static char logbuf[2048 + 128];
diff -u --recursive --new-file --exclude=zImage --exclude=time.h --exclude=compile.h --exclude=config.ini --exclude='.*' --exclude=System.map --exclude='*.[oa]' --exclude=buildit --exclude=defconfig v461/arch/arm/special/seeburg.c seeburg/arch/arm/special/seeburg.c
--- v461/arch/arm/special/seeburg.c	Wed Dec 31 16:00:00 1969
+++ seeburg/arch/arm/special/seeburg.c	Tue Aug  7 16:47:48 2007
@@ -0,0 +1,116 @@
+/* Seeburg wallbox driver */
+/* Copyright (c) 2007, Scott Swazey.  All rights reserved */
+/* Version 1.0 Aug 06, 2007  Initial version		*/
+
+#include <linux/kernel.h>
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <asm/uaccess.h>
+#include <asm/semaphore.h>
+
+extern const char *notify_sound (void);	// from notify.c
+extern void hijack_serial_rx_insert (const char *buf, int size, int port); // drivers/char/serial_sa1100.c
+
+#define SEEBURG_DEV 51
+#define MAX_SAMPLES 256		//hack -- must match size in <asm/arch/time.h>
+
+unsigned long pulse_samples[MAX_SAMPLES];
+long volatile samples_collected = 0;
+long volatile sampler_state = 0;
+struct semaphore seeburg_sem = MUTEX_LOCKED;
+
+int __init seeburg_init (void);
+void seeburg_cleanup (void);
+
+static int seeburg_open (struct inode *inode, struct file *filep);
+static ssize_t seeburg_read (struct file *filep, char *buff, size_t count, loff_t * offp);
+static ssize_t seeburg_write (struct file *filep, const char *buff, size_t count, loff_t * offp);
+static int seeburg_release (struct inode *inode, struct file *filep);
+
+struct file_operations seeburg_fops = {
+  open:seeburg_open,
+  read:seeburg_read,
+  write:seeburg_write,
+  release:seeburg_release,
+};
+
+
+int __init seeburg_init (void)
+{
+  printk ("Seeburg Wallbox driver Version 1.0 by Scott Swazey\n");
+  if (register_chrdev (SEEBURG_DEV, "wallbox", &seeburg_fops))
+    {
+      printk ("Failed to register Seeburg wallbox device\n");
+    }
+  return 0;
+}
+
+void seeburg_cleanup (void)
+{
+  sampler_state = 0;
+  seeburg_sem = MUTEX_LOCKED;
+  sampler_state = 0;
+  unregister_chrdev (SEEBURG_DEV, "wallbox");
+  return;
+}
+
+int seeburg_open (struct inode *inode, struct file *filep)
+{
+  if (sampler_state != 2)
+    {
+      seeburg_sem = MUTEX_LOCKED;
+      sampler_state = 1;
+    }
+  return 0;
+}
+
+ssize_t seeburg_read (struct file * filep, char *buff, size_t count, loff_t * offp)
+{
+  down_interruptible (&seeburg_sem);	// wait for data
+  if (sampler_state == 3)
+    {
+      if (copy_to_user (buff, pulse_samples, sizeof (pulse_samples)) != 0)
+	{
+	  printk ("/dev/wallbox userspace copy failed.\n");
+	  return 0;
+	}
+      sampler_state = 4;
+      return sizeof (pulse_samples);
+    }
+  return 0;
+}
+
+ssize_t seeburg_write (struct file * filep, const char *buff, size_t count, loff_t * offp)
+{
+  int len;
+  char cmd_buf[20];
+  unsigned long fid;
+  const char *p_sound;
+
+  if (count != 4)
+    return 0;	// wrong size, one fid only
+
+  fid = *((unsigned long *) buff);	//get fid
+
+  p_sound = notify_sound();	//get status of player
+
+  if (p_sound[0] != '1')
+    // player is paused, start new playlist
+    len = sprintf (cmd_buf, "#%lx\n \n", fid);
+  else
+    // player is not paused, add to existing playlist
+    len = sprintf (cmd_buf, "#%lx+\n \n", fid);
+
+  hijack_serial_rx_insert (cmd_buf, len, 1);	// send command to player
+
+  return 4;
+}
+
+static int seeburg_release (struct inode *inode, struct file *filep)
+{
+  sampler_state = 0;
+  seeburg_sem = MUTEX_LOCKED;
+  sampler_state = 0;
+
+  return 0;
+}
diff -u --recursive --new-file --exclude=zImage --exclude=time.h --exclude=compile.h --exclude=config.ini --exclude='.*' --exclude=System.map --exclude='*.[oa]' --exclude=buildit --exclude=defconfig v461/drivers/char/mem.c seeburg/drivers/char/mem.c
--- v461/drivers/char/mem.c	Thu Oct 18 15:08:36 2001
+++ seeburg/drivers/char/mem.c	Tue Aug  7 16:48:51 2007
@@ -698,6 +698,8 @@
 		extern void empeg_proc_init(void);
 		extern void empeg_cs4231_init(void);
 		extern int empeg_power_init(void);
+		extern int seeburg_init(void);
+		seeburg_init();
 #ifdef CONFIG_EMPEG_RAMTEST
 		extern int empeg_ramtest_init(void);
 #endif
diff -u --recursive --new-file --exclude=zImage --exclude=time.h --exclude=compile.h --exclude=config.ini --exclude='.*' --exclude=System.map --exclude='*.[oa]' --exclude=buildit --exclude=defconfig v461/drivers/char/serial_sa1100.c seeburg/drivers/char/serial_sa1100.c
--- v461/drivers/char/serial_sa1100.c	Tue Aug  7 14:49:54 2007
+++ seeburg/drivers/char/serial_sa1100.c	Tue Aug  7 16:49:00 2007
@@ -44,6 +44,8 @@
  *
  *  6.6.99: handling Break conditions to break endless loops in rs_interrupt_single
  *          Keith  keith@keith-koep.com
+ *  Aug 8, 2007: hack to force on DTR for line==1 
+ *           Scott scott451@gmail.com
  */
 
 /*
@@ -993,6 +995,7 @@
 
 	info->flags |= ASYNC_INITIALIZED;
 	restore_flags(flags);
+
 	return 0;
 	
 errout:
@@ -2343,6 +2346,11 @@
 	printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
 	       info->state->count);
 #endif
+	//hack -- force on DTR because driver doesn't
+	if(line==1)
+	   GPDR &= ~EMPEG_SERIALDTR;
+	//hack-end
+
 	info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
 
 	if (!tmp_buf) {
