ASoC: intel: atom: Fix reference to PCM buffer address
authorTakashi Iwai <tiwai@suse.de>
Wed, 28 Jul 2021 11:23:50 +0000 (13:23 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 30 Jul 2021 16:20:49 +0000 (17:20 +0100)
commit2e6b836312a477d647a7920b56810a5a25f6c856
tree0301f96b71f25d4c22b73aa409441c6fc896bed7
parent926ef1a4c245c093acc07807e466ad2ef0ff6ccb
ASoC: intel: atom: 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 address should be retrieved from runtime->dma_addr,
instead of substream->dma_buffer (and shouldn't use virt_to_phys).

Also, remove the line overriding runtime->dma_area superfluously,
which was already set up at the PCM buffer allocation.

Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210728112353.6675-3-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/atom/sst-mfld-platform-pcm.c