Lines Matching full:timer
19 #include <sound/timer.h>
39 MODULE_DESCRIPTION("ALSA timer interface");
47 MODULE_ALIAS("devname:snd/timer");
116 /* Internal data structure for keeping the state of the userspace-driven timer */
119 struct snd_timer *timer; member
140 static int snd_timer_free(struct snd_timer *timer);
145 static void snd_timer_reschedule(struct snd_timer * timer, unsigned long ticks_left);
148 * create a timer instance with the given owner string.
184 * find a timer instance from the given timer id
188 struct snd_timer *timer; in snd_timer_find() local
190 list_for_each_entry(timer, &snd_timer_list, device_list) { in snd_timer_find()
191 if (timer->tmr_class != tid->dev_class) in snd_timer_find()
193 if ((timer->tmr_class == SNDRV_TIMER_CLASS_CARD || in snd_timer_find()
194 timer->tmr_class == SNDRV_TIMER_CLASS_PCM) && in snd_timer_find()
195 (timer->card == NULL || in snd_timer_find()
196 timer->card->number != tid->card)) in snd_timer_find()
198 if (timer->tmr_device != tid->device) in snd_timer_find()
200 if (timer->tmr_subdevice != tid->subdevice) in snd_timer_find()
202 return timer; in snd_timer_find()
214 request_module("snd-timer-%i", tid->device); in snd_timer_request()
235 if (master->timer->num_instances >= master->timer->max_instances) in check_matching_master_slave()
238 master->timer->num_instances++; in check_matching_master_slave()
240 guard(spinlock)(&master->timer->lock); in check_matching_master_slave()
242 slave->timer = master->timer; in check_matching_master_slave()
256 struct snd_timer *timer; in snd_timer_check_slave() local
261 list_for_each_entry(timer, &snd_timer_list, device_list) { in snd_timer_check_slave()
262 list_for_each_entry(master, &timer->open_list_head, open_list) { in snd_timer_check_slave()
296 * open a timer instance
303 struct snd_timer *timer; in snd_timer_open() local
312 pr_debug("ALSA: timer: invalid slave class %i\n", in snd_timer_open()
331 timer = snd_timer_find(tid); in snd_timer_open()
333 if (!timer) { in snd_timer_open()
337 timer = snd_timer_find(tid); in snd_timer_open()
340 if (!timer) { in snd_timer_open()
344 if (!list_empty(&timer->open_list_head)) { in snd_timer_open()
346 list_entry(timer->open_list_head.next, in snd_timer_open()
353 if (timer->num_instances >= timer->max_instances) { in snd_timer_open()
357 if (!try_module_get(timer->module)) { in snd_timer_open()
362 if (timer->card) { in snd_timer_open()
363 get_device(&timer->card->card_dev); in snd_timer_open()
364 card_dev_to_put = &timer->card->card_dev; in snd_timer_open()
367 if (list_empty(&timer->open_list_head) && timer->hw.open) { in snd_timer_open()
368 err = timer->hw.open(timer); in snd_timer_open()
370 module_put(timer->module); in snd_timer_open()
375 timeri->timer = timer; in snd_timer_open()
379 list_add_tail(&timeri->open_list, &timer->open_list_head); in snd_timer_open()
380 timer->num_instances++; in snd_timer_open()
397 struct snd_timer *timer) in remove_slave_links() argument
402 guard(spinlock)(&timer->lock); in remove_slave_links()
403 timeri->timer = NULL; in remove_slave_links()
406 timer->num_instances--; in remove_slave_links()
408 slave->timer = NULL; in remove_slave_links()
415 * close a timer instance
421 struct snd_timer *timer = timeri->timer; in snd_timer_close_locked() local
423 if (timer) { in snd_timer_close_locked()
424 guard(spinlock_irq)(&timer->lock); in snd_timer_close_locked()
434 /* force to stop the timer */ in snd_timer_close_locked()
437 if (timer) { in snd_timer_close_locked()
438 timer->num_instances--; in snd_timer_close_locked()
440 spin_lock_irq(&timer->lock); in snd_timer_close_locked()
442 spin_unlock_irq(&timer->lock); in snd_timer_close_locked()
444 spin_lock_irq(&timer->lock); in snd_timer_close_locked()
446 spin_unlock_irq(&timer->lock); in snd_timer_close_locked()
448 remove_slave_links(timeri, timer); in snd_timer_close_locked()
450 /* slave doesn't need to release timer resources below */ in snd_timer_close_locked()
452 timer = NULL; in snd_timer_close_locked()
455 if (timer) { in snd_timer_close_locked()
456 if (list_empty(&timer->open_list_head) && timer->hw.close) in snd_timer_close_locked()
457 timer->hw.close(timer); in snd_timer_close_locked()
459 if (timer->card) in snd_timer_close_locked()
460 *card_devp_to_put = &timer->card->card_dev; in snd_timer_close_locked()
461 module_put(timer->module); in snd_timer_close_locked()
466 * close a timer instance
483 static unsigned long snd_timer_hw_resolution(struct snd_timer *timer) in snd_timer_hw_resolution() argument
485 if (timer->hw.c_resolution) in snd_timer_hw_resolution()
486 return timer->hw.c_resolution(timer); in snd_timer_hw_resolution()
488 return timer->hw.resolution; in snd_timer_hw_resolution()
493 struct snd_timer * timer; in snd_timer_resolution() local
498 timer = timeri->timer; in snd_timer_resolution()
499 if (timer) { in snd_timer_resolution()
500 guard(spinlock_irqsave)(&timer->lock); in snd_timer_resolution()
501 ret = snd_timer_hw_resolution(timer); in snd_timer_resolution()
509 struct snd_timer *timer = ti->timer; in snd_timer_notify1() local
521 if (timer && in snd_timer_notify1()
524 resolution = snd_timer_hw_resolution(timer); in snd_timer_notify1()
529 if (timer == NULL) in snd_timer_notify1()
531 if (timer->hw.flags & SNDRV_TIMER_HW_SLAVE) in snd_timer_notify1()
539 /* start/continue a master timer */
543 struct snd_timer *timer; in snd_timer_start1() local
546 timer = timeri->timer; in snd_timer_start1()
547 if (!timer) in snd_timer_start1()
550 guard(spinlock_irqsave)(&timer->lock); in snd_timer_start1()
553 if (timer->card && timer->card->shutdown) in snd_timer_start1()
562 if (start && !(timer->hw.flags & SNDRV_TIMER_HW_SLAVE)) { in snd_timer_start1()
563 if ((u64)snd_timer_hw_resolution(timer) * ticks < 100000) in snd_timer_start1()
573 list_move_tail(&timeri->active_list, &timer->active_list_head); in snd_timer_start1()
574 if (timer->running) { in snd_timer_start1()
575 if (timer->hw.flags & SNDRV_TIMER_HW_SLAVE) in snd_timer_start1()
577 timer->flags |= SNDRV_TIMER_FLG_RESCHED; in snd_timer_start1()
582 timer->sticks = ticks; in snd_timer_start1()
583 timer->hw.start(timer); in snd_timer_start1()
585 timer->running++; in snd_timer_start1()
594 /* start/continue a slave timer */
604 if (timeri->master && timeri->timer) { in snd_timer_start_slave()
605 guard(spinlock)(&timeri->timer->lock); in snd_timer_start_slave()
614 /* stop/pause a master timer */
617 struct snd_timer *timer; in snd_timer_stop1() local
619 timer = timeri->timer; in snd_timer_stop1()
620 if (!timer) in snd_timer_stop1()
622 guard(spinlock_irqsave)(&timer->lock); in snd_timer_stop1()
628 if (timer->card && timer->card->shutdown) in snd_timer_stop1()
635 !(--timer->running)) { in snd_timer_stop1()
636 timer->hw.stop(timer); in snd_timer_stop1()
637 if (timer->flags & SNDRV_TIMER_FLG_RESCHED) { in snd_timer_stop1()
638 timer->flags &= ~SNDRV_TIMER_FLG_RESCHED; in snd_timer_stop1()
639 snd_timer_reschedule(timer, 0); in snd_timer_stop1()
640 if (timer->flags & SNDRV_TIMER_FLG_CHANGE) { in snd_timer_stop1()
641 timer->flags &= ~SNDRV_TIMER_FLG_CHANGE; in snd_timer_stop1()
642 timer->hw.start(timer); in snd_timer_stop1()
656 /* stop/pause a slave timer */
664 if (timeri->timer) { in snd_timer_stop_slave()
665 guard(spinlock)(&timeri->timer->lock); in snd_timer_stop_slave()
676 * start the timer instance
690 * stop the timer instance.
692 * do not call this from the timer callback!
708 /* timer can continue only after pause */ in snd_timer_continue()
732 * reschedule the timer
735 * when the scheduling ticks is changed set CHANGE flag to reprogram the timer.
737 static void snd_timer_reschedule(struct snd_timer * timer, unsigned long ticks_left) in snd_timer_reschedule() argument
742 list_for_each_entry(ti, &timer->active_list_head, active_list) { in snd_timer_reschedule()
746 timer->running++; in snd_timer_reschedule()
754 timer->flags &= ~SNDRV_TIMER_FLG_RESCHED; in snd_timer_reschedule()
757 if (ticks > timer->hw.ticks) in snd_timer_reschedule()
758 ticks = timer->hw.ticks; in snd_timer_reschedule()
760 timer->flags |= SNDRV_TIMER_FLG_CHANGE; in snd_timer_reschedule()
761 timer->sticks = ticks; in snd_timer_reschedule()
764 /* call callbacks in timer ack list */
765 static void snd_timer_process_callbacks(struct snd_timer *timer, in snd_timer_process_callbacks() argument
783 spin_unlock(&timer->lock); in snd_timer_process_callbacks()
786 spin_lock(&timer->lock); in snd_timer_process_callbacks()
793 static void snd_timer_clear_callbacks(struct snd_timer *timer, in snd_timer_clear_callbacks() argument
796 guard(spinlock_irqsave)(&timer->lock); in snd_timer_clear_callbacks()
802 * timer work
807 struct snd_timer *timer = container_of(work, struct snd_timer, task_work); in snd_timer_work() local
809 if (timer->card && timer->card->shutdown) { in snd_timer_work()
810 snd_timer_clear_callbacks(timer, &timer->sack_list_head); in snd_timer_work()
814 guard(spinlock_irqsave)(&timer->lock); in snd_timer_work()
815 snd_timer_process_callbacks(timer, &timer->sack_list_head); in snd_timer_work()
819 * timer interrupt
821 * ticks_left is usually equal to timer->sticks.
824 void snd_timer_interrupt(struct snd_timer * timer, unsigned long ticks_left) in snd_timer_interrupt() argument
830 if (timer == NULL) in snd_timer_interrupt()
833 if (timer->card && timer->card->shutdown) { in snd_timer_interrupt()
834 snd_timer_clear_callbacks(timer, &timer->ack_list_head); in snd_timer_interrupt()
838 guard(spinlock_irqsave)(&timer->lock); in snd_timer_interrupt()
841 resolution = snd_timer_hw_resolution(timer); in snd_timer_interrupt()
848 list_for_each_entry_safe(ti, tmp, &timer->active_list_head, in snd_timer_interrupt()
866 --timer->running; in snd_timer_interrupt()
869 if ((timer->hw.flags & SNDRV_TIMER_HW_WORK) || in snd_timer_interrupt()
871 ack_list_head = &timer->ack_list_head; in snd_timer_interrupt()
873 ack_list_head = &timer->sack_list_head; in snd_timer_interrupt()
883 if (timer->flags & SNDRV_TIMER_FLG_RESCHED) in snd_timer_interrupt()
884 snd_timer_reschedule(timer, timer->sticks); in snd_timer_interrupt()
885 if (timer->running) { in snd_timer_interrupt()
886 if (timer->hw.flags & SNDRV_TIMER_HW_STOP) { in snd_timer_interrupt()
887 timer->hw.stop(timer); in snd_timer_interrupt()
888 timer->flags |= SNDRV_TIMER_FLG_CHANGE; in snd_timer_interrupt()
890 if (!(timer->hw.flags & SNDRV_TIMER_HW_AUTO) || in snd_timer_interrupt()
891 (timer->flags & SNDRV_TIMER_FLG_CHANGE)) { in snd_timer_interrupt()
892 /* restart timer */ in snd_timer_interrupt()
893 timer->flags &= ~SNDRV_TIMER_FLG_CHANGE; in snd_timer_interrupt()
894 timer->hw.start(timer); in snd_timer_interrupt()
897 timer->hw.stop(timer); in snd_timer_interrupt()
901 snd_timer_process_callbacks(timer, &timer->ack_list_head); in snd_timer_interrupt()
904 if (!list_empty(&timer->sack_list_head)) in snd_timer_interrupt()
905 queue_work(system_highpri_wq, &timer->task_work); in snd_timer_interrupt()
916 struct snd_timer *timer; in snd_timer_new() local
933 timer = kzalloc(sizeof(*timer), GFP_KERNEL); in snd_timer_new()
934 if (!timer) in snd_timer_new()
936 timer->tmr_class = tid->dev_class; in snd_timer_new()
937 timer->card = card; in snd_timer_new()
938 timer->tmr_device = tid->device; in snd_timer_new()
939 timer->tmr_subdevice = tid->subdevice; in snd_timer_new()
941 strscpy(timer->id, id, sizeof(timer->id)); in snd_timer_new()
942 timer->sticks = 1; in snd_timer_new()
943 INIT_LIST_HEAD(&timer->device_list); in snd_timer_new()
944 INIT_LIST_HEAD(&timer->open_list_head); in snd_timer_new()
945 INIT_LIST_HEAD(&timer->active_list_head); in snd_timer_new()
946 INIT_LIST_HEAD(&timer->ack_list_head); in snd_timer_new()
947 INIT_LIST_HEAD(&timer->sack_list_head); in snd_timer_new()
948 spin_lock_init(&timer->lock); in snd_timer_new()
949 INIT_WORK(&timer->task_work, snd_timer_work); in snd_timer_new()
950 timer->max_instances = 1000; /* default limit per timer */ in snd_timer_new()
952 timer->module = card->module; in snd_timer_new()
953 err = snd_device_new(card, SNDRV_DEV_TIMER, timer, &ops); in snd_timer_new()
955 snd_timer_free(timer); in snd_timer_new()
960 *rtimer = timer; in snd_timer_new()
965 static int snd_timer_free(struct snd_timer *timer) in snd_timer_free() argument
967 if (!timer) in snd_timer_free()
971 if (! list_empty(&timer->open_list_head)) { in snd_timer_free()
974 pr_warn("ALSA: timer %p is busy?\n", timer); in snd_timer_free()
975 list_for_each_safe(p, n, &timer->open_list_head) { in snd_timer_free()
978 ti->timer = NULL; in snd_timer_free()
981 list_del(&timer->device_list); in snd_timer_free()
983 if (timer->private_free) in snd_timer_free()
984 timer->private_free(timer); in snd_timer_free()
985 kfree(timer); in snd_timer_free()
991 struct snd_timer *timer = device->device_data; in snd_timer_dev_free() local
992 return snd_timer_free(timer); in snd_timer_dev_free()
997 struct snd_timer *timer = dev->device_data; in snd_timer_dev_register() local
1000 if (snd_BUG_ON(!timer || !timer->hw.start || !timer->hw.stop)) in snd_timer_dev_register()
1002 if (!(timer->hw.flags & SNDRV_TIMER_HW_SLAVE) && in snd_timer_dev_register()
1003 !timer->hw.resolution && timer->hw.c_resolution == NULL) in snd_timer_dev_register()
1008 if (timer1->tmr_class > timer->tmr_class) in snd_timer_dev_register()
1010 if (timer1->tmr_class < timer->tmr_class) in snd_timer_dev_register()
1012 if (timer1->card && timer->card) { in snd_timer_dev_register()
1013 if (timer1->card->number > timer->card->number) in snd_timer_dev_register()
1015 if (timer1->card->number < timer->card->number) in snd_timer_dev_register()
1018 if (timer1->tmr_device > timer->tmr_device) in snd_timer_dev_register()
1020 if (timer1->tmr_device < timer->tmr_device) in snd_timer_dev_register()
1022 if (timer1->tmr_subdevice > timer->tmr_subdevice) in snd_timer_dev_register()
1024 if (timer1->tmr_subdevice < timer->tmr_subdevice) in snd_timer_dev_register()
1029 list_add_tail(&timer->device_list, &timer1->device_list); in snd_timer_dev_register()
1035 struct snd_timer *timer = device->device_data; in snd_timer_dev_disconnect() local
1039 list_del_init(&timer->device_list); in snd_timer_dev_disconnect()
1041 list_for_each_entry(ti, &timer->open_list_head, open_list) { in snd_timer_dev_disconnect()
1048 void snd_timer_notify(struct snd_timer *timer, int event, struct timespec64 *tstamp) in snd_timer_notify() argument
1053 if (timer->card && timer->card->shutdown) in snd_timer_notify()
1055 if (! (timer->hw.flags & SNDRV_TIMER_HW_SLAVE)) in snd_timer_notify()
1060 guard(spinlock_irqsave)(&timer->lock); in snd_timer_notify()
1064 resolution = snd_timer_hw_resolution(timer); in snd_timer_notify()
1065 list_for_each_entry(ti, &timer->active_list_head, active_list) { in snd_timer_notify()
1091 int snd_timer_global_free(struct snd_timer *timer) in snd_timer_global_free() argument
1093 return snd_timer_free(timer); in snd_timer_global_free()
1097 int snd_timer_global_register(struct snd_timer *timer) in snd_timer_global_register() argument
1102 dev.device_data = timer; in snd_timer_global_register()
1108 * System timer
1123 struct snd_timer *timer = priv->snd_timer; in snd_timer_s_function() local
1127 snd_timer_interrupt(timer, (long)jiff - (long)priv->last_jiffies); in snd_timer_s_function()
1130 static int snd_timer_s_start(struct snd_timer * timer) in snd_timer_s_start() argument
1135 priv = (struct snd_timer_system_private *) timer->private_data; in snd_timer_s_start()
1137 if (priv->correction > timer->sticks - 1) { in snd_timer_s_start()
1138 priv->correction -= timer->sticks - 1; in snd_timer_s_start()
1141 njiff += timer->sticks - priv->correction; in snd_timer_s_start()
1149 static int snd_timer_s_stop(struct snd_timer * timer) in snd_timer_s_stop() argument
1154 priv = (struct snd_timer_system_private *) timer->private_data; in snd_timer_s_stop()
1158 timer->sticks = priv->last_expires - jiff; in snd_timer_s_stop()
1160 timer->sticks = 1; in snd_timer_s_stop()
1165 static int snd_timer_s_close(struct snd_timer *timer) in snd_timer_s_close() argument
1169 priv = (struct snd_timer_system_private *)timer->private_data; in snd_timer_s_close()
1184 static void snd_timer_free_system(struct snd_timer *timer) in snd_timer_free_system() argument
1186 kfree(timer->private_data); in snd_timer_free_system()
1191 struct snd_timer *timer; in snd_timer_register_system() local
1195 err = snd_timer_global_new("system", SNDRV_TIMER_GLOBAL_SYSTEM, &timer); in snd_timer_register_system()
1198 strcpy(timer->name, "system timer"); in snd_timer_register_system()
1199 timer->hw = snd_timer_system; in snd_timer_register_system()
1202 snd_timer_free(timer); in snd_timer_register_system()
1205 priv->snd_timer = timer; in snd_timer_register_system()
1207 timer->private_data = priv; in snd_timer_register_system()
1208 timer->private_free = snd_timer_free_system; in snd_timer_register_system()
1209 return snd_timer_global_register(timer); in snd_timer_register_system()
1220 struct snd_timer *timer; in snd_timer_proc_read() local
1225 list_for_each_entry(timer, &snd_timer_list, device_list) { in snd_timer_proc_read()
1226 if (timer->card && timer->card->shutdown) in snd_timer_proc_read()
1228 switch (timer->tmr_class) { in snd_timer_proc_read()
1230 snd_iprintf(buffer, "G%i: ", timer->tmr_device); in snd_timer_proc_read()
1234 timer->card->number, timer->tmr_device); in snd_timer_proc_read()
1237 snd_iprintf(buffer, "P%i-%i-%i: ", timer->card->number, in snd_timer_proc_read()
1238 timer->tmr_device, timer->tmr_subdevice); in snd_timer_proc_read()
1241 snd_iprintf(buffer, "?%i-%i-%i-%i: ", timer->tmr_class, in snd_timer_proc_read()
1242 timer->card ? timer->card->number : -1, in snd_timer_proc_read()
1243 timer->tmr_device, timer->tmr_subdevice); in snd_timer_proc_read()
1245 snd_iprintf(buffer, "%s :", timer->name); in snd_timer_proc_read()
1246 scoped_guard(spinlock_irq, &timer->lock) in snd_timer_proc_read()
1247 resolution = snd_timer_hw_resolution(timer); in snd_timer_proc_read()
1252 timer->hw.ticks); in snd_timer_proc_read()
1253 if (timer->hw.flags & SNDRV_TIMER_HW_SLAVE) in snd_timer_proc_read()
1256 list_for_each_entry(ti, &timer->open_list_head, open_list) in snd_timer_proc_read()
1509 static void snd_timer_user_copy_id(struct snd_timer_id *id, struct snd_timer *timer) in snd_timer_user_copy_id() argument
1511 id->dev_class = timer->tmr_class; in snd_timer_user_copy_id()
1513 id->card = timer->card ? timer->card->number : -1; in snd_timer_user_copy_id()
1514 id->device = timer->tmr_device; in snd_timer_user_copy_id()
1515 id->subdevice = timer->tmr_subdevice; in snd_timer_user_copy_id()
1521 struct snd_timer *timer; in snd_timer_user_next_device() local
1531 timer = list_entry(snd_timer_list.next, in snd_timer_user_next_device()
1533 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1540 timer = list_entry(p, struct snd_timer, device_list); in snd_timer_user_next_device()
1541 if (timer->tmr_class > SNDRV_TIMER_CLASS_GLOBAL) { in snd_timer_user_next_device()
1542 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1545 if (timer->tmr_device >= id.device) { in snd_timer_user_next_device()
1546 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1568 timer = list_entry(p, struct snd_timer, device_list); in snd_timer_user_next_device()
1569 if (timer->tmr_class > id.dev_class) { in snd_timer_user_next_device()
1570 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1573 if (timer->tmr_class < id.dev_class) in snd_timer_user_next_device()
1575 if (timer->card->number > id.card) { in snd_timer_user_next_device()
1576 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1579 if (timer->card->number < id.card) in snd_timer_user_next_device()
1581 if (timer->tmr_device > id.device) { in snd_timer_user_next_device()
1582 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1585 if (timer->tmr_device < id.device) in snd_timer_user_next_device()
1587 if (timer->tmr_subdevice > id.subdevice) { in snd_timer_user_next_device()
1588 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1591 if (timer->tmr_subdevice < id.subdevice) in snd_timer_user_next_device()
1593 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1758 t = tu->timeri->timer; in snd_timer_user_info()
1788 t = tu->timeri->timer; in snd_timer_user_params()
1963 /* start timer instead of continue if it's not used before */ in snd_timer_user_continue()
2027 * which will allow us to use them (basically, the subdevice number of udriven timer).
2046 snd_timer_free(utimer->timer); in snd_utimer_free()
2064 snd_timer_interrupt(utimer->timer, utimer->timer->sticks); in snd_utimer_trigger()
2116 struct snd_timer *timer; in snd_utimer_create() local
2149 err = snd_timer_new(NULL, utimer->name, &tid, &timer); in snd_utimer_create()
2151 pr_err("Can't create userspace-driven timer\n"); in snd_utimer_create()
2155 timer->module = THIS_MODULE; in snd_utimer_create()
2156 timer->hw = timer_hw; in snd_utimer_create()
2157 timer->hw.resolution = utimer_info->resolution; in snd_utimer_create()
2158 timer->hw.ticks = 1; in snd_utimer_create()
2159 timer->max_instances = MAX_SLAVE_INSTANCES; in snd_utimer_create()
2161 utimer->timer = timer; in snd_utimer_create()
2163 err = snd_timer_global_register(timer); in snd_utimer_create()
2165 pr_err("Can't register a userspace-driven timer\n"); in snd_utimer_create()
2173 snd_timer_free(timer); in snd_utimer_create()
2445 /* unregister the system timer */
2448 struct snd_timer *timer, *n; in snd_timer_free_all() local
2450 list_for_each_entry_safe(timer, n, &snd_timer_list, device_list) in snd_timer_free_all()
2451 snd_timer_free(timer); in snd_timer_free_all()
2467 dev_set_name(timer_dev, "timer"); in alsa_timer_init()
2471 "system timer"); in alsa_timer_init()
2476 pr_err("ALSA: unable to register system timer (%i)\n", err); in alsa_timer_init()
2483 pr_err("ALSA: unable to register timer device (%i)\n", err); in alsa_timer_init()