aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/imx/imx-ssi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/imx/imx-ssi.c')
-rw-r--r--sound/soc/imx/imx-ssi.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c
index 56f46a75d297..80b4fee2442b 100644
--- a/sound/soc/imx/imx-ssi.c
+++ b/sound/soc/imx/imx-ssi.c
@@ -39,6 +39,7 @@
39#include <linux/interrupt.h> 39#include <linux/interrupt.h>
40#include <linux/module.h> 40#include <linux/module.h>
41#include <linux/platform_device.h> 41#include <linux/platform_device.h>
42#include <linux/slab.h>
42 43
43#include <sound/core.h> 44#include <sound/core.h>
44#include <sound/initval.h> 45#include <sound/initval.h>
@@ -234,17 +235,20 @@ static int imx_ssi_hw_params(struct snd_pcm_substream *substream,
234 struct snd_soc_dai *cpu_dai) 235 struct snd_soc_dai *cpu_dai)
235{ 236{
236 struct imx_ssi *ssi = cpu_dai->private_data; 237 struct imx_ssi *ssi = cpu_dai->private_data;
238 struct imx_pcm_dma_params *dma_data;
237 u32 reg, sccr; 239 u32 reg, sccr;
238 240
239 /* Tx/Rx config */ 241 /* Tx/Rx config */
240 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 242 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
241 reg = SSI_STCCR; 243 reg = SSI_STCCR;
242 cpu_dai->dma_data = &ssi->dma_params_tx; 244 dma_data = &ssi->dma_params_tx;
243 } else { 245 } else {
244 reg = SSI_SRCCR; 246 reg = SSI_SRCCR;
245 cpu_dai->dma_data = &ssi->dma_params_rx; 247 dma_data = &ssi->dma_params_rx;
246 } 248 }
247 249
250 snd_soc_dai_set_dma_data(cpu_dai, substream, dma_data);
251
248 sccr = readl(ssi->base + reg) & ~SSI_STCCR_WL_MASK; 252 sccr = readl(ssi->base + reg) & ~SSI_STCCR_WL_MASK;
249 253
250 /* DAI data (word) size */ 254 /* DAI data (word) size */
@@ -652,7 +656,8 @@ static int imx_ssi_probe(struct platform_device *pdev)
652 dai->private_data = ssi; 656 dai->private_data = ssi;
653 657
654 if ((cpu_is_mx27() || cpu_is_mx21()) && 658 if ((cpu_is_mx27() || cpu_is_mx21()) &&
655 !(ssi->flags & IMX_SSI_USE_AC97)) { 659 !(ssi->flags & IMX_SSI_USE_AC97) &&
660 (ssi->flags & IMX_SSI_DMA)) {
656 ssi->flags |= IMX_SSI_DMA; 661 ssi->flags |= IMX_SSI_DMA;
657 platform = imx_ssi_dma_mx2_init(pdev, ssi); 662 platform = imx_ssi_dma_mx2_init(pdev, ssi);
658 } else 663 } else