diff options
Diffstat (limited to 'sound/soc/jz4740/jz4740-pcm.c')
-rw-r--r-- | sound/soc/jz4740/jz4740-pcm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/jz4740/jz4740-pcm.c b/sound/soc/jz4740/jz4740-pcm.c index 50cda9ea9156..9b8cf256847d 100644 --- a/sound/soc/jz4740/jz4740-pcm.c +++ b/sound/soc/jz4740/jz4740-pcm.c | |||
@@ -302,7 +302,6 @@ static u64 jz4740_pcm_dmamask = DMA_BIT_MASK(32); | |||
302 | static int jz4740_pcm_new(struct snd_soc_pcm_runtime *rtd) | 302 | static int jz4740_pcm_new(struct snd_soc_pcm_runtime *rtd) |
303 | { | 303 | { |
304 | struct snd_card *card = rtd->card->snd_card; | 304 | struct snd_card *card = rtd->card->snd_card; |
305 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
306 | struct snd_pcm *pcm = rtd->pcm; | 305 | struct snd_pcm *pcm = rtd->pcm; |
307 | int ret = 0; | 306 | int ret = 0; |
308 | 307 | ||
@@ -312,14 +311,14 @@ static int jz4740_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
312 | if (!card->dev->coherent_dma_mask) | 311 | if (!card->dev->coherent_dma_mask) |
313 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | 312 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); |
314 | 313 | ||
315 | if (dai->driver->playback.channels_min) { | 314 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
316 | ret = jz4740_pcm_preallocate_dma_buffer(pcm, | 315 | ret = jz4740_pcm_preallocate_dma_buffer(pcm, |
317 | SNDRV_PCM_STREAM_PLAYBACK); | 316 | SNDRV_PCM_STREAM_PLAYBACK); |
318 | if (ret) | 317 | if (ret) |
319 | goto err; | 318 | goto err; |
320 | } | 319 | } |
321 | 320 | ||
322 | if (dai->driver->capture.channels_min) { | 321 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
323 | ret = jz4740_pcm_preallocate_dma_buffer(pcm, | 322 | ret = jz4740_pcm_preallocate_dma_buffer(pcm, |
324 | SNDRV_PCM_STREAM_CAPTURE); | 323 | SNDRV_PCM_STREAM_CAPTURE); |
325 | if (ret) | 324 | if (ret) |