Commit 95f6ecf4 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Zefan Li

ASoC: omap-pcm: Correct dma mask

commit d51199a8 upstream.

DMA_BIT_MASK of 64 is not valid dma address mask for OMAPs, it should be
set to 32.
The 64 was introduced by commit (in 2009):
a152ff24 ASoC: OMAP: Make DMA 64 aligned

But the dma_mask and coherent_dma_mask can not be used to specify alignment.

Fixes: a152ff24 (ASoC: OMAP: Make DMA 64 aligned)
Reported-by: default avatarGrygorii Strashko <Grygorii.Strashko@linaro.org>
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
[lizf: Backported to 3.4: there's no dma_coerce_mask_and_coherent()]
Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
parent 4863cbc4
...@@ -333,7 +333,7 @@ static struct snd_pcm_ops omap_pcm_ops = { ...@@ -333,7 +333,7 @@ static struct snd_pcm_ops omap_pcm_ops = {
.mmap = omap_pcm_mmap, .mmap = omap_pcm_mmap,
}; };
static u64 omap_pcm_dmamask = DMA_BIT_MASK(64); static u64 omap_pcm_dmamask = DMA_BIT_MASK(32);
static int omap_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, static int omap_pcm_preallocate_dma_buffer(struct snd_pcm *pcm,
int stream) int stream)
...@@ -384,7 +384,7 @@ static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd) ...@@ -384,7 +384,7 @@ static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd)
if (!card->dev->dma_mask) if (!card->dev->dma_mask)
card->dev->dma_mask = &omap_pcm_dmamask; card->dev->dma_mask = &omap_pcm_dmamask;
if (!card->dev->coherent_dma_mask) if (!card->dev->coherent_dma_mask)
card->dev->coherent_dma_mask = DMA_BIT_MASK(64); card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
ret = omap_pcm_preallocate_dma_buffer(pcm, ret = omap_pcm_preallocate_dma_buffer(pcm,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment