]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: memalloc: Fix regression with SNDRV_DMA_TYPE_CONTINUOUS
authorTakashi Iwai <tiwai@suse.de>
Sun, 1 Aug 2021 11:38:01 +0000 (13:38 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 2 Aug 2021 07:03:22 +0000 (09:03 +0200)
commita7d2bd4bc2c2854d65862293b55485d352ef0ac0
treec3949b70ee92c464c307f01ca215a53cef12fcdf
parent6a8fd0fe020e113343dd0abe752d870d7d2621eb
ALSA: memalloc: Fix regression with SNDRV_DMA_TYPE_CONTINUOUS

The recent code refactoring made the mmap of continuous pages to be
done via the own helper snd_dma_continuous_mmap() with
remap_pfn_range().  There I overlooked that dmab->addr isn't set for
the allocation with SNDRV_DMA_TYPE_CONTINUOUS.  This resulted always
in an error at mmap with this buffer type on the system such as
Intel SST Baytrail driver.

This patch fixes the regression by passing the correct address.

Fixes: 2e4597348a67 ("ALSA: core: Add continuous and vmalloc mmap ops")
Reported-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/8d6674da-7d7b-803e-acc9-7de6cb1223fa@redhat.com
Link: https://lore.kernel.org/r/20210801113801.31290-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/memalloc.c