ASoC: core: Update DMA mask for hostless pcm devices

Hostless pcm device coherent DMA mask is hardcorded to 32.
Update it based on size of dma address to support both
32 and 64 bit

Change-Id: I604d440cfd5abcf473ec87b18b5cc6ee8ff42b49
Signed-off-by: Neema Shetty <nshetty@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
This commit is contained in:
Neema Shetty 2013-09-23 23:45:24 -07:00 committed by David Keitel
parent 4b0ad86df7
commit 20040e1da8

View file

@ -942,7 +942,8 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
if (rtd->dai_link->no_host_mode == SND_SOC_DAI_LINK_NO_HOST) {
substream->dma_buffer.dev.type = SNDRV_DMA_TYPE_DEV;
substream->dma_buffer.dev.dev = rtd->dev;
substream->dma_buffer.dev.dev->coherent_dma_mask = DMA_BIT_MASK(32);
substream->dma_buffer.dev.dev->coherent_dma_mask =
DMA_BIT_MASK(sizeof(dma_addr_t) * 8);
substream->dma_buffer.private_data = NULL;
ret = snd_pcm_lib_malloc_pages(substream, PAGE_SIZE);