From 146355ee880e6d15ba12e2baf5be70e5efe07796 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 9 Jul 2025 18:04:07 +0200 Subject: [PATCH] ALSA: hda: Move CONFIG_SND_HDA_PREALLOC_SIZE into sound/hda/common CONFIG_SND_HDA_PREALLOC_SIZE is used only by controller.c in sound/hda/common, hence it depends on CONFIG_SND_HDA. Move the definition to the right place inside SND_HDA if/endif block in sound/hda/common/Kconfig. Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250709160434.1859-5-tiwai@suse.de --- sound/hda/common/Kconfig | 17 +++++++++++++++++ sound/hda/core/Kconfig | 16 ---------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/sound/hda/common/Kconfig b/sound/hda/common/Kconfig index d1e2bfd24c117..f38e1947fb3eb 100644 --- a/sound/hda/common/Kconfig +++ b/sound/hda/common/Kconfig @@ -77,4 +77,21 @@ config SND_HDA_CTL_DEV_ID The old behaviour (Y) is obsolete and will be removed. Consider to not enable this option. + +config SND_HDA_PREALLOC_SIZE + int "Pre-allocated buffer size for HD-audio driver" + range 0 32768 + 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 zero as S/G allocation works + and no preallocation is needed in most cases. + + Note that the pre-allocation size can be changed dynamically + via a proc file (/proc/asound/card*/pcm*/sub*/prealloc), too. + endif diff --git a/sound/hda/core/Kconfig b/sound/hda/core/Kconfig index eb488a5225724..bfdcf6384c521 100644 --- a/sound/hda/core/Kconfig +++ b/sound/hda/core/Kconfig @@ -20,22 +20,6 @@ config SND_HDA_EXT_CORE tristate select SND_HDA_CORE -config SND_HDA_PREALLOC_SIZE - int "Pre-allocated buffer size for HD-audio driver" - range 0 32768 - 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 zero as S/G allocation works - and no preallocation is needed in most cases. - - Note that the pre-allocation size can be changed dynamically - via a proc file (/proc/asound/card*/pcm*/sub*/prealloc), too. - config SND_INTEL_NHLT bool # this config should be selected only for Intel ACPI platforms. -- 2.47.2