--- ../alsa-kernel/core/timer.c	2009-09-21 15:57:35.000000000 +0200
+++ timer.c	2009-12-15 22:17:50.000000000 +0100
@@ -1,3 +1,4 @@
+#include "adriver.h"
 /*
  *  Timers abstract layer
  *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
@@ -21,6 +22,7 @@
 
 #include <linux/delay.h>
 #include <linux/init.h>
+#include <linux/smp_lock.h>
 #include <linux/slab.h>
 #include <linux/time.h>
 #include <linux/mutex.h>
@@ -995,7 +997,7 @@
 static struct snd_timer_hardware snd_timer_system =
 {
 	.flags =	SNDRV_TIMER_HW_FIRST | SNDRV_TIMER_HW_TASKLET,
-	.resolution =	1000000000L / HZ,
+	// .resolution =	1000000000L / HZ,
 	.ticks =	10000000L,
 	.start =	snd_timer_s_start,
 	.stop =		snd_timer_s_stop
@@ -1909,21 +1911,40 @@
 	return mask;
 }
 
-#ifdef CONFIG_COMPAT
+#if defined(CONFIG_COMPAT) && defined(CONFIG_SND_HAVE_NEW_IOCTL)
 #include "timer_compat.c"
 #else
 #define snd_timer_user_ioctl_compat	NULL
 #endif
 
+#ifndef CONFIG_SND_HAVE_NEW_IOCTL
+/* need to unlock BKL to allow preemption */
+static int snd_timer_user_ioctl_old(struct inode *inode, struct file * file,
+				    unsigned int cmd, unsigned long arg)
+{
+	int err;
+	unlock_kernel();
+	err = snd_timer_user_ioctl(file, cmd, arg);
+	lock_kernel();
+	return err;
+}
+#endif
+
 static const struct file_operations snd_timer_f_ops =
 {
+#ifndef LINUX_2_2
 	.owner =	THIS_MODULE,
+#endif
 	.read =		snd_timer_user_read,
 	.open =		snd_timer_user_open,
 	.release =	snd_timer_user_release,
 	.poll =		snd_timer_user_poll,
+#ifdef CONFIG_SND_HAVE_NEW_IOCTL
 	.unlocked_ioctl =	snd_timer_user_ioctl,
 	.compat_ioctl =	snd_timer_user_ioctl_compat,
+#else
+	.ioctl =	snd_timer_user_ioctl_old,
+#endif
 	.fasync = 	snd_timer_user_fasync,
 };
 
@@ -1935,6 +1956,7 @@
 {
 	int err;
 
+	snd_timer_system.resolution = 1000000000L / HZ;
 #ifdef SNDRV_OSS_INFO_DEV_TIMERS
 	snd_oss_info_register(SNDRV_OSS_INFO_DEV_TIMERS, SNDRV_CARDS - 1,
 			      "system timer");
