linux-brain/sound/soc/intel
Takashi Iwai 9c1c449dcc ASoC: intel: atom: Fix breakage for PCM buffer address setup
[ Upstream commit 65ca89c2b12cca0d473f3dd54267568ad3af55cc ]

The commit 2e6b836312a4 ("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: 2e6b836312a4 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-08-26 08:36:21 -04:00
..
atom ASoC: intel: atom: Fix breakage for PCM buffer address setup 2021-08-26 08:36:21 -04:00
baytrail Merge branch 'asoc-5.4' into asoc-next 2019-09-09 14:55:20 +01:00
boards ASoC: Intel: kbl_da7219_max98357a: shrink platform_id below 20 characters 2021-07-20 16:10:45 +02:00
common ASoC: Intel: kbl_da7219_max98357a: shrink platform_id below 20 characters 2021-07-20 16:10:45 +02:00
haswell ASoC: Intel: hsw: remove i386 build warning w/ size_t argument 2019-08-13 12:40:46 +01:00
skylake ASoC: Intel: Skylake: Zero snd_ctl_elem_value 2021-02-13 13:52:55 +01:00
Kconfig ASoC: SOF: Intel: Broadwell: clarify mutual exclusion with legacy driver 2020-01-17 19:48:34 +01:00
Makefile ASoC: Intel: Fix Kconfig with top-level selector 2018-01-08 16:18:48 +00:00