]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 09:57:24 +0000 (11:57 +0200)
commitddbeb37ba190c58b4cd03f2e22cdac91707133ee
tree4d261044048fcadd7da068c2f7623c580bef1dc2
parent3735be36671af20b3de45370bd3329b7f1ad5993
ASoC: amd: Fix reference to PCM buffer address

BugLink: https://bugs.launchpad.net/bugs/1969110
[ 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>
(cherry picked from commit c2e5f5d23718dbc4d9ce21c69d78d32f2eaa1ec8)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
sound/soc/amd/vangogh/acp5x-pcm-dma.c