summaryrefslogtreecommitdiff
path: root/sound/soc/mid-x86
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2011-02-15 18:28:54 +0530
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-15 17:59:17 -0800
commit5b499f8bf376ecd1575c0cc2095555cf382063ae (patch)
treef6d33e8464f3d414bb2e93f73591523102d3531a /sound/soc/mid-x86
parentd58198b943c7af6975dec869d75b15dd66d1495c (diff)
ASoC: sst_platform: fix the pulseaudio error
Pulseaudio doesnt work with current driver and it was root caused to absense of hw_params function and malloc_pages in it. This patch adds this and allows pa to work fine with these drivers Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Harsha Priya <priya.harsha@intel.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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
return stream->stream_info.buffer_ptr;
}
+static int sst_platform_pcm_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
+{
+ snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
+ memset(substream->runtime->dma_area, 0, params_buffer_bytes(params));
+
+ return 0;
+}
static struct snd_pcm_ops sst_platform_ops = {
.open = sst_platform_open,
@@ -373,6 +381,7 @@ static struct snd_pcm_ops sst_platform_ops = {
.prepare = sst_platform_pcm_prepare,
.trigger = sst_platform_pcm_trigger,
.pointer = sst_platform_pcm_pointer,
+ .hw_params = sst_platform_pcm_hw_params,
};
static void sst_pcm_free(struct snd_pcm *pcm)