ASoC: amd: Fix reference to PCM buffer address
authorTakashi Iwai <tiwai@suse.de>
Sat, 31 Jul 2021 08:43:31 +0000 (10:43 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 2 Aug 2021 11:14:00 +0000 (12:14 +0100)
commit8b5d95313b6d30f642e4ed0125891984c446604e
tree13a26568ea814f2be05e1424ffe48757ce19d509
parent1d25684e22516f1cff77176d288b1da02fff57bb
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.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210731084331.32225-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp-pcm-dma.c
sound/soc/amd/raven/acp3x-pcm-dma.c
sound/soc/amd/renoir/acp3x-pdm-dma.c