diff options
Diffstat (limited to 'sound/soc/blackfin/bf5xx-i2s-pcm.c')
-rw-r--r-- | sound/soc/blackfin/bf5xx-i2s-pcm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s-pcm.c b/sound/soc/blackfin/bf5xx-i2s-pcm.c index 6ec3d41b9b6d..63205d723eab 100644 --- a/sound/soc/blackfin/bf5xx-i2s-pcm.c +++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c | |||
@@ -260,7 +260,6 @@ static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32); | |||
260 | static int bf5xx_pcm_i2s_new(struct snd_soc_pcm_runtime *rtd) | 260 | static int bf5xx_pcm_i2s_new(struct snd_soc_pcm_runtime *rtd) |
261 | { | 261 | { |
262 | struct snd_card *card = rtd->card->snd_card; | 262 | struct snd_card *card = rtd->card->snd_card; |
263 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
264 | struct snd_pcm *pcm = rtd->pcm; | 263 | struct snd_pcm *pcm = rtd->pcm; |
265 | int ret = 0; | 264 | int ret = 0; |
266 | 265 | ||
@@ -270,14 +269,14 @@ static int bf5xx_pcm_i2s_new(struct snd_soc_pcm_runtime *rtd) | |||
270 | if (!card->dev->coherent_dma_mask) | 269 | if (!card->dev->coherent_dma_mask) |
271 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | 270 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); |
272 | 271 | ||
273 | if (dai->driver->playback.channels_min) { | 272 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
274 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, | 273 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, |
275 | SNDRV_PCM_STREAM_PLAYBACK); | 274 | SNDRV_PCM_STREAM_PLAYBACK); |
276 | if (ret) | 275 | if (ret) |
277 | goto out; | 276 | goto out; |
278 | } | 277 | } |
279 | 278 | ||
280 | if (dai->driver->capture.channels_min) { | 279 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
281 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, | 280 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, |
282 | SNDRV_PCM_STREAM_CAPTURE); | 281 | SNDRV_PCM_STREAM_CAPTURE); |
283 | if (ret) | 282 | if (ret) |