aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/jz4740/jz4740-pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/jz4740/jz4740-pcm.c')
-rw-r--r--sound/soc/jz4740/jz4740-pcm.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/jz4740/jz4740-pcm.c b/sound/soc/jz4740/jz4740-pcm.c
index 710059292318..1d7ef28585e1 100644
--- a/sound/soc/jz4740/jz4740-pcm.c
+++ b/sound/soc/jz4740/jz4740-pcm.c
@@ -297,19 +297,15 @@ static void jz4740_pcm_free(struct snd_pcm *pcm)
297 } 297 }
298} 298}
299 299
300static u64 jz4740_pcm_dmamask = DMA_BIT_MASK(32);
301
302static int jz4740_pcm_new(struct snd_soc_pcm_runtime *rtd) 300static int jz4740_pcm_new(struct snd_soc_pcm_runtime *rtd)
303{ 301{
304 struct snd_card *card = rtd->card->snd_card; 302 struct snd_card *card = rtd->card->snd_card;
305 struct snd_pcm *pcm = rtd->pcm; 303 struct snd_pcm *pcm = rtd->pcm;
306 int ret = 0; 304 int ret;
307
308 if (!card->dev->dma_mask)
309 card->dev->dma_mask = &jz4740_pcm_dmamask;
310 305
311 if (!card->dev->coherent_dma_mask) 306 ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32));
312 card->dev->coherent_dma_mask = DMA_BIT_MASK(32); 307 if (ret)
308 return ret;
313 309
314 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { 310 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
315 ret = jz4740_pcm_preallocate_dma_buffer(pcm, 311 ret = jz4740_pcm_preallocate_dma_buffer(pcm,