aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/fsl/fsl_dma.c')
-rw-r--r--sound/soc/fsl/fsl_dma.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 4f59bbaba48..96bb92dd174 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -311,23 +311,23 @@ static int fsl_dma_new(struct snd_soc_pcm_runtime *rtd)
311 * should allocate a DMA buffer only for the streams that are valid. 311 * should allocate a DMA buffer only for the streams that are valid.
312 */ 312 */
313 313
314 if (pcm->streams[0].substream) { 314 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
315 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, 315 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev,
316 fsl_dma_hardware.buffer_bytes_max, 316 fsl_dma_hardware.buffer_bytes_max,
317 &pcm->streams[0].substream->dma_buffer); 317 &pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer);
318 if (ret) { 318 if (ret) {
319 dev_err(card->dev, "can't alloc playback dma buffer\n"); 319 dev_err(card->dev, "can't alloc playback dma buffer\n");
320 return ret; 320 return ret;
321 } 321 }
322 } 322 }
323 323
324 if (pcm->streams[1].substream) { 324 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {
325 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, 325 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev,
326 fsl_dma_hardware.buffer_bytes_max, 326 fsl_dma_hardware.buffer_bytes_max,
327 &pcm->streams[1].substream->dma_buffer); 327 &pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->dma_buffer);
328 if (ret) { 328 if (ret) {
329 dev_err(card->dev, "can't alloc capture dma buffer\n"); 329 dev_err(card->dev, "can't alloc capture dma buffer\n");
330 snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer); 330 snd_dma_free_pages(&pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer);
331 return ret; 331 return ret;
332 } 332 }
333 } 333 }