1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
--- ../alsa-kernel/core/timer.c 2005-01-20 17:01:36.315804918 +0100
+++ timer.c 2005-01-20 17:01:52.043871398 +0100
@@ -995,7 +995,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
@@ -1791,21 +1791,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 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,
};
@@ -1826,6 +1845,7 @@
int err;
struct snd_info_entry *entry;
+ 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");
#endif
|