]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: amd: Fix reference to PCM buffer address
authorMeng Tang <tangmeng@uniontech.com>
Wed, 16 Mar 2022 09:13:03 +0000 (17:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:54 +0000 (13:57 +0200)
commit2bd8c27ae91a83c403fa3c427622873ce6eb7ec9
treef17c334de98e381c3214f2ad72105fb96acd007e
parentf8e89d84ea83c51ba3ba97ff154f7aa679326760
ASoC: amd: Fix reference to PCM buffer address

[ Upstream commit 54e1bf9f6177a3ffbd920474f4481a25361163aa ]

PCM buffers might be allocated dynamically when the buffer
preallocation failed or a larger buffer is requested, and it's not
guaranteed that substream->dma_buffer points to the actually used
buffer.  The driver needs to refer to substream->runtime->dma_addr
instead for the buffer address.

Fixes: cab396d8b22c1 ("ASoC: amd: add ACP5x pcm dma driver ops")
Signed-off-by: Meng Tang <tangmeng@uniontech.com>
Link: https://lore.kernel.org/r/20220316091303.9745-1-tangmeng@uniontech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/amd/vangogh/acp5x-pcm-dma.c