--- ../../alsa-kernel/core/seq/seq_memory.c	2006-01-10 16:08:55.000000000 +0100
+++ seq_memory.c	2006-01-10 16:08:53.000000000 +0100
@@ -1,3 +1,4 @@
+#define __NO_VERSION__
 /*
  *  ALSA sequencer Memory Manager
  *  Copyright (c) 1998 by Frank van de Pol <fvdpol@coil.demon.nl>
@@ -32,6 +33,10 @@
 #include "seq_info.h"
 #include "seq_lock.h"
 
+/* semaphore in struct file record */
+#define semaphore_of(fp)	((fp)->f_dentry->d_inode->i_sem)
+
+
 static inline int snd_seq_pool_available(struct snd_seq_pool *pool)
 {
 	return pool->total_elements - atomic_read(&pool->counter);
@@ -240,7 +245,18 @@
 		set_current_state(TASK_INTERRUPTIBLE);
 		add_wait_queue(&pool->output_sleep, &wait);
 		spin_unlock_irq(&pool->lock);
+#ifdef LINUX_2_2
+		/* change semaphore to allow other clients
+		   to access device file */
+		if (file)
+			up(&semaphore_of(file));
+#endif
 		schedule();
+#ifdef LINUX_2_2
+		/* restore semaphore again */
+		if (file)
+			down(&semaphore_of(file));
+#endif
 		spin_lock_irq(&pool->lock);
 		remove_wait_queue(&pool->output_sleep, &wait);
 		/* interrupted? */
