diff options
author | Takashi Iwai <tiwai@suse.de> | 2025-07-09 19:04:05 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2025-07-11 10:55:36 +0300 |
commit | b2660d1ebde1ba8f3edf963f3aac2bea884457c3 (patch) | |
tree | fac0ac69b4e1c770c8f8d0f42469e4a14801c9c0 | |
parent | ed677858d4fe8d165952c1794898d6fc0b65ddfe (diff) | |
download | linux-b2660d1ebde1ba8f3edf963f3aac2bea884457c3.tar.xz |
ALSA: hda: Move HD-audio core stuff into sound/hda/core
This is a part of HD-audio code restructuring.
Simply move the current code of sound/hda/* into the subdirectory
sound/hda/core, so that more stuff can be moved into sound/hda cleanly
later.
Most of file names with hdac_ and hdac_ext_ prefix are renamed without
the prefix, since they can be identified well in the directory name
and superfluous.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-3-tiwai@suse.de
-rw-r--r-- | sound/hda/Kconfig | 67 | ||||
-rw-r--r-- | sound/hda/Makefile | 22 | ||||
-rw-r--r-- | sound/hda/core/Kconfig | 67 | ||||
-rw-r--r-- | sound/hda/core/Makefile | 22 | ||||
-rw-r--r-- | sound/hda/core/array.c (renamed from sound/hda/array.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/bus.c (renamed from sound/hda/hdac_bus.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/component.c (renamed from sound/hda/hdac_component.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/controller.c (renamed from sound/hda/hdac_controller.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/device.c (renamed from sound/hda/hdac_device.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/ext/Makefile (renamed from sound/hda/ext/Makefile) | 2 | ||||
-rw-r--r-- | sound/hda/core/ext/bus.c (renamed from sound/hda/ext/hdac_ext_bus.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/ext/controller.c (renamed from sound/hda/ext/hdac_ext_controller.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/ext/stream.c (renamed from sound/hda/ext/hdac_ext_stream.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/hda_bus_type.c (renamed from sound/hda/hda_bus_type.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/hdmi_chmap.c (renamed from sound/hda/hdmi_chmap.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/i915.c (renamed from sound/hda/hdac_i915.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/intel-dsp-config.c (renamed from sound/hda/intel-dsp-config.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/intel-nhlt.c (renamed from sound/hda/intel-nhlt.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/intel-sdw-acpi.c (renamed from sound/hda/intel-sdw-acpi.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/local.h (renamed from sound/hda/local.h) | 0 | ||||
-rw-r--r-- | sound/hda/core/regmap.c (renamed from sound/hda/hdac_regmap.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/stream.c (renamed from sound/hda/hdac_stream.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/sysfs.c (renamed from sound/hda/hdac_sysfs.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/trace.c (renamed from sound/hda/trace.c) | 0 | ||||
-rw-r--r-- | sound/hda/core/trace.h (renamed from sound/hda/trace.h) | 0 |
25 files changed, 92 insertions, 88 deletions
diff --git a/sound/hda/Kconfig b/sound/hda/Kconfig index eb488a522572..e38014656077 100644 --- a/sound/hda/Kconfig +++ b/sound/hda/Kconfig @@ -1,67 +1,2 @@ # SPDX-License-Identifier: GPL-2.0-only -config SND_HDA_CORE - tristate - select REGMAP - -config SND_HDA_DSP_LOADER - bool - -config SND_HDA_ALIGNED_MMIO - bool - -config SND_HDA_COMPONENT - bool - -config SND_HDA_I915 - bool - select SND_HDA_COMPONENT - -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. - # A fallback is provided so that the code compiles in all cases. - -config SND_INTEL_DSP_CONFIG - tristate - select ACPI_NHLT if ACPI - select SND_INTEL_NHLT if ACPI - select SND_INTEL_SOUNDWIRE_ACPI if ACPI - # this config should be selected only for Intel DSP platforms. - # A fallback is provided so that the code compiles in all cases. - -config SND_INTEL_SOUNDWIRE_ACPI - tristate - -config SND_INTEL_BYT_PREFER_SOF - bool "Prefer SOF driver over SST on BY/CHT platforms" - depends on SND_SST_ATOM_HIFI2_PLATFORM_ACPI && SND_SOC_SOF_BAYTRAIL - default n - help - The kernel has 2 drivers for the Low Power Engine audio-block on - Bay- and Cherry-Trail SoCs. The old SST driver and the new SOF - driver. If both drivers are enabled then the kernel will default - to using the old SST driver, unless told otherwise through the - snd_intel_dspcfg.dsp_driver module-parameter. - - Set this option to Y to make the kernel default to the new SOF - driver instead. +source "sound/hda/core/Kconfig" diff --git a/sound/hda/Makefile b/sound/hda/Makefile index 83cceafe0d4c..3fdbc22b1530 100644 --- a/sound/hda/Makefile +++ b/sound/hda/Makefile @@ -1,22 +1,2 @@ # SPDX-License-Identifier: GPL-2.0 -snd-hda-core-y := hda_bus_type.o hdac_bus.o hdac_device.o hdac_sysfs.o \ - hdac_regmap.o hdac_controller.o hdac_stream.o array.o hdmi_chmap.o - -snd-hda-core-y += trace.o -CFLAGS_trace.o := -I$(src) - -# for sync with i915 gfx driver -snd-hda-core-$(CONFIG_SND_HDA_COMPONENT) += hdac_component.o -snd-hda-core-$(CONFIG_SND_HDA_I915) += hdac_i915.o - -obj-$(CONFIG_SND_HDA_CORE) += snd-hda-core.o - -#extended hda -obj-$(CONFIG_SND_HDA_EXT_CORE) += ext/ - -snd-intel-dspcfg-y := intel-dsp-config.o -snd-intel-dspcfg-$(CONFIG_SND_INTEL_NHLT) += intel-nhlt.o -obj-$(CONFIG_SND_INTEL_DSP_CONFIG) += snd-intel-dspcfg.o - -snd-intel-sdw-acpi-y := intel-sdw-acpi.o -obj-$(CONFIG_SND_INTEL_SOUNDWIRE_ACPI) += snd-intel-sdw-acpi.o +obj-y += core/ diff --git a/sound/hda/core/Kconfig b/sound/hda/core/Kconfig new file mode 100644 index 000000000000..eb488a522572 --- /dev/null +++ b/sound/hda/core/Kconfig @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: GPL-2.0-only +config SND_HDA_CORE + tristate + select REGMAP + +config SND_HDA_DSP_LOADER + bool + +config SND_HDA_ALIGNED_MMIO + bool + +config SND_HDA_COMPONENT + bool + +config SND_HDA_I915 + bool + select SND_HDA_COMPONENT + +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. + # A fallback is provided so that the code compiles in all cases. + +config SND_INTEL_DSP_CONFIG + tristate + select ACPI_NHLT if ACPI + select SND_INTEL_NHLT if ACPI + select SND_INTEL_SOUNDWIRE_ACPI if ACPI + # this config should be selected only for Intel DSP platforms. + # A fallback is provided so that the code compiles in all cases. + +config SND_INTEL_SOUNDWIRE_ACPI + tristate + +config SND_INTEL_BYT_PREFER_SOF + bool "Prefer SOF driver over SST on BY/CHT platforms" + depends on SND_SST_ATOM_HIFI2_PLATFORM_ACPI && SND_SOC_SOF_BAYTRAIL + default n + help + The kernel has 2 drivers for the Low Power Engine audio-block on + Bay- and Cherry-Trail SoCs. The old SST driver and the new SOF + driver. If both drivers are enabled then the kernel will default + to using the old SST driver, unless told otherwise through the + snd_intel_dspcfg.dsp_driver module-parameter. + + Set this option to Y to make the kernel default to the new SOF + driver instead. diff --git a/sound/hda/core/Makefile b/sound/hda/core/Makefile new file mode 100644 index 000000000000..89cb46143050 --- /dev/null +++ b/sound/hda/core/Makefile @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: GPL-2.0 +snd-hda-core-y := hda_bus_type.o bus.o device.o sysfs.o \ + regmap.o controller.o stream.o array.o hdmi_chmap.o + +snd-hda-core-y += trace.o +CFLAGS_trace.o := -I$(src) + +# for sync with i915 gfx driver +snd-hda-core-$(CONFIG_SND_HDA_COMPONENT) += component.o +snd-hda-core-$(CONFIG_SND_HDA_I915) += i915.o + +obj-$(CONFIG_SND_HDA_CORE) += snd-hda-core.o + +#extended hda +obj-$(CONFIG_SND_HDA_EXT_CORE) += ext/ + +snd-intel-dspcfg-y := intel-dsp-config.o +snd-intel-dspcfg-$(CONFIG_SND_INTEL_NHLT) += intel-nhlt.o +obj-$(CONFIG_SND_INTEL_DSP_CONFIG) += snd-intel-dspcfg.o + +snd-intel-sdw-acpi-y := intel-sdw-acpi.o +obj-$(CONFIG_SND_INTEL_SOUNDWIRE_ACPI) += snd-intel-sdw-acpi.o diff --git a/sound/hda/array.c b/sound/hda/core/array.c index a204dcee0034..a204dcee0034 100644 --- a/sound/hda/array.c +++ b/sound/hda/core/array.c diff --git a/sound/hda/hdac_bus.c b/sound/hda/core/bus.c index d497414a5538..d497414a5538 100644 --- a/sound/hda/hdac_bus.c +++ b/sound/hda/core/bus.c diff --git a/sound/hda/hdac_component.c b/sound/hda/core/component.c index 9c82a2864a2f..9c82a2864a2f 100644 --- a/sound/hda/hdac_component.c +++ b/sound/hda/core/component.c diff --git a/sound/hda/hdac_controller.c b/sound/hda/core/controller.c index b5c833b9f8b9..b5c833b9f8b9 100644 --- a/sound/hda/hdac_controller.c +++ b/sound/hda/core/controller.c diff --git a/sound/hda/hdac_device.c b/sound/hda/core/device.c index 018f9e176b1b..018f9e176b1b 100644 --- a/sound/hda/hdac_device.c +++ b/sound/hda/core/device.c diff --git a/sound/hda/ext/Makefile b/sound/hda/core/ext/Makefile index 05883fb28d28..85190a7eb5de 100644 --- a/sound/hda/ext/Makefile +++ b/sound/hda/core/ext/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -snd-hda-ext-core-y := hdac_ext_bus.o hdac_ext_controller.o hdac_ext_stream.o +snd-hda-ext-core-y := bus.o controller.o stream.o obj-$(CONFIG_SND_HDA_EXT_CORE) += snd-hda-ext-core.o diff --git a/sound/hda/ext/hdac_ext_bus.c b/sound/hda/core/ext/bus.c index 6004ea1c373e..6004ea1c373e 100644 --- a/sound/hda/ext/hdac_ext_bus.c +++ b/sound/hda/core/ext/bus.c diff --git a/sound/hda/ext/hdac_ext_controller.c b/sound/hda/core/ext/controller.c index c84754434d16..c84754434d16 100644 --- a/sound/hda/ext/hdac_ext_controller.c +++ b/sound/hda/core/ext/controller.c diff --git a/sound/hda/ext/hdac_ext_stream.c b/sound/hda/core/ext/stream.c index a3ac738f1130..a3ac738f1130 100644 --- a/sound/hda/ext/hdac_ext_stream.c +++ b/sound/hda/core/ext/stream.c diff --git a/sound/hda/hda_bus_type.c b/sound/hda/core/hda_bus_type.c index eb72a7af2e56..eb72a7af2e56 100644 --- a/sound/hda/hda_bus_type.c +++ b/sound/hda/core/hda_bus_type.c diff --git a/sound/hda/hdmi_chmap.c b/sound/hda/core/hdmi_chmap.c index 7b276047f85a..7b276047f85a 100644 --- a/sound/hda/hdmi_chmap.c +++ b/sound/hda/core/hdmi_chmap.c diff --git a/sound/hda/hdac_i915.c b/sound/hda/core/i915.c index e9425213320e..e9425213320e 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/core/i915.c diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/core/intel-dsp-config.c index 3cb1e7fc3b3b..3cb1e7fc3b3b 100644 --- a/sound/hda/intel-dsp-config.c +++ b/sound/hda/core/intel-dsp-config.c diff --git a/sound/hda/intel-nhlt.c b/sound/hda/core/intel-nhlt.c index 6d72a871bda0..6d72a871bda0 100644 --- a/sound/hda/intel-nhlt.c +++ b/sound/hda/core/intel-nhlt.c diff --git a/sound/hda/intel-sdw-acpi.c b/sound/hda/core/intel-sdw-acpi.c index d3511135f7d3..d3511135f7d3 100644 --- a/sound/hda/intel-sdw-acpi.c +++ b/sound/hda/core/intel-sdw-acpi.c diff --git a/sound/hda/local.h b/sound/hda/core/local.h index 5f03b203c416..5f03b203c416 100644 --- a/sound/hda/local.h +++ b/sound/hda/core/local.h diff --git a/sound/hda/hdac_regmap.c b/sound/hda/core/regmap.c index 97cee096a286..97cee096a286 100644 --- a/sound/hda/hdac_regmap.c +++ b/sound/hda/core/regmap.c diff --git a/sound/hda/hdac_stream.c b/sound/hda/core/stream.c index e7f6208af5b0..e7f6208af5b0 100644 --- a/sound/hda/hdac_stream.c +++ b/sound/hda/core/stream.c diff --git a/sound/hda/hdac_sysfs.c b/sound/hda/core/sysfs.c index bffe52859dba..bffe52859dba 100644 --- a/sound/hda/hdac_sysfs.c +++ b/sound/hda/core/sysfs.c diff --git a/sound/hda/trace.c b/sound/hda/core/trace.c index ca2d6bd94518..ca2d6bd94518 100644 --- a/sound/hda/trace.c +++ b/sound/hda/core/trace.c diff --git a/sound/hda/trace.h b/sound/hda/core/trace.h index 280c42f3eb75..280c42f3eb75 100644 --- a/sound/hda/trace.h +++ b/sound/hda/core/trace.h |