[PATCH 04/27] ALSA: hda: Move CONFIG_SND_HDA_PREALLOC_SIZE into sound/hda/common

Takashi Iwai
2025-07-09T16:12:42Z

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 <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 d1e2bfd24c11..f38e1947fb3e 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 eb488a522572..bfdcf6384c52 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.50.0