diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-09-12 17:52:25 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-09-12 18:02:18 +0200 |
commit | 0b9f2bd00fc3677e38ae5e46ff79b8d48d9cb02e (patch) | |
tree | 78ca421c467de117671f974bced38aea530c99a3 /sound/soc/sh/siu_dai.c | |
parent | ALSA: memalloc: Use proper DMA mapping API for x86 WC buffer allocations (diff) | |
download | linux-0b9f2bd00fc3677e38ae5e46ff79b8d48d9cb02e.tar.xz linux-0b9f2bd00fc3677e38ae5e46ff79b8d48d9cb02e.zip |
ALSA: memalloc: Use proper DMA mapping API for x86 S/G buffer allocations
The fallback S/G buffer allocation for x86 used the addresses deduced
from the page allocations blindly. It broke the allocations on IOMMU
and made us to work around with a hackish DMA ops check.
For cleaning up those messes, this patch switches to the proper DMA
mapping API usages with the standard sg-table instead.
By introducing the sg-table, the address table isn't needed, but for
keeping the original allocation sizes for freeing, replace it with the
array keeping the number of pages.
The get_addr callback is changed to use the existing one for
non-contiguous buffers. (Also it's the reason sg_table is put at the
beginning of struct snd_dma_sg_fallback.)
And finally, the hackish workaround that checks the DMA ops is
dropped now.
Link: https://patch.msgid.link/20240912155227.4078-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/sh/siu_dai.c')
0 files changed, 0 insertions, 0 deletions