diff options
Diffstat (limited to 'sound/soc/mid-x86/sst_platform.c')
-rw-r--r-- | sound/soc/mid-x86/sst_platform.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c index b2e9198a983a..6b1f9d3bf34e 100644 --- a/sound/soc/mid-x86/sst_platform.c +++ b/sound/soc/mid-x86/sst_platform.c | |||
@@ -116,18 +116,20 @@ struct snd_soc_dai_driver sst_platform_dai[] = { | |||
116 | static inline void sst_set_stream_status(struct sst_runtime_stream *stream, | 116 | static inline void sst_set_stream_status(struct sst_runtime_stream *stream, |
117 | int state) | 117 | int state) |
118 | { | 118 | { |
119 | spin_lock(&stream->status_lock); | 119 | unsigned long flags; |
120 | spin_lock_irqsave(&stream->status_lock, flags); | ||
120 | stream->stream_status = state; | 121 | stream->stream_status = state; |
121 | spin_unlock(&stream->status_lock); | 122 | spin_unlock_irqrestore(&stream->status_lock, flags); |
122 | } | 123 | } |
123 | 124 | ||
124 | static inline int sst_get_stream_status(struct sst_runtime_stream *stream) | 125 | static inline int sst_get_stream_status(struct sst_runtime_stream *stream) |
125 | { | 126 | { |
126 | int state; | 127 | int state; |
128 | unsigned long flags; | ||
127 | 129 | ||
128 | spin_lock(&stream->status_lock); | 130 | spin_lock_irqsave(&stream->status_lock, flags); |
129 | state = stream->stream_status; | 131 | state = stream->stream_status; |
130 | spin_unlock(&stream->status_lock); | 132 | spin_unlock_irqrestore(&stream->status_lock, flags); |
131 | return state; | 133 | return state; |
132 | } | 134 | } |
133 | 135 | ||
@@ -374,6 +376,11 @@ static int sst_platform_pcm_hw_params(struct snd_pcm_substream *substream, | |||
374 | return 0; | 376 | return 0; |
375 | } | 377 | } |
376 | 378 | ||
379 | static int sst_platform_pcm_hw_free(struct snd_pcm_substream *substream) | ||
380 | { | ||
381 | return snd_pcm_lib_free_pages(substream); | ||
382 | } | ||
383 | |||
377 | static struct snd_pcm_ops sst_platform_ops = { | 384 | static struct snd_pcm_ops sst_platform_ops = { |
378 | .open = sst_platform_open, | 385 | .open = sst_platform_open, |
379 | .close = sst_platform_close, | 386 | .close = sst_platform_close, |
@@ -382,6 +389,7 @@ static struct snd_pcm_ops sst_platform_ops = { | |||
382 | .trigger = sst_platform_pcm_trigger, | 389 | .trigger = sst_platform_pcm_trigger, |
383 | .pointer = sst_platform_pcm_pointer, | 390 | .pointer = sst_platform_pcm_pointer, |
384 | .hw_params = sst_platform_pcm_hw_params, | 391 | .hw_params = sst_platform_pcm_hw_params, |
392 | .hw_free = sst_platform_pcm_hw_free, | ||
385 | }; | 393 | }; |
386 | 394 | ||
387 | static void sst_pcm_free(struct snd_pcm *pcm) | 395 | static void sst_pcm_free(struct snd_pcm *pcm) |