[PATCH 3/3] ALSA: hda: Revert "ALSA: hda: Allow setting preallocation again for x86"
Amadeusz Sławiński
amadeuszx.slawinski at linux.intel.com
Thu Mar 18 16:11:22 CET 2021
This reverts commit f8e4ae10de43fbb7ce85f79e04eca2988b6b2c40.
On systems where there is a lot of FrontEnds, when
CONFIG_SND_HDA_PREALLOC_SIZE != 0 ALSA core allocates memory for each
FE, which may cause out of memory problems due to per card limit. Force
config to 0 on X86, so memory will be allocated on as needed basis.
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=201251#c322
Suggested-by: Takashi Iwai <tiwai at suse.de>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski at linux.intel.com>
---
sound/hda/Kconfig | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/hda/Kconfig b/sound/hda/Kconfig
index 57595f1552c9..741179ccbd4e 100644
--- a/sound/hda/Kconfig
+++ b/sound/hda/Kconfig
@@ -21,17 +21,16 @@ config SND_HDA_EXT_CORE
select SND_HDA_CORE
config SND_HDA_PREALLOC_SIZE
- int "Pre-allocated buffer size for HD-audio driver"
+ int "Pre-allocated buffer size for HD-audio driver" if !SND_DMA_SGBUF
range 0 32768
- default 2048 if SND_DMA_SGBUF
+ default 0 if SND_DMA_SGBUF
default 64 if !SND_DMA_SGBUF
help
Specifies the default pre-allocated buffer-size in kB for the
HD-audio driver. A larger buffer (e.g. 2048) is preferred
for systems using PulseAudio. The default 64 is chosen just
for compatibility reasons.
- On x86 systems, the default is 2048 as a reasonable value for
- most of modern systems.
+ On x86 systems, the default is zero as we need no preallocation.
Note that the pre-allocation size can be changed dynamically
via a proc file (/proc/asound/card*/pcm*/sub*/prealloc), too.
--
2.25.1
More information about the Alsa-devel
mailing list