diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-07-31 10:43:31 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-08-02 13:14:00 +0200 |
commit | 8b5d95313b6d30f642e4ed0125891984c446604e (patch) | |
tree | 13a26568ea814f2be05e1424ffe48757ce19d509 /sound/soc/amd/raven | |
parent | ASoC: nau8824: Fix open coded prefix handling (diff) | |
download | linux-8b5d95313b6d30f642e4ed0125891984c446604e.tar.xz linux-8b5d95313b6d30f642e4ed0125891984c446604e.zip |
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>
Diffstat (limited to 'sound/soc/amd/raven')
-rw-r--r-- | sound/soc/amd/raven/acp3x-pcm-dma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index 8148b0d22e88..597d7c4b2a6b 100644 --- a/sound/soc/amd/raven/acp3x-pcm-dma.c +++ b/sound/soc/amd/raven/acp3x-pcm-dma.c @@ -286,7 +286,7 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component, pr_err("pinfo failed\n"); } size = params_buffer_bytes(params); - rtd->dma_addr = substream->dma_buffer.addr; + rtd->dma_addr = substream->runtime->dma_addr; rtd->num_pages = (PAGE_ALIGN(size) >> PAGE_SHIFT); config_acp3x_dma(rtd, substream->stream); return 0; |