aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin/bf5xx-i2s-pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/blackfin/bf5xx-i2s-pcm.c')
-rw-r--r--sound/soc/blackfin/bf5xx-i2s-pcm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s-pcm.c b/sound/soc/blackfin/bf5xx-i2s-pcm.c
index 9cb4a80df98e..2a5b43417fd5 100644
--- a/sound/soc/blackfin/bf5xx-i2s-pcm.c
+++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c
@@ -323,18 +323,16 @@ static struct snd_pcm_ops bf5xx_pcm_i2s_ops = {
323 .silence = bf5xx_pcm_silence, 323 .silence = bf5xx_pcm_silence,
324}; 324};
325 325
326static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32);
327
328static int bf5xx_pcm_i2s_new(struct snd_soc_pcm_runtime *rtd) 326static int bf5xx_pcm_i2s_new(struct snd_soc_pcm_runtime *rtd)
329{ 327{
330 struct snd_card *card = rtd->card->snd_card; 328 struct snd_card *card = rtd->card->snd_card;
331 size_t size = bf5xx_pcm_hardware.buffer_bytes_max; 329 size_t size = bf5xx_pcm_hardware.buffer_bytes_max;
330 int ret;
332 331
333 pr_debug("%s enter\n", __func__); 332 pr_debug("%s enter\n", __func__);
334 if (!card->dev->dma_mask) 333 ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32));
335 card->dev->dma_mask = &bf5xx_pcm_dmamask; 334 if (ret)
336 if (!card->dev->coherent_dma_mask) 335 return ret;
337 card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
338 336
339 return snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, 337 return snd_pcm_lib_preallocate_pages_for_all(rtd->pcm,
340 SNDRV_DMA_TYPE_DEV, card->dev, size, size); 338 SNDRV_DMA_TYPE_DEV, card->dev, size, size);