diff options
Diffstat (limited to 'sound/soc/imx/imx-pcm-dma-mx2.c')
-rw-r--r-- | sound/soc/imx/imx-pcm-dma-mx2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c index 86668ab3f4d4..2e79d7136298 100644 --- a/sound/soc/imx/imx-pcm-dma-mx2.c +++ b/sound/soc/imx/imx-pcm-dma-mx2.c | |||
@@ -84,11 +84,13 @@ static void snd_imx_dma_err_callback(int channel, void *data, int err) | |||
84 | static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream) | 84 | static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream) |
85 | { | 85 | { |
86 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 86 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
87 | struct imx_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; | 87 | struct imx_pcm_dma_params *dma_params; |
88 | struct snd_pcm_runtime *runtime = substream->runtime; | 88 | struct snd_pcm_runtime *runtime = substream->runtime; |
89 | struct imx_pcm_runtime_data *iprtd = runtime->private_data; | 89 | struct imx_pcm_runtime_data *iprtd = runtime->private_data; |
90 | int ret; | 90 | int ret; |
91 | 91 | ||
92 | dma_params = snd_soc_get_dma_data(rtd->dai->cpu_dai, substream); | ||
93 | |||
92 | iprtd->dma = imx_dma_request_by_prio(DRV_NAME, DMA_PRIO_HIGH); | 94 | iprtd->dma = imx_dma_request_by_prio(DRV_NAME, DMA_PRIO_HIGH); |
93 | if (iprtd->dma < 0) { | 95 | if (iprtd->dma < 0) { |
94 | pr_err("Failed to claim the audio DMA\n"); | 96 | pr_err("Failed to claim the audio DMA\n"); |
@@ -193,10 +195,12 @@ static int snd_imx_pcm_prepare(struct snd_pcm_substream *substream) | |||
193 | { | 195 | { |
194 | struct snd_pcm_runtime *runtime = substream->runtime; | 196 | struct snd_pcm_runtime *runtime = substream->runtime; |
195 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 197 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
196 | struct imx_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; | 198 | struct imx_pcm_dma_params *dma_params; |
197 | struct imx_pcm_runtime_data *iprtd = runtime->private_data; | 199 | struct imx_pcm_runtime_data *iprtd = runtime->private_data; |
198 | int err; | 200 | int err; |
199 | 201 | ||
202 | dma_params = snd_soc_get_dma_data(rtd->dai->cpu_dai, substream); | ||
203 | |||
200 | iprtd->substream = substream; | 204 | iprtd->substream = substream; |
201 | iprtd->buf = (unsigned int *)substream->dma_buffer.area; | 205 | iprtd->buf = (unsigned int *)substream->dma_buffer.area; |
202 | iprtd->period_cnt = 0; | 206 | iprtd->period_cnt = 0; |