Lines Matching refs:timer
26 #include <sound/timer.h>
70 snd_printk(KERN_ERR "pcm timer resolution out of range (rate = %u, period_size = %lu)\n", runtime->rate, runtime->period_size);
77 static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer)
81 substream = timer->private_data;
85 static int snd_pcm_timer_start(struct snd_timer * timer)
90 substream = snd_timer_chip(timer);
97 static int snd_pcm_timer_stop(struct snd_timer * timer)
102 substream = snd_timer_chip(timer);
123 static void snd_pcm_timer_free(struct snd_timer *timer)
125 struct snd_pcm_substream *substream = timer->private_data;
126 substream->timer = NULL;
132 struct snd_timer *timer;
139 if (snd_timer_new(substream->pcm->card, "PCM", &tid, &timer) < 0)
141 sprintf(timer->name, "PCM %s %i-%i-%i",
145 timer->hw = snd_pcm_timer;
146 if (snd_device_register(timer->card, timer) < 0) {
147 snd_device_free(timer->card, timer);
150 timer->private_data = substream;
151 timer->private_free = snd_pcm_timer_free;
152 substream->timer = timer;
157 if (substream->timer) {
158 snd_device_free(substream->pcm->card, substream->timer);
159 substream->timer = NULL;