summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-11-12 23:17:30 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-11-12 23:17:30 +0300
commit0d5d74634f63d99a7c390ceb18375e43f7c71e86 (patch)
treeed31abf9dc2f5afb191aa0b6938779708ec915a8 /include
parent304ac8032d3fa2d37750969cd4b8d5736a1829d9 (diff)
parent0ca37273ee0a0b0dc0ef039421fbd16329ee2870 (diff)
downloadlinux-0d5d74634f63d99a7c390ceb18375e43f7c71e86.tar.xz
Merge tag 'sound-fix-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "A collection of fixes for 5.16-rc1, notably for a few regressions that were found in 5.15 and pre-rc1: - revert of the unification of SG-buffer helper functions on x86 and the relevant fix - regression fixes for mmap after the recent code refactoring - two NULL dereference fixes in HD-audio controller driver - UAF fixes in ALSA timer core - a few usual HD-audio and FireWire quirks" * tag 'sound-fix-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: fireworks: add support for Loud Onyx 1200f quirk ALSA: hda: fix general protection fault in azx_runtime_idle ALSA: hda: Free card instance properly at probe errors ALSA: hda/realtek: Add quirk for HP EliteBook 840 G7 mute LED ALSA: memalloc: Remove a stale comment ALSA: synth: missing check for possible NULL after the call to kstrdup ALSA: memalloc: Use proper SG helpers for noncontig allocations ALSA: pci: rme: Fix unaligned buffer addresses ALSA: firewire-motu: add support for MOTU Track 16 ALSA: PCM: Fix NULL dereference at mmap checks ALSA: hda/realtek: Add quirk for ASUS UX550VE ALSA: timer: Unconditionally unlink slave instances, too ALSA: memalloc: Catch call with NULL snd_dma_buffer pointer Revert "ALSA: memalloc: Convert x86 SG-buffer handling with non-contiguous type" ALSA: hda/realtek: Add a quirk for Acer Spin SP513-54N ALSA: firewire-motu: add support for MOTU Traveler mk3 ALSA: hda/realtek: Headset fixup for Clevo NH77HJQ ALSA: timer: Fix use-after-free problem
Diffstat (limited to 'include')
-rw-r--r--include/sound/memalloc.h14
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