Lines Matching full:timer
17 #include <sound/timer.h>
37 MODULE_DESCRIPTION("ALSA timer interface");
45 MODULE_ALIAS("devname:snd/timer");
128 static int snd_timer_free(struct snd_timer *timer);
133 static void snd_timer_reschedule(struct snd_timer * timer, unsigned long ticks_left);
136 * create a timer instance with the given owner string.
172 * find a timer instance from the given timer id
176 struct snd_timer *timer; in snd_timer_find() local
178 list_for_each_entry(timer, &snd_timer_list, device_list) { in snd_timer_find()
179 if (timer->tmr_class != tid->dev_class) in snd_timer_find()
181 if ((timer->tmr_class == SNDRV_TIMER_CLASS_CARD || in snd_timer_find()
182 timer->tmr_class == SNDRV_TIMER_CLASS_PCM) && in snd_timer_find()
183 (timer->card == NULL || in snd_timer_find()
184 timer->card->number != tid->card)) in snd_timer_find()
186 if (timer->tmr_device != tid->device) in snd_timer_find()
188 if (timer->tmr_subdevice != tid->subdevice) in snd_timer_find()
190 return timer; in snd_timer_find()
202 request_module("snd-timer-%i", tid->device); in snd_timer_request()
223 if (master->timer->num_instances >= master->timer->max_instances) in check_matching_master_slave()
226 master->timer->num_instances++; in check_matching_master_slave()
228 spin_lock(&master->timer->lock); in check_matching_master_slave()
230 slave->timer = master->timer; in check_matching_master_slave()
233 spin_unlock(&master->timer->lock); in check_matching_master_slave()
246 struct snd_timer *timer; in snd_timer_check_slave() local
251 list_for_each_entry(timer, &snd_timer_list, device_list) { in snd_timer_check_slave()
252 list_for_each_entry(master, &timer->open_list_head, open_list) { in snd_timer_check_slave()
286 * open a timer instance
293 struct snd_timer *timer; in snd_timer_open() local
302 pr_debug("ALSA: timer: invalid slave class %i\n", in snd_timer_open()
321 timer = snd_timer_find(tid); in snd_timer_open()
323 if (!timer) { in snd_timer_open()
327 timer = snd_timer_find(tid); in snd_timer_open()
330 if (!timer) { in snd_timer_open()
334 if (!list_empty(&timer->open_list_head)) { in snd_timer_open()
336 list_entry(timer->open_list_head.next, in snd_timer_open()
343 if (timer->num_instances >= timer->max_instances) { in snd_timer_open()
347 if (!try_module_get(timer->module)) { in snd_timer_open()
352 if (timer->card) { in snd_timer_open()
353 get_device(&timer->card->card_dev); in snd_timer_open()
354 card_dev_to_put = &timer->card->card_dev; in snd_timer_open()
357 if (list_empty(&timer->open_list_head) && timer->hw.open) { in snd_timer_open()
358 err = timer->hw.open(timer); in snd_timer_open()
360 module_put(timer->module); in snd_timer_open()
365 timeri->timer = timer; in snd_timer_open()
369 list_add_tail(&timeri->open_list, &timer->open_list_head); in snd_timer_open()
370 timer->num_instances++; in snd_timer_open()
386 * close a timer instance
392 struct snd_timer *timer = timeri->timer; in snd_timer_close_locked() local
395 if (timer) { in snd_timer_close_locked()
396 spin_lock_irq(&timer->lock); in snd_timer_close_locked()
398 spin_unlock_irq(&timer->lock); in snd_timer_close_locked()
407 /* force to stop the timer */ in snd_timer_close_locked()
410 if (timer) { in snd_timer_close_locked()
411 timer->num_instances--; in snd_timer_close_locked()
413 spin_lock_irq(&timer->lock); in snd_timer_close_locked()
415 spin_unlock_irq(&timer->lock); in snd_timer_close_locked()
417 spin_lock_irq(&timer->lock); in snd_timer_close_locked()
419 spin_unlock_irq(&timer->lock); in snd_timer_close_locked()
423 spin_lock(&timer->lock); in snd_timer_close_locked()
424 timeri->timer = NULL; in snd_timer_close_locked()
428 timer->num_instances--; in snd_timer_close_locked()
430 slave->timer = NULL; in snd_timer_close_locked()
434 spin_unlock(&timer->lock); in snd_timer_close_locked()
437 /* slave doesn't need to release timer resources below */ in snd_timer_close_locked()
439 timer = NULL; in snd_timer_close_locked()
442 if (timer) { in snd_timer_close_locked()
443 if (list_empty(&timer->open_list_head) && timer->hw.close) in snd_timer_close_locked()
444 timer->hw.close(timer); in snd_timer_close_locked()
446 if (timer->card) in snd_timer_close_locked()
447 *card_devp_to_put = &timer->card->card_dev; in snd_timer_close_locked()
448 module_put(timer->module); in snd_timer_close_locked()
453 * close a timer instance
471 static unsigned long snd_timer_hw_resolution(struct snd_timer *timer) in snd_timer_hw_resolution() argument
473 if (timer->hw.c_resolution) in snd_timer_hw_resolution()
474 return timer->hw.c_resolution(timer); in snd_timer_hw_resolution()
476 return timer->hw.resolution; in snd_timer_hw_resolution()
481 struct snd_timer * timer; in snd_timer_resolution() local
487 timer = timeri->timer; in snd_timer_resolution()
488 if (timer) { in snd_timer_resolution()
489 spin_lock_irqsave(&timer->lock, flags); in snd_timer_resolution()
490 ret = snd_timer_hw_resolution(timer); in snd_timer_resolution()
491 spin_unlock_irqrestore(&timer->lock, flags); in snd_timer_resolution()
499 struct snd_timer *timer = ti->timer; in snd_timer_notify1() local
511 if (timer && in snd_timer_notify1()
514 resolution = snd_timer_hw_resolution(timer); in snd_timer_notify1()
519 if (timer == NULL) in snd_timer_notify1()
521 if (timer->hw.flags & SNDRV_TIMER_HW_SLAVE) in snd_timer_notify1()
529 /* start/continue a master timer */
533 struct snd_timer *timer; in snd_timer_start1() local
537 timer = timeri->timer; in snd_timer_start1()
538 if (!timer) in snd_timer_start1()
541 spin_lock_irqsave(&timer->lock, flags); in snd_timer_start1()
546 if (timer->card && timer->card->shutdown) { in snd_timer_start1()
562 list_move_tail(&timeri->active_list, &timer->active_list_head); in snd_timer_start1()
563 if (timer->running) { in snd_timer_start1()
564 if (timer->hw.flags & SNDRV_TIMER_HW_SLAVE) in snd_timer_start1()
566 timer->flags |= SNDRV_TIMER_FLG_RESCHED; in snd_timer_start1()
571 timer->sticks = ticks; in snd_timer_start1()
572 timer->hw.start(timer); in snd_timer_start1()
574 timer->running++; in snd_timer_start1()
581 spin_unlock_irqrestore(&timer->lock, flags); in snd_timer_start1()
585 /* start/continue a slave timer */
602 if (timeri->master && timeri->timer) { in snd_timer_start_slave()
603 spin_lock(&timeri->timer->lock); in snd_timer_start_slave()
608 spin_unlock(&timeri->timer->lock); in snd_timer_start_slave()
616 /* stop/pause a master timer */
619 struct snd_timer *timer; in snd_timer_stop1() local
623 timer = timeri->timer; in snd_timer_stop1()
624 if (!timer) in snd_timer_stop1()
626 spin_lock_irqsave(&timer->lock, flags); in snd_timer_stop1()
634 if (timer->card && timer->card->shutdown) in snd_timer_stop1()
641 !(--timer->running)) { in snd_timer_stop1()
642 timer->hw.stop(timer); in snd_timer_stop1()
643 if (timer->flags & SNDRV_TIMER_FLG_RESCHED) { in snd_timer_stop1()
644 timer->flags &= ~SNDRV_TIMER_FLG_RESCHED; in snd_timer_stop1()
645 snd_timer_reschedule(timer, 0); in snd_timer_stop1()
646 if (timer->flags & SNDRV_TIMER_FLG_CHANGE) { in snd_timer_stop1()
647 timer->flags &= ~SNDRV_TIMER_FLG_CHANGE; in snd_timer_stop1()
648 timer->hw.start(timer); in snd_timer_stop1()
660 spin_unlock_irqrestore(&timer->lock, flags); in snd_timer_stop1()
664 /* stop/pause a slave timer */
673 if (timeri->timer) { in snd_timer_stop_slave()
674 spin_lock(&timeri->timer->lock); in snd_timer_stop_slave()
680 spin_unlock(&timeri->timer->lock); in snd_timer_stop_slave()
687 * start the timer instance
701 * stop the timer instance.
703 * do not call this from the timer callback!
719 /* timer can continue only after pause */ in snd_timer_continue()
743 * reschedule the timer
746 * when the scheduling ticks is changed set CHANGE flag to reprogram the timer.
748 static void snd_timer_reschedule(struct snd_timer * timer, unsigned long ticks_left) in snd_timer_reschedule() argument
753 list_for_each_entry(ti, &timer->active_list_head, active_list) { in snd_timer_reschedule()
757 timer->running++; in snd_timer_reschedule()
765 timer->flags &= ~SNDRV_TIMER_FLG_RESCHED; in snd_timer_reschedule()
768 if (ticks > timer->hw.ticks) in snd_timer_reschedule()
769 ticks = timer->hw.ticks; in snd_timer_reschedule()
771 timer->flags |= SNDRV_TIMER_FLG_CHANGE; in snd_timer_reschedule()
772 timer->sticks = ticks; in snd_timer_reschedule()
775 /* call callbacks in timer ack list */
776 static void snd_timer_process_callbacks(struct snd_timer *timer, in snd_timer_process_callbacks() argument
794 spin_unlock(&timer->lock); in snd_timer_process_callbacks()
797 spin_lock(&timer->lock); in snd_timer_process_callbacks()
804 static void snd_timer_clear_callbacks(struct snd_timer *timer, in snd_timer_clear_callbacks() argument
809 spin_lock_irqsave(&timer->lock, flags); in snd_timer_clear_callbacks()
812 spin_unlock_irqrestore(&timer->lock, flags); in snd_timer_clear_callbacks()
816 * timer work
821 struct snd_timer *timer = container_of(work, struct snd_timer, task_work); in snd_timer_work() local
824 if (timer->card && timer->card->shutdown) { in snd_timer_work()
825 snd_timer_clear_callbacks(timer, &timer->sack_list_head); in snd_timer_work()
829 spin_lock_irqsave(&timer->lock, flags); in snd_timer_work()
830 snd_timer_process_callbacks(timer, &timer->sack_list_head); in snd_timer_work()
831 spin_unlock_irqrestore(&timer->lock, flags); in snd_timer_work()
835 * timer interrupt
837 * ticks_left is usually equal to timer->sticks.
840 void snd_timer_interrupt(struct snd_timer * timer, unsigned long ticks_left) in snd_timer_interrupt() argument
848 if (timer == NULL) in snd_timer_interrupt()
851 if (timer->card && timer->card->shutdown) { in snd_timer_interrupt()
852 snd_timer_clear_callbacks(timer, &timer->ack_list_head); in snd_timer_interrupt()
856 spin_lock_irqsave(&timer->lock, flags); in snd_timer_interrupt()
859 resolution = snd_timer_hw_resolution(timer); in snd_timer_interrupt()
866 list_for_each_entry_safe(ti, tmp, &timer->active_list_head, in snd_timer_interrupt()
884 --timer->running; in snd_timer_interrupt()
887 if ((timer->hw.flags & SNDRV_TIMER_HW_WORK) || in snd_timer_interrupt()
889 ack_list_head = &timer->ack_list_head; in snd_timer_interrupt()
891 ack_list_head = &timer->sack_list_head; in snd_timer_interrupt()
901 if (timer->flags & SNDRV_TIMER_FLG_RESCHED) in snd_timer_interrupt()
902 snd_timer_reschedule(timer, timer->sticks); in snd_timer_interrupt()
903 if (timer->running) { in snd_timer_interrupt()
904 if (timer->hw.flags & SNDRV_TIMER_HW_STOP) { in snd_timer_interrupt()
905 timer->hw.stop(timer); in snd_timer_interrupt()
906 timer->flags |= SNDRV_TIMER_FLG_CHANGE; in snd_timer_interrupt()
908 if (!(timer->hw.flags & SNDRV_TIMER_HW_AUTO) || in snd_timer_interrupt()
909 (timer->flags & SNDRV_TIMER_FLG_CHANGE)) { in snd_timer_interrupt()
910 /* restart timer */ in snd_timer_interrupt()
911 timer->flags &= ~SNDRV_TIMER_FLG_CHANGE; in snd_timer_interrupt()
912 timer->hw.start(timer); in snd_timer_interrupt()
915 timer->hw.stop(timer); in snd_timer_interrupt()
919 snd_timer_process_callbacks(timer, &timer->ack_list_head); in snd_timer_interrupt()
922 use_work = !list_empty(&timer->sack_list_head); in snd_timer_interrupt()
923 spin_unlock_irqrestore(&timer->lock, flags); in snd_timer_interrupt()
926 queue_work(system_highpri_wq, &timer->task_work); in snd_timer_interrupt()
937 struct snd_timer *timer; in snd_timer_new() local
954 timer = kzalloc(sizeof(*timer), GFP_KERNEL); in snd_timer_new()
955 if (!timer) in snd_timer_new()
957 timer->tmr_class = tid->dev_class; in snd_timer_new()
958 timer->card = card; in snd_timer_new()
959 timer->tmr_device = tid->device; in snd_timer_new()
960 timer->tmr_subdevice = tid->subdevice; in snd_timer_new()
962 strscpy(timer->id, id, sizeof(timer->id)); in snd_timer_new()
963 timer->sticks = 1; in snd_timer_new()
964 INIT_LIST_HEAD(&timer->device_list); in snd_timer_new()
965 INIT_LIST_HEAD(&timer->open_list_head); in snd_timer_new()
966 INIT_LIST_HEAD(&timer->active_list_head); in snd_timer_new()
967 INIT_LIST_HEAD(&timer->ack_list_head); in snd_timer_new()
968 INIT_LIST_HEAD(&timer->sack_list_head); in snd_timer_new()
969 spin_lock_init(&timer->lock); in snd_timer_new()
970 INIT_WORK(&timer->task_work, snd_timer_work); in snd_timer_new()
971 timer->max_instances = 1000; /* default limit per timer */ in snd_timer_new()
973 timer->module = card->module; in snd_timer_new()
974 err = snd_device_new(card, SNDRV_DEV_TIMER, timer, &ops); in snd_timer_new()
976 snd_timer_free(timer); in snd_timer_new()
981 *rtimer = timer; in snd_timer_new()
986 static int snd_timer_free(struct snd_timer *timer) in snd_timer_free() argument
988 if (!timer) in snd_timer_free()
992 if (! list_empty(&timer->open_list_head)) { in snd_timer_free()
995 pr_warn("ALSA: timer %p is busy?\n", timer); in snd_timer_free()
996 list_for_each_safe(p, n, &timer->open_list_head) { in snd_timer_free()
999 ti->timer = NULL; in snd_timer_free()
1002 list_del(&timer->device_list); in snd_timer_free()
1005 if (timer->private_free) in snd_timer_free()
1006 timer->private_free(timer); in snd_timer_free()
1007 kfree(timer); in snd_timer_free()
1013 struct snd_timer *timer = device->device_data; in snd_timer_dev_free() local
1014 return snd_timer_free(timer); in snd_timer_dev_free()
1019 struct snd_timer *timer = dev->device_data; in snd_timer_dev_register() local
1022 if (snd_BUG_ON(!timer || !timer->hw.start || !timer->hw.stop)) in snd_timer_dev_register()
1024 if (!(timer->hw.flags & SNDRV_TIMER_HW_SLAVE) && in snd_timer_dev_register()
1025 !timer->hw.resolution && timer->hw.c_resolution == NULL) in snd_timer_dev_register()
1030 if (timer1->tmr_class > timer->tmr_class) in snd_timer_dev_register()
1032 if (timer1->tmr_class < timer->tmr_class) in snd_timer_dev_register()
1034 if (timer1->card && timer->card) { in snd_timer_dev_register()
1035 if (timer1->card->number > timer->card->number) in snd_timer_dev_register()
1037 if (timer1->card->number < timer->card->number) in snd_timer_dev_register()
1040 if (timer1->tmr_device > timer->tmr_device) in snd_timer_dev_register()
1042 if (timer1->tmr_device < timer->tmr_device) in snd_timer_dev_register()
1044 if (timer1->tmr_subdevice > timer->tmr_subdevice) in snd_timer_dev_register()
1046 if (timer1->tmr_subdevice < timer->tmr_subdevice) in snd_timer_dev_register()
1052 list_add_tail(&timer->device_list, &timer1->device_list); in snd_timer_dev_register()
1059 struct snd_timer *timer = device->device_data; in snd_timer_dev_disconnect() local
1063 list_del_init(&timer->device_list); in snd_timer_dev_disconnect()
1065 list_for_each_entry(ti, &timer->open_list_head, open_list) { in snd_timer_dev_disconnect()
1073 void snd_timer_notify(struct snd_timer *timer, int event, struct timespec64 *tstamp) in snd_timer_notify() argument
1079 if (timer->card && timer->card->shutdown) in snd_timer_notify()
1081 if (! (timer->hw.flags & SNDRV_TIMER_HW_SLAVE)) in snd_timer_notify()
1086 spin_lock_irqsave(&timer->lock, flags); in snd_timer_notify()
1090 resolution = snd_timer_hw_resolution(timer); in snd_timer_notify()
1091 list_for_each_entry(ti, &timer->active_list_head, active_list) { in snd_timer_notify()
1098 spin_unlock_irqrestore(&timer->lock, flags); in snd_timer_notify()
1118 int snd_timer_global_free(struct snd_timer *timer) in snd_timer_global_free() argument
1120 return snd_timer_free(timer); in snd_timer_global_free()
1124 int snd_timer_global_register(struct snd_timer *timer) in snd_timer_global_register() argument
1129 dev.device_data = timer; in snd_timer_global_register()
1135 * System timer
1150 struct snd_timer *timer = priv->snd_timer; in snd_timer_s_function() local
1154 snd_timer_interrupt(timer, (long)jiff - (long)priv->last_jiffies); in snd_timer_s_function()
1157 static int snd_timer_s_start(struct snd_timer * timer) in snd_timer_s_start() argument
1162 priv = (struct snd_timer_system_private *) timer->private_data; in snd_timer_s_start()
1164 if (priv->correction > timer->sticks - 1) { in snd_timer_s_start()
1165 priv->correction -= timer->sticks - 1; in snd_timer_s_start()
1168 njiff += timer->sticks - priv->correction; in snd_timer_s_start()
1176 static int snd_timer_s_stop(struct snd_timer * timer) in snd_timer_s_stop() argument
1181 priv = (struct snd_timer_system_private *) timer->private_data; in snd_timer_s_stop()
1185 timer->sticks = priv->last_expires - jiff; in snd_timer_s_stop()
1187 timer->sticks = 1; in snd_timer_s_stop()
1192 static int snd_timer_s_close(struct snd_timer *timer) in snd_timer_s_close() argument
1196 priv = (struct snd_timer_system_private *)timer->private_data; in snd_timer_s_close()
1211 static void snd_timer_free_system(struct snd_timer *timer) in snd_timer_free_system() argument
1213 kfree(timer->private_data); in snd_timer_free_system()
1218 struct snd_timer *timer; in snd_timer_register_system() local
1222 err = snd_timer_global_new("system", SNDRV_TIMER_GLOBAL_SYSTEM, &timer); in snd_timer_register_system()
1225 strcpy(timer->name, "system timer"); in snd_timer_register_system()
1226 timer->hw = snd_timer_system; in snd_timer_register_system()
1229 snd_timer_free(timer); in snd_timer_register_system()
1232 priv->snd_timer = timer; in snd_timer_register_system()
1234 timer->private_data = priv; in snd_timer_register_system()
1235 timer->private_free = snd_timer_free_system; in snd_timer_register_system()
1236 return snd_timer_global_register(timer); in snd_timer_register_system()
1247 struct snd_timer *timer; in snd_timer_proc_read() local
1252 list_for_each_entry(timer, &snd_timer_list, device_list) { in snd_timer_proc_read()
1253 if (timer->card && timer->card->shutdown) in snd_timer_proc_read()
1255 switch (timer->tmr_class) { in snd_timer_proc_read()
1257 snd_iprintf(buffer, "G%i: ", timer->tmr_device); in snd_timer_proc_read()
1261 timer->card->number, timer->tmr_device); in snd_timer_proc_read()
1264 snd_iprintf(buffer, "P%i-%i-%i: ", timer->card->number, in snd_timer_proc_read()
1265 timer->tmr_device, timer->tmr_subdevice); in snd_timer_proc_read()
1268 snd_iprintf(buffer, "?%i-%i-%i-%i: ", timer->tmr_class, in snd_timer_proc_read()
1269 timer->card ? timer->card->number : -1, in snd_timer_proc_read()
1270 timer->tmr_device, timer->tmr_subdevice); in snd_timer_proc_read()
1272 snd_iprintf(buffer, "%s :", timer->name); in snd_timer_proc_read()
1273 spin_lock_irq(&timer->lock); in snd_timer_proc_read()
1274 resolution = snd_timer_hw_resolution(timer); in snd_timer_proc_read()
1275 spin_unlock_irq(&timer->lock); in snd_timer_proc_read()
1280 timer->hw.ticks); in snd_timer_proc_read()
1281 if (timer->hw.flags & SNDRV_TIMER_HW_SLAVE) in snd_timer_proc_read()
1284 list_for_each_entry(ti, &timer->open_list_head, open_list) in snd_timer_proc_read()
1545 static void snd_timer_user_copy_id(struct snd_timer_id *id, struct snd_timer *timer) in snd_timer_user_copy_id() argument
1547 id->dev_class = timer->tmr_class; in snd_timer_user_copy_id()
1549 id->card = timer->card ? timer->card->number : -1; in snd_timer_user_copy_id()
1550 id->device = timer->tmr_device; in snd_timer_user_copy_id()
1551 id->subdevice = timer->tmr_subdevice; in snd_timer_user_copy_id()
1557 struct snd_timer *timer; in snd_timer_user_next_device() local
1567 timer = list_entry(snd_timer_list.next, in snd_timer_user_next_device()
1569 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1576 timer = list_entry(p, struct snd_timer, device_list); in snd_timer_user_next_device()
1577 if (timer->tmr_class > SNDRV_TIMER_CLASS_GLOBAL) { in snd_timer_user_next_device()
1578 snd_timer_user_copy_id(&id, timer); 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()
1604 timer = list_entry(p, struct snd_timer, device_list); in snd_timer_user_next_device()
1605 if (timer->tmr_class > id.dev_class) { in snd_timer_user_next_device()
1606 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1609 if (timer->tmr_class < id.dev_class) in snd_timer_user_next_device()
1611 if (timer->card->number > id.card) { in snd_timer_user_next_device()
1612 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1615 if (timer->card->number < id.card) in snd_timer_user_next_device()
1617 if (timer->tmr_device > id.device) { in snd_timer_user_next_device()
1618 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1621 if (timer->tmr_device < id.device) in snd_timer_user_next_device()
1623 if (timer->tmr_subdevice > id.subdevice) { in snd_timer_user_next_device()
1624 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1627 if (timer->tmr_subdevice < id.subdevice) in snd_timer_user_next_device()
1629 snd_timer_user_copy_id(&id, timer); in snd_timer_user_next_device()
1814 t = tu->timeri->timer; in snd_timer_user_info()
1846 t = tu->timeri->timer; in snd_timer_user_params()
2021 /* start timer instead of continue if it's not used before */ in snd_timer_user_continue()
2295 /* unregister the system timer */
2298 struct snd_timer *timer, *n; in snd_timer_free_all() local
2300 list_for_each_entry_safe(timer, n, &snd_timer_list, device_list) in snd_timer_free_all()
2301 snd_timer_free(timer); in snd_timer_free_all()
2317 dev_set_name(timer_dev, "timer"); in alsa_timer_init()
2321 "system timer"); in alsa_timer_init()
2326 pr_err("ALSA: unable to register system timer (%i)\n", err); in alsa_timer_init()
2333 pr_err("ALSA: unable to register timer device (%i)\n", err); in alsa_timer_init()