diff options
Diffstat (limited to 'sound/soc/atmel/atmel-pcm.c')
-rw-r--r-- | sound/soc/atmel/atmel-pcm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/atmel/atmel-pcm.c b/sound/soc/atmel/atmel-pcm.c index 60de05525c06..a21ff459e5d3 100644 --- a/sound/soc/atmel/atmel-pcm.c +++ b/sound/soc/atmel/atmel-pcm.c | |||
@@ -367,7 +367,6 @@ static u64 atmel_pcm_dmamask = 0xffffffff; | |||
367 | static int atmel_pcm_new(struct snd_soc_pcm_runtime *rtd) | 367 | static int atmel_pcm_new(struct snd_soc_pcm_runtime *rtd) |
368 | { | 368 | { |
369 | struct snd_card *card = rtd->card->snd_card; | 369 | struct snd_card *card = rtd->card->snd_card; |
370 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
371 | struct snd_pcm *pcm = rtd->pcm; | 370 | struct snd_pcm *pcm = rtd->pcm; |
372 | int ret = 0; | 371 | int ret = 0; |
373 | 372 | ||
@@ -376,14 +375,14 @@ static int atmel_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
376 | if (!card->dev->coherent_dma_mask) | 375 | if (!card->dev->coherent_dma_mask) |
377 | card->dev->coherent_dma_mask = 0xffffffff; | 376 | card->dev->coherent_dma_mask = 0xffffffff; |
378 | 377 | ||
379 | if (dai->driver->playback.channels_min) { | 378 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
380 | ret = atmel_pcm_preallocate_dma_buffer(pcm, | 379 | ret = atmel_pcm_preallocate_dma_buffer(pcm, |
381 | SNDRV_PCM_STREAM_PLAYBACK); | 380 | SNDRV_PCM_STREAM_PLAYBACK); |
382 | if (ret) | 381 | if (ret) |
383 | goto out; | 382 | goto out; |
384 | } | 383 | } |
385 | 384 | ||
386 | if (dai->driver->capture.channels_min) { | 385 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
387 | pr_debug("atmel-pcm:" | 386 | pr_debug("atmel-pcm:" |
388 | "Allocating PCM capture DMA buffer\n"); | 387 | "Allocating PCM capture DMA buffer\n"); |
389 | ret = atmel_pcm_preallocate_dma_buffer(pcm, | 388 | ret = atmel_pcm_preallocate_dma_buffer(pcm, |