diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-11-04 19:08:46 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-11-04 22:10:03 +0100 |
commit | 7599acb7b9a1e33a410e33f13791647fba94e84f (patch) | |
tree | 0b2cbb3a200b7f0ec9044c1c8245f29ba8381f02 /include/sound/memalloc.h | |
parent | ALSA: hda/realtek: Add a quirk for Acer Spin SP513-54N (diff) | |
download | linux-7599acb7b9a1e33a410e33f13791647fba94e84f.tar.xz linux-7599acb7b9a1e33a410e33f13791647fba94e84f.zip |
Revert "ALSA: memalloc: Convert x86 SG-buffer handling with non-contiguous type"
This reverts commit 2d9ea39917a4e4293bc2caea902c7059a330b611.
We've got a regression report showing that the audio got broken the
device over AMD IOMMU. The conversion assumed the wrong pointer /
page mapping for the indirect mapping case, and we need to correct
this urgently, so let's revert it for now.
Fixes: 2d9ea39917a4 ("ALSA: memalloc: Convert x86 SG-buffer handling with non-contiguous type")
Reported-and-tested-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Link: https://lore.kernel.org/r/20211104180846.16340-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/memalloc.h')
-rw-r--r-- | include/sound/memalloc.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h index 653dfffb3ac8..1051b84e8579 100644 --- a/include/sound/memalloc.h +++ b/include/sound/memalloc.h @@ -36,6 +36,13 @@ struct snd_dma_device { #define SNDRV_DMA_TYPE_CONTINUOUS 1 /* continuous no-DMA memory */ #define SNDRV_DMA_TYPE_DEV 2 /* generic device continuous */ #define SNDRV_DMA_TYPE_DEV_WC 5 /* continuous write-combined */ +#ifdef CONFIG_SND_DMA_SGBUF +#define SNDRV_DMA_TYPE_DEV_SG 3 /* generic device SG-buffer */ +#define SNDRV_DMA_TYPE_DEV_WC_SG 6 /* SG write-combined */ +#else +#define SNDRV_DMA_TYPE_DEV_SG SNDRV_DMA_TYPE_DEV /* no SG-buf support */ +#define SNDRV_DMA_TYPE_DEV_WC_SG SNDRV_DMA_TYPE_DEV_WC +#endif #ifdef CONFIG_GENERIC_ALLOCATOR #define SNDRV_DMA_TYPE_DEV_IRAM 4 /* generic device iram-buffer */ #else @@ -44,13 +51,6 @@ struct snd_dma_device { #define SNDRV_DMA_TYPE_VMALLOC 7 /* vmalloc'ed buffer */ #define SNDRV_DMA_TYPE_NONCONTIG 8 /* non-coherent SG buffer */ #define SNDRV_DMA_TYPE_NONCOHERENT 9 /* non-coherent buffer */ -#ifdef CONFIG_SND_DMA_SGBUF -#define SNDRV_DMA_TYPE_DEV_SG SNDRV_DMA_TYPE_NONCONTIG -#define SNDRV_DMA_TYPE_DEV_WC_SG 6 /* SG write-combined */ -#else -#define SNDRV_DMA_TYPE_DEV_SG SNDRV_DMA_TYPE_DEV /* no SG-buf support */ -#define SNDRV_DMA_TYPE_DEV_WC_SG SNDRV_DMA_TYPE_DEV_WC -#endif /* * info for buffer allocation |