diff options
Diffstat (limited to 'sound/soc/pxa/pxa2xx-pcm.c')
-rw-r--r-- | sound/soc/pxa/pxa2xx-pcm.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c index 806da27b8b67..d58b09f4f7a4 100644 --- a/sound/soc/pxa/pxa2xx-pcm.c +++ b/sound/soc/pxa/pxa2xx-pcm.c | |||
@@ -87,18 +87,15 @@ static struct snd_pcm_ops pxa2xx_pcm_ops = { | |||
87 | .mmap = pxa2xx_pcm_mmap, | 87 | .mmap = pxa2xx_pcm_mmap, |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static u64 pxa2xx_pcm_dmamask = DMA_BIT_MASK(32); | ||
91 | |||
92 | static int pxa2xx_soc_pcm_new(struct snd_soc_pcm_runtime *rtd) | 90 | static int pxa2xx_soc_pcm_new(struct snd_soc_pcm_runtime *rtd) |
93 | { | 91 | { |
94 | struct snd_card *card = rtd->card->snd_card; | 92 | struct snd_card *card = rtd->card->snd_card; |
95 | struct snd_pcm *pcm = rtd->pcm; | 93 | struct snd_pcm *pcm = rtd->pcm; |
96 | int ret = 0; | 94 | int ret; |
97 | 95 | ||
98 | if (!card->dev->dma_mask) | 96 | ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32)); |
99 | card->dev->dma_mask = &pxa2xx_pcm_dmamask; | 97 | if (ret) |
100 | if (!card->dev->coherent_dma_mask) | 98 | return ret; |
101 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | ||
102 | 99 | ||
103 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { | 100 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
104 | ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, | 101 | ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, |