Lines Matching refs:ti
497 static void snd_timer_notify1(struct snd_timer_instance *ti, int event) in snd_timer_notify1() argument
499 struct snd_timer *timer = ti->timer; in snd_timer_notify1()
515 if (ti->ccallback) in snd_timer_notify1()
516 ti->ccallback(ti, event, &tstamp, resolution); in snd_timer_notify1()
517 if (ti->flags & SNDRV_TIMER_IFLG_SLAVE) in snd_timer_notify1()
524 list_for_each_entry(ts, &ti->slave_active_head, active_list) in snd_timer_notify1()
750 struct snd_timer_instance *ti; in snd_timer_reschedule() local
753 list_for_each_entry(ti, &timer->active_list_head, active_list) { in snd_timer_reschedule()
754 if (ti->flags & SNDRV_TIMER_IFLG_START) { in snd_timer_reschedule()
755 ti->flags &= ~SNDRV_TIMER_IFLG_START; in snd_timer_reschedule()
756 ti->flags |= SNDRV_TIMER_IFLG_RUNNING; in snd_timer_reschedule()
759 if (ti->flags & SNDRV_TIMER_IFLG_RUNNING) { in snd_timer_reschedule()
760 if (ticks > ti->cticks) in snd_timer_reschedule()
761 ticks = ti->cticks; in snd_timer_reschedule()
779 struct snd_timer_instance *ti; in snd_timer_process_callbacks() local
783 ti = list_first_entry(head, struct snd_timer_instance, in snd_timer_process_callbacks()
787 list_del_init(&ti->ack_list); in snd_timer_process_callbacks()
789 if (!(ti->flags & SNDRV_TIMER_IFLG_DEAD)) { in snd_timer_process_callbacks()
790 ticks = ti->pticks; in snd_timer_process_callbacks()
791 ti->pticks = 0; in snd_timer_process_callbacks()
792 resolution = ti->resolution; in snd_timer_process_callbacks()
793 ti->flags |= SNDRV_TIMER_IFLG_CALLBACK; in snd_timer_process_callbacks()
795 if (ti->callback) in snd_timer_process_callbacks()
796 ti->callback(ti, resolution, ticks); in snd_timer_process_callbacks()
798 ti->flags &= ~SNDRV_TIMER_IFLG_CALLBACK; in snd_timer_process_callbacks()
842 struct snd_timer_instance *ti, *ts, *tmp; in snd_timer_interrupt() local
866 list_for_each_entry_safe(ti, tmp, &timer->active_list_head, in snd_timer_interrupt()
868 if (ti->flags & SNDRV_TIMER_IFLG_DEAD) in snd_timer_interrupt()
870 if (!(ti->flags & SNDRV_TIMER_IFLG_RUNNING)) in snd_timer_interrupt()
872 ti->pticks += ticks_left; in snd_timer_interrupt()
873 ti->resolution = resolution; in snd_timer_interrupt()
874 if (ti->cticks < ticks_left) in snd_timer_interrupt()
875 ti->cticks = 0; in snd_timer_interrupt()
877 ti->cticks -= ticks_left; in snd_timer_interrupt()
878 if (ti->cticks) /* not expired */ in snd_timer_interrupt()
880 if (ti->flags & SNDRV_TIMER_IFLG_AUTO) { in snd_timer_interrupt()
881 ti->cticks = ti->ticks; in snd_timer_interrupt()
883 ti->flags &= ~SNDRV_TIMER_IFLG_RUNNING; in snd_timer_interrupt()
885 list_del_init(&ti->active_list); in snd_timer_interrupt()
888 (ti->flags & SNDRV_TIMER_IFLG_FAST)) in snd_timer_interrupt()
892 if (list_empty(&ti->ack_list)) in snd_timer_interrupt()
893 list_add_tail(&ti->ack_list, ack_list_head); in snd_timer_interrupt()
894 list_for_each_entry(ts, &ti->slave_active_head, active_list) { in snd_timer_interrupt()
895 ts->pticks = ti->pticks; in snd_timer_interrupt()
994 struct snd_timer_instance *ti; in snd_timer_free() local
998 ti = list_entry(p, struct snd_timer_instance, open_list); in snd_timer_free()
999 ti->timer = NULL; in snd_timer_free()
1060 struct snd_timer_instance *ti; in snd_timer_dev_disconnect() local
1065 list_for_each_entry(ti, &timer->open_list_head, open_list) { in snd_timer_dev_disconnect()
1066 if (ti->disconnect) in snd_timer_dev_disconnect()
1067 ti->disconnect(ti); in snd_timer_dev_disconnect()
1077 struct snd_timer_instance *ti, *ts; in snd_timer_notify() local
1091 list_for_each_entry(ti, &timer->active_list_head, active_list) { in snd_timer_notify()
1092 if (ti->ccallback) in snd_timer_notify()
1093 ti->ccallback(ti, event, tstamp, resolution); in snd_timer_notify()
1094 list_for_each_entry(ts, &ti->slave_active_head, active_list) in snd_timer_notify()
1248 struct snd_timer_instance *ti; in snd_timer_proc_read() local
1280 list_for_each_entry(ti, &timer->open_list_head, open_list) in snd_timer_proc_read()
1282 ti->owner ? ti->owner : "unknown", in snd_timer_proc_read()
1283 (ti->flags & (SNDRV_TIMER_IFLG_START | in snd_timer_proc_read()