]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: hda: Move HD-audio core stuff into sound/hda/core
authorTakashi Iwai <tiwai@suse.de>
Wed, 9 Jul 2025 16:04:05 +0000 (18:04 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 11 Jul 2025 07:55:36 +0000 (09:55 +0200)
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
25 files changed:
sound/hda/Kconfig
sound/hda/Makefile
sound/hda/core/Kconfig [new file with mode: 0644]
sound/hda/core/Makefile [new file with mode: 0644]
sound/hda/core/array.c [moved from sound/hda/array.c with 100% similarity]
sound/hda/core/bus.c [moved from sound/hda/hdac_bus.c with 100% similarity]
sound/hda/core/component.c [moved from sound/hda/hdac_component.c with 100% similarity]
sound/hda/core/controller.c [moved from sound/hda/hdac_controller.c with 100% similarity]
sound/hda/core/device.c [moved from sound/hda/hdac_device.c with 100% similarity]
sound/hda/core/ext/Makefile [moved from sound/hda/ext/Makefile with 54% similarity]
sound/hda/core/ext/bus.c [moved from sound/hda/ext/hdac_ext_bus.c with 100% similarity]
sound/hda/core/ext/controller.c [moved from sound/hda/ext/hdac_ext_controller.c with 100% similarity]
sound/hda/core/ext/stream.c [moved from sound/hda/ext/hdac_ext_stream.c with 100% similarity]
sound/hda/core/hda_bus_type.c [moved from sound/hda/hda_bus_type.c with 100% similarity]
sound/hda/core/hdmi_chmap.c [moved from sound/hda/hdmi_chmap.c with 100% similarity]
sound/hda/core/i915.c [moved from sound/hda/hdac_i915.c with 100% similarity]
sound/hda/core/intel-dsp-config.c [moved from sound/hda/intel-dsp-config.c with 100% similarity]
sound/hda/core/intel-nhlt.c [moved from sound/hda/intel-nhlt.c with 100% similarity]
sound/hda/core/intel-sdw-acpi.c [moved from sound/hda/intel-sdw-acpi.c with 100% similarity]
sound/hda/core/local.h [moved from sound/hda/local.h with 100% similarity]
sound/hda/core/regmap.c [moved from sound/hda/hdac_regmap.c with 100% similarity]
sound/hda/core/stream.c [moved from sound/hda/hdac_stream.c with 100% similarity]
sound/hda/core/sysfs.c [moved from sound/hda/hdac_sysfs.c with 100% similarity]
sound/hda/core/trace.c [moved from sound/hda/trace.c with 100% similarity]
sound/hda/core/trace.h [moved from sound/hda/trace.h with 100% similarity]

index eb488a522572464bc1e6c1a7da8fedea1fbaca82..e380146560772f0db18cb1a3c9812b4b275a4548 100644 (file)
@@ -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"
index 83cceafe0d4c34668b41a8821bd90de857aca090..3fdbc22b153041bd514a9651d81312dc9f03dff1 100644 (file)
@@ -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 (file)
index 0000000..eb488a5
--- /dev/null
@@ -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 (file)
index 0000000..89cb461
--- /dev/null
@@ -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
similarity index 100%
rename from sound/hda/array.c
rename to sound/hda/core/array.c
similarity index 100%
rename from sound/hda/hdac_bus.c
rename to sound/hda/core/bus.c
similarity index 54%
rename from sound/hda/ext/Makefile
rename to sound/hda/core/ext/Makefile
index 05883fb28d289645c8e97e1b298e6e5288253e72..85190a7eb5de7bbd37f1170414eb5b09dbde7460 100644 (file)
@@ -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
similarity index 100%
rename from sound/hda/hdac_i915.c
rename to sound/hda/core/i915.c
similarity index 100%
rename from sound/hda/local.h
rename to sound/hda/core/local.h
similarity index 100%
rename from sound/hda/trace.c
rename to sound/hda/core/trace.c
similarity index 100%
rename from sound/hda/trace.h
rename to sound/hda/core/trace.h