]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: intel: atom: Fix breakage for PCM buffer address setup
authorTakashi Iwai <tiwai@suse.de>
Thu, 19 Aug 2021 15:29:45 +0000 (17:29 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 19 Aug 2021 15:57:51 +0000 (17:57 +0200)
commit8677a2f8babb27938d72ee1779f8ff397d977c48
treee87524ffb2d67b1c1aaff455b2b7229e0a7e49b8
parentc922038e98b3d2f471ee5c4f2c3d853b401ca238
ASoC: intel: atom: Fix breakage for PCM buffer address setup

The commit 08efd1af8e9a ("ASoC: intel: atom: Fix reference to PCM
buffer address") changed the reference of PCM buffer address to
substream->runtime->dma_addr as the buffer address may change
dynamically.  However, I forgot that the dma_addr field is still not
set up for the CONTINUOUS buffer type (that this driver uses) yet in
5.14 and earlier kernels, and it resulted in garbage I/O.  The problem
will be fixed in 5.15, but we need to address it quickly for now.

The fix is to deduce the address again from the DMA pointer with
virt_to_phys(), but from the right one, substream->runtime->dma_area.

Fixes: 08efd1af8e9a ("ASoC: intel: atom: Fix reference to PCM buffer address")
Reported-and-tested-by: Hans de Goede <hdegoede@redhat.com>
Cc: <stable@vger.kernel.org>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/2048c6aa-2187-46bd-6772-36a4fb3c5aeb@redhat.com
Link: https://lore.kernel.org/r/20210819152945.8510-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/intel/atom/sst-mfld-platform-pcm.c