mirror of
https://github.com/torvalds/linux.git
synced 2026-12-02 11:34:58 +00:00
ASoC: intel: atom: Fix breakage for PCM buffer address setup
The commit2e6b836312("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 <[email protected]> Cc: <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
@@ -127,7 +127,7 @@ static void sst_fill_alloc_params(struct snd_pcm_substream *substream,
|
||||
snd_pcm_uframes_t period_size;
|
||||
ssize_t periodbytes;
|
||||
ssize_t buffer_bytes = snd_pcm_lib_buffer_bytes(substream);
|
||||
u32 buffer_addr = substream->runtime->dma_addr;
|
||||
u32 buffer_addr = virt_to_phys(substream->runtime->dma_area);
|
||||
|
||||
channels = substream->runtime->channels;
|
||||
period_size = substream->runtime->period_size;
|
||||
|
||||
Reference in New Issue
Block a user