diff options
Diffstat (limited to 'sound/core/pcm_timer.c')
-rw-r--r-- | sound/core/pcm_timer.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c index 20ecd8f18080..11389f13de73 100644 --- a/sound/core/pcm_timer.c +++ b/sound/core/pcm_timer.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
26 | #include <sound/timer.h> | 26 | #include <sound/timer.h> |
27 | 27 | ||
28 | #include "pcm_local.h" | ||
29 | |||
28 | /* | 30 | /* |
29 | * Timer functions | 31 | * Timer functions |
30 | */ | 32 | */ |
@@ -33,8 +35,8 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) | |||
33 | { | 35 | { |
34 | unsigned long rate, mult, fsize, l, post; | 36 | unsigned long rate, mult, fsize, l, post; |
35 | struct snd_pcm_runtime *runtime = substream->runtime; | 37 | struct snd_pcm_runtime *runtime = substream->runtime; |
36 | 38 | ||
37 | mult = 1000000000; | 39 | mult = 1000000000; |
38 | rate = runtime->rate; | 40 | rate = runtime->rate; |
39 | if (snd_BUG_ON(!rate)) | 41 | if (snd_BUG_ON(!rate)) |
40 | return; | 42 | return; |
@@ -65,7 +67,7 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) | |||
65 | static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer) | 67 | static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer) |
66 | { | 68 | { |
67 | struct snd_pcm_substream *substream; | 69 | struct snd_pcm_substream *substream; |
68 | 70 | ||
69 | substream = timer->private_data; | 71 | substream = timer->private_data; |
70 | return substream->runtime ? substream->runtime->timer_resolution : 0; | 72 | return substream->runtime ? substream->runtime->timer_resolution : 0; |
71 | } | 73 | } |
@@ -73,7 +75,7 @@ static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer) | |||
73 | static int snd_pcm_timer_start(struct snd_timer * timer) | 75 | static int snd_pcm_timer_start(struct snd_timer * timer) |
74 | { | 76 | { |
75 | struct snd_pcm_substream *substream; | 77 | struct snd_pcm_substream *substream; |
76 | 78 | ||
77 | substream = snd_timer_chip(timer); | 79 | substream = snd_timer_chip(timer); |
78 | substream->timer_running = 1; | 80 | substream->timer_running = 1; |
79 | return 0; | 81 | return 0; |
@@ -82,7 +84,7 @@ static int snd_pcm_timer_start(struct snd_timer * timer) | |||
82 | static int snd_pcm_timer_stop(struct snd_timer * timer) | 84 | static int snd_pcm_timer_stop(struct snd_timer * timer) |
83 | { | 85 | { |
84 | struct snd_pcm_substream *substream; | 86 | struct snd_pcm_substream *substream; |
85 | 87 | ||
86 | substream = snd_timer_chip(timer); | 88 | substream = snd_timer_chip(timer); |
87 | substream->timer_running = 0; | 89 | substream->timer_running = 0; |
88 | return 0; | 90 | return 0; |
@@ -112,7 +114,7 @@ void snd_pcm_timer_init(struct snd_pcm_substream *substream) | |||
112 | { | 114 | { |
113 | struct snd_timer_id tid; | 115 | struct snd_timer_id tid; |
114 | struct snd_timer *timer; | 116 | struct snd_timer *timer; |
115 | 117 | ||
116 | tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE; | 118 | tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE; |
117 | tid.dev_class = SNDRV_TIMER_CLASS_PCM; | 119 | tid.dev_class = SNDRV_TIMER_CLASS_PCM; |
118 | tid.card = substream->pcm->card->number; | 120 | tid.card = substream->pcm->card->number; |