ALSA: memalloc: Unify x86 SG-buffer handling (take#3)
authorTakashi Iwai <tiwai@suse.de>
Tue, 16 Nov 2021 07:33:58 +0000 (08:33 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 16 Nov 2021 07:34:29 +0000 (08:34 +0100)
commit2c95b92ecd92e784785b1db8cccc4f0f2bfa850c
tree5197cc151faa5bd6e9d02366f39cd0d2534c8570
parent7206998f578d5553989bc01ea2e544b622e79539
ALSA: memalloc: Unify x86 SG-buffer handling (take#3)

This is a second attempt to unify the x86-specific SG-buffer handling
code with the new standard non-contiguous page handler.

The first try (in commit 2d9ea39917a4) failed due to the wrong page
and address calculations, hence reverted.  (And the second try failed
due to a copy&paste error.)  Now it's corrected with the previous fix
for noncontig pages, and the proper sg page iteration by this patch.

After the migration, SNDRV_DMA_TYPE_DMA_SG becomes identical with
SNDRV_DMA_TYPE_NONCONTIG on x86, while others still fall back to
SNDRV_DMA_TYPE_DEV.

Tested-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Tested-by: Harald Arnesen <harald@skogtun.org>
Link: https://lore.kernel.org/r/20211017074859.24112-4-tiwai@suse.de
Link: https://lore.kernel.org/r/20211109062235.22310-1-tiwai@suse.de
Link: https://lore.kernel.org/r/20211116073358.19741-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/memalloc.h
sound/core/Makefile
sound/core/memalloc.c
sound/core/sgbuf.c [deleted file]