aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/timer.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /sound/core/timer.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'sound/core/timer.c')
-rw-r--r--sound/core/timer.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 13afb60999b9..7c1cbf0a0dc4 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -34,8 +34,8 @@
34#include <sound/initval.h> 34#include <sound/initval.h>
35#include <linux/kmod.h> 35#include <linux/kmod.h>
36 36
37#if defined(CONFIG_SND_HPET) || defined(CONFIG_SND_HPET_MODULE) 37#if defined(CONFIG_SND_HRTIMER) || defined(CONFIG_SND_HRTIMER_MODULE)
38#define DEFAULT_TIMER_LIMIT 3 38#define DEFAULT_TIMER_LIMIT 4
39#elif defined(CONFIG_SND_RTCTIMER) || defined(CONFIG_SND_RTCTIMER_MODULE) 39#elif defined(CONFIG_SND_RTCTIMER) || defined(CONFIG_SND_RTCTIMER_MODULE)
40#define DEFAULT_TIMER_LIMIT 2 40#define DEFAULT_TIMER_LIMIT 2
41#else 41#else
@@ -52,6 +52,9 @@ MODULE_PARM_DESC(timer_limit, "Maximum global timers in system.");
52module_param(timer_tstamp_monotonic, int, 0444); 52module_param(timer_tstamp_monotonic, int, 0444);
53MODULE_PARM_DESC(timer_tstamp_monotonic, "Use posix monotonic clock source for timestamps (default)."); 53MODULE_PARM_DESC(timer_tstamp_monotonic, "Use posix monotonic clock source for timestamps (default).");
54 54
55MODULE_ALIAS_CHARDEV(CONFIG_SND_MAJOR, SNDRV_MINOR_TIMER);
56MODULE_ALIAS("devname:snd/timer");
57
55struct snd_timer_user { 58struct snd_timer_user {
56 struct snd_timer_instance *timeri; 59 struct snd_timer_instance *timeri;
57 int tread; /* enhanced read with timestamps and events */ 60 int tread; /* enhanced read with timestamps and events */
@@ -183,9 +186,8 @@ static void snd_timer_check_slave(struct snd_timer_instance *slave)
183 list_for_each_entry(master, &timer->open_list_head, open_list) { 186 list_for_each_entry(master, &timer->open_list_head, open_list) {
184 if (slave->slave_class == master->slave_class && 187 if (slave->slave_class == master->slave_class &&
185 slave->slave_id == master->slave_id) { 188 slave->slave_id == master->slave_id) {
186 list_del(&slave->open_list); 189 list_move_tail(&slave->open_list,
187 list_add_tail(&slave->open_list, 190 &master->slave_list_head);
188 &master->slave_list_head);
189 spin_lock_irq(&slave_active_lock); 191 spin_lock_irq(&slave_active_lock);
190 slave->master = master; 192 slave->master = master;
191 slave->timer = master->timer; 193 slave->timer = master->timer;
@@ -411,8 +413,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event)
411static int snd_timer_start1(struct snd_timer *timer, struct snd_timer_instance *timeri, 413static int snd_timer_start1(struct snd_timer *timer, struct snd_timer_instance *timeri,
412 unsigned long sticks) 414 unsigned long sticks)
413{ 415{
414 list_del(&timeri->active_list); 416 list_move_tail(&timeri->active_list, &timer->active_list_head);
415 list_add_tail(&timeri->active_list, &timer->active_list_head);
416 if (timer->running) { 417 if (timer->running) {
417 if (timer->hw.flags & SNDRV_TIMER_HW_SLAVE) 418 if (timer->hw.flags & SNDRV_TIMER_HW_SLAVE)
418 goto __start_now; 419 goto __start_now;