mirror_ubuntu-kernels/sound/soc/intel/atom
Takashi Iwai 65ca89c2b1 ASoC: intel: atom: Fix breakage for PCM buffer address setup
The commit 2e6b836312 ("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: 2e6b836312 ("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>
2021-08-19 17:57:51 +02:00
..
sst ASoC: Intel: atom: fix kernel-doc 2021-03-10 13:08:47 +00:00
Makefile ASoC: Intel: atom: Remove duplicate kconfigs 2020-10-14 20:29:54 +01:00
sst-atom-controls.c ASoC: Intel: atom: use inclusive language for SSP bclk/fsync 2020-11-13 14:22:07 +00:00
sst-atom-controls.h ASoC: Intel: atom: use inclusive language for SSP bclk/fsync 2020-11-13 14:22:07 +00:00
sst-mfld-dsp.h ASoC: Intel: Fix a typo 2021-04-01 12:18:12 +01:00
sst-mfld-platform-compress.c ASoC: Intel: Atom: compress: remove redundant assignment 2020-08-18 11:50:09 +01:00
sst-mfld-platform-pcm.c ASoC: intel: atom: Fix breakage for PCM buffer address setup 2021-08-19 17:57:51 +02:00
sst-mfld-platform.h ASoC: Intel: Atom: (cosmetic) align parameters 2020-08-18 11:50:17 +01:00