diff options
Diffstat (limited to 'sound/soc/blackfin')
-rw-r--r-- | sound/soc/blackfin/bf5xx-ac97-pcm.c | 11 | ||||
-rw-r--r-- | sound/soc/blackfin/bf5xx-i2s-pcm.c | 10 |
2 files changed, 8 insertions, 13 deletions
diff --git a/sound/soc/blackfin/bf5xx-ac97-pcm.c b/sound/soc/blackfin/bf5xx-ac97-pcm.c index 53f84085bf1f..1d4c676eb6cc 100644 --- a/sound/soc/blackfin/bf5xx-ac97-pcm.c +++ b/sound/soc/blackfin/bf5xx-ac97-pcm.c | |||
@@ -415,19 +415,16 @@ static void bf5xx_pcm_free_dma_buffers(struct snd_pcm *pcm) | |||
415 | } | 415 | } |
416 | } | 416 | } |
417 | 417 | ||
418 | static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32); | ||
419 | |||
420 | static int bf5xx_pcm_ac97_new(struct snd_soc_pcm_runtime *rtd) | 418 | static int bf5xx_pcm_ac97_new(struct snd_soc_pcm_runtime *rtd) |
421 | { | 419 | { |
422 | struct snd_card *card = rtd->card->snd_card; | 420 | struct snd_card *card = rtd->card->snd_card; |
423 | struct snd_pcm *pcm = rtd->pcm; | 421 | struct snd_pcm *pcm = rtd->pcm; |
424 | int ret = 0; | 422 | int ret; |
425 | 423 | ||
426 | pr_debug("%s enter\n", __func__); | 424 | pr_debug("%s enter\n", __func__); |
427 | if (!card->dev->dma_mask) | 425 | ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32)); |
428 | card->dev->dma_mask = &bf5xx_pcm_dmamask; | 426 | if (ret) |
429 | if (!card->dev->coherent_dma_mask) | 427 | return ret; |
430 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | ||
431 | 428 | ||
432 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { | 429 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
433 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, | 430 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, |
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 | ||
326 | static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32); | ||
327 | |||
328 | static int bf5xx_pcm_i2s_new(struct snd_soc_pcm_runtime *rtd) | 326 | static 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); |