aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mid-x86
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/mid-x86')
-rw-r--r--sound/soc/mid-x86/sst_platform.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index 96e6e9c9c5f4..ee2c22475a76 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -365,6 +365,14 @@ static snd_pcm_uframes_t sst_platform_pcm_pointer
365 return stream->stream_info.buffer_ptr; 365 return stream->stream_info.buffer_ptr;
366} 366}
367 367
368static int sst_platform_pcm_hw_params(struct snd_pcm_substream *substream,
369 struct snd_pcm_hw_params *params)
370{
371 snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
372 memset(substream->runtime->dma_area, 0, params_buffer_bytes(params));
373
374 return 0;
375}
368 376
369static struct snd_pcm_ops sst_platform_ops = { 377static struct snd_pcm_ops sst_platform_ops = {
370 .open = sst_platform_open, 378 .open = sst_platform_open,
@@ -373,6 +381,7 @@ static struct snd_pcm_ops sst_platform_ops = {
373 .prepare = sst_platform_pcm_prepare, 381 .prepare = sst_platform_pcm_prepare,
374 .trigger = sst_platform_pcm_trigger, 382 .trigger = sst_platform_pcm_trigger,
375 .pointer = sst_platform_pcm_pointer, 383 .pointer = sst_platform_pcm_pointer,
384 .hw_params = sst_platform_pcm_hw_params,
376}; 385};
377 386
378static void sst_pcm_free(struct snd_pcm *pcm) 387static void sst_pcm_free(struct snd_pcm *pcm)