Lines Matching refs:timer
11 #include <sound/timer.h>
44 "pcm timer resolution out of range (rate = %u, period_size = %lu)\n",
52 static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer)
56 substream = timer->private_data;
60 static int snd_pcm_timer_start(struct snd_timer * timer)
64 substream = snd_timer_chip(timer);
69 static int snd_pcm_timer_stop(struct snd_timer * timer)
73 substream = snd_timer_chip(timer);
92 static void snd_pcm_timer_free(struct snd_timer *timer)
94 struct snd_pcm_substream *substream = timer->private_data;
95 substream->timer = NULL;
101 struct snd_timer *timer;
108 if (snd_timer_new(substream->pcm->card, "PCM", &tid, &timer) < 0)
110 sprintf(timer->name, "PCM %s %i-%i-%i",
114 timer->hw = snd_pcm_timer;
115 if (snd_device_register(timer->card, timer) < 0) {
116 snd_device_free(timer->card, timer);
119 timer->private_data = substream;
120 timer->private_free = snd_pcm_timer_free;
121 substream->timer = timer;
126 if (substream->timer) {
127 snd_device_free(substream->pcm->card, substream->timer);
128 substream->timer = NULL;