ASoC: use DMA addr rather than CPU pa for acp_audio_dma
authorYu Zhao <yuzhao@google.com>
Tue, 4 Dec 2018 22:42:52 +0000 (15:42 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 6 Dec 2018 12:53:04 +0000 (12:53 +0000)
commitd6d08273996b3363178b920ccfa74acabaf67963
treedb0aa557c36a9b2ab3b262a0d2bb9462b27cf012
parent20f2ab247d3b787af91c1aa5eb27c5061744c154
ASoC: use DMA addr rather than CPU pa for acp_audio_dma

We shouldn't assume CPU physical address we get from page_to_phys()
is same as DMA address we get from dma_alloc_coherent(). On x86_64,
we won't run into any problem with the assumption when dma_ops is
nommu_dma_ops. However, DMA address is IOVA when IOMMU is enabled.
And it's most likely different from CPU physical address when AMD
IOMMU is not in passthrough mode.

Signed-off-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp-pcm-dma.c
sound/soc/amd/acp.h