]> git.baikalelectronics.ru Git - 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)
committerMark Brown <broonie@kernel.org>
Wed, 16 Mar 2022 16:39:27 +0000 (16:39 +0000)
commita34e874e75e3d2e5f61207c033d128865ecec2a3
tree1f9f08f5a23cc4f363b1631a5fa26615a9a4dbcf
parentfd337bd173fc0e19b9a19f3de9a470af19b4426d
ASoC: amd: Fix reference to PCM buffer address

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: 198057ccf524b ("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>
sound/soc/amd/vangogh/acp5x-pcm-dma.c