aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/pxa/Kconfig2
-rw-r--r--sound/soc/pxa/mmp-pcm.c18
2 files changed, 4 insertions, 16 deletions
diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig
index 4db74a083db1..6473052b6899 100644
--- a/sound/soc/pxa/Kconfig
+++ b/sound/soc/pxa/Kconfig
@@ -11,7 +11,7 @@ config SND_PXA2XX_SOC
11config SND_MMP_SOC 11config SND_MMP_SOC
12 bool "Soc Audio for Marvell MMP chips" 12 bool "Soc Audio for Marvell MMP chips"
13 depends on ARCH_MMP 13 depends on ARCH_MMP
14 select SND_DMAENGINE_PCM 14 select SND_SOC_GENERIC_DMAENGINE_PCM
15 select SND_ARM 15 select SND_ARM
16 help 16 help
17 Say Y if you want to add support for codecs attached to 17 Say Y if you want to add support for codecs attached to
diff --git a/sound/soc/pxa/mmp-pcm.c b/sound/soc/pxa/mmp-pcm.c
index 7929e19b0ef5..682ee52942bf 100644
--- a/sound/soc/pxa/mmp-pcm.c
+++ b/sound/soc/pxa/mmp-pcm.c
@@ -67,27 +67,15 @@ static int mmp_pcm_hw_params(struct snd_pcm_substream *substream,
67 struct snd_pcm_hw_params *params) 67 struct snd_pcm_hw_params *params)
68{ 68{
69 struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream); 69 struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream);
70 struct snd_soc_pcm_runtime *rtd = substream->private_data;
71 struct snd_dmaengine_dai_dma_data *dma_params;
72 struct dma_slave_config slave_config; 70 struct dma_slave_config slave_config;
73 int ret; 71 int ret;
74 72
75 dma_params = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); 73 ret =
76 if (!dma_params) 74 snd_dmaengine_pcm_prepare_slave_config(substream, params,
77 return 0; 75 &slave_config);
78
79 ret = snd_hwparams_to_dma_slave_config(substream, params, &slave_config);
80 if (ret) 76 if (ret)
81 return ret; 77 return ret;
82 78
83 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
84 slave_config.dst_addr = dma_params->addr;
85 slave_config.dst_maxburst = 4;
86 } else {
87 slave_config.src_addr = dma_params->addr;
88 slave_config.src_maxburst = 4;
89 }
90
91 ret = dmaengine_slave_config(chan, &slave_config); 79 ret = dmaengine_slave_config(chan, &slave_config);
92 if (ret) 80 if (ret)
93 return ret; 81 return ret;