diff options
Diffstat (limited to 'sound/soc/blackfin/bf5xx-tdm-pcm.c')
-rw-r--r-- | sound/soc/blackfin/bf5xx-tdm-pcm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/blackfin/bf5xx-tdm-pcm.c b/sound/soc/blackfin/bf5xx-tdm-pcm.c index 4406f9a865ae..254490cf1876 100644 --- a/sound/soc/blackfin/bf5xx-tdm-pcm.c +++ b/sound/soc/blackfin/bf5xx-tdm-pcm.c | |||
@@ -286,7 +286,6 @@ static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32); | |||
286 | static int bf5xx_pcm_tdm_new(struct snd_soc_pcm_runtime *rtd) | 286 | static int bf5xx_pcm_tdm_new(struct snd_soc_pcm_runtime *rtd) |
287 | { | 287 | { |
288 | struct snd_card *card = rtd->card->snd_card; | 288 | struct snd_card *card = rtd->card->snd_card; |
289 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
290 | struct snd_pcm *pcm = rtd->pcm; | 289 | struct snd_pcm *pcm = rtd->pcm; |
291 | int ret = 0; | 290 | int ret = 0; |
292 | 291 | ||
@@ -295,14 +294,14 @@ static int bf5xx_pcm_tdm_new(struct snd_soc_pcm_runtime *rtd) | |||
295 | if (!card->dev->coherent_dma_mask) | 294 | if (!card->dev->coherent_dma_mask) |
296 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | 295 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); |
297 | 296 | ||
298 | if (dai->driver->playback.channels_min) { | 297 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
299 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, | 298 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, |
300 | SNDRV_PCM_STREAM_PLAYBACK); | 299 | SNDRV_PCM_STREAM_PLAYBACK); |
301 | if (ret) | 300 | if (ret) |
302 | goto out; | 301 | goto out; |
303 | } | 302 | } |
304 | 303 | ||
305 | if (dai->driver->capture.channels_min) { | 304 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
306 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, | 305 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, |
307 | SNDRV_PCM_STREAM_CAPTURE); | 306 | SNDRV_PCM_STREAM_CAPTURE); |
308 | if (ret) | 307 | if (ret) |