]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: hda: Move controller drivers into sound/hda/controllers directory
authorTakashi Iwai <tiwai@suse.de>
Wed, 9 Jul 2025 16:04:08 +0000 (18:04 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 11 Jul 2025 07:55:37 +0000 (09:55 +0200)
Now HD-audio controller drivers are moved into sound/hda/controllers
directory as a part of HD-audio code reorganization.  Most of drivers
are independent from PCI bus, hence it makes more sense to put under
sound/hda.

The hda_ prefix is dropped from most of files at moving, as it's
more or less superfluous.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-6-tiwai@suse.de
sound/hda/Kconfig
sound/hda/Makefile
sound/hda/controllers/Kconfig [new file with mode: 0644]
sound/hda/controllers/Makefile [new file with mode: 0644]
sound/hda/controllers/acpi.c [moved from sound/pci/hda/hda_acpi.c with 100% similarity]
sound/hda/controllers/intel.c [moved from sound/pci/hda/hda_intel.c with 99% similarity]
sound/hda/controllers/intel.h [moved from sound/pci/hda/hda_intel.h with 100% similarity]
sound/hda/controllers/intel_trace.h [moved from sound/pci/hda/hda_intel_trace.h with 95% similarity]
sound/hda/controllers/tegra.c [moved from sound/pci/hda/hda_tegra.c with 100% similarity]
sound/pci/hda/Kconfig
sound/pci/hda/Makefile

index 2928cb570ec635f1da3cfddd33a880e77ae0c715..d360c884bd6d09cc939a075743e727b041e4282a 100644 (file)
@@ -2,6 +2,7 @@
 menu "HD-Audio"
 
 source "sound/hda/common/Kconfig"
+source "sound/hda/controllers/Kconfig"
 source "sound/hda/core/Kconfig"
 
 endmenu
index e7596bf736a467f821bc7b604b5627c8c33eae65..fc76086a1f5ede7dd863f7e8377c806afa72e18e 100644 (file)
@@ -1,3 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-y += core/
 obj-$(CONFIG_SND_HDA) += common/
+# this must be the last entry after codec drivers;
+# otherwise the codec patches won't be hooked before the PCI probe
+# when built in kernel
+obj-$(CONFIG_SND_HDA) += controllers/
diff --git a/sound/hda/controllers/Kconfig b/sound/hda/controllers/Kconfig
new file mode 100644 (file)
index 0000000..34721f5
--- /dev/null
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-only
+config SND_HDA_INTEL
+       tristate "HD Audio PCI"
+       depends on SND_PCI
+       select SND_HDA
+       select SND_INTEL_DSP_CONFIG
+       help
+         Say Y here to include support for Intel "High Definition
+         Audio" (Azalia) and its compatible devices.
+
+         This option enables the HD-audio controller.  Don't forget
+         to choose the appropriate HD-audio codec options.
+
+         To compile this driver as a module, choose M here: the module
+         will be called snd-hda-intel.
+
+config SND_HDA_TEGRA
+       tristate "NVIDIA Tegra HD Audio"
+       depends on ARCH_TEGRA
+       select SND_HDA
+       select SND_HDA_ALIGNED_MMIO
+       help
+         Say Y here to support the HDA controller present in NVIDIA
+         Tegra SoCs
+
+         This options enables support for the HD Audio controller
+         present in some NVIDIA Tegra SoCs, used to communicate audio
+         to the HDMI output.
+
+         To compile this driver as a module, choose M here: the module
+         will be called snd-hda-tegra.
+
+config SND_HDA_ACPI
+       tristate "HD Audio ACPI"
+       depends on ACPI
+       select SND_HDA
+       help
+         Say Y here to include support for Azalia-compatible HDA controllers
+         which are advertised via ACPI objects.
+
+         To compile this driver as a module, choose M here: the module
+         will be called snd-hda-acpi.
diff --git a/sound/hda/controllers/Makefile b/sound/hda/controllers/Makefile
new file mode 100644 (file)
index 0000000..a4bcd05
--- /dev/null
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0
+snd-hda-intel-y := intel.o
+snd-hda-tegra-y := tegra.o
+snd-hda-acpi-y := acpi.o
+
+subdir-ccflags-y += -I$(src)/../common
+
+# for trace-points
+CFLAGS_intel.o := -I$(src)
+
+obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-intel.o
+obj-$(CONFIG_SND_HDA_TEGRA) += snd-hda-tegra.o
+obj-$(CONFIG_SND_HDA_ACPI) += snd-hda-acpi.o
similarity index 99%
rename from sound/pci/hda/hda_intel.c
rename to sound/hda/controllers/intel.c
index 439cf1bda6e66387e99b12c16e4654095744c1f0..ebfc999156f4e0b9f66903a247588aa1eed96cd0 100644 (file)
 #include <linux/apple-gmux.h>
 #include <linux/firmware.h>
 #include <sound/hda_codec.h>
-#include "hda_controller.h"
-#include "hda_intel.h"
+#include "intel.h"
 
 #define CREATE_TRACE_POINTS
-#include "hda_intel_trace.h"
+#include "intel_trace.h"
 
 /* position fix mode */
 enum {
similarity index 95%
rename from sound/pci/hda/hda_intel_trace.h
rename to sound/hda/controllers/intel_trace.h
index 2775fa81a5007228965da9f31adb2f30aee77b94..fb10ab9e7e5527c9077d983fc901180c04075d01 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM hda_intel
-#define TRACE_INCLUDE_FILE hda_intel_trace
+#define TRACE_INCLUDE_FILE intel_trace
 
 #if !defined(_TRACE_HDA_INTEL_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_HDA_INTEL_H
index 1dfd56493d3997ef52318537ad39b870b27a4a1e..a5d345514cf3f02b27b9c9643ba49f72a19d6335 100644 (file)
@@ -4,48 +4,6 @@ menu "HD-Audio"
 config SND_HDA_GENERIC_LEDS
        bool
 
-config SND_HDA_INTEL
-       tristate "HD Audio PCI"
-       depends on SND_PCI
-       select SND_HDA
-       select SND_INTEL_DSP_CONFIG
-       help
-         Say Y here to include support for Intel "High Definition
-         Audio" (Azalia) and its compatible devices.
-
-         This option enables the HD-audio controller.  Don't forget
-         to choose the appropriate codec options below.
-
-         To compile this driver as a module, choose M here: the module
-         will be called snd-hda-intel.
-
-config SND_HDA_TEGRA
-       tristate "NVIDIA Tegra HD Audio"
-       depends on ARCH_TEGRA
-       select SND_HDA
-       select SND_HDA_ALIGNED_MMIO
-       help
-         Say Y here to support the HDA controller present in NVIDIA
-         Tegra SoCs
-
-         This options enables support for the HD Audio controller
-         present in some NVIDIA Tegra SoCs, used to communicate audio
-         to the HDMI output.
-
-         To compile this driver as a module, choose M here: the module
-         will be called snd-hda-tegra.
-
-config SND_HDA_ACPI
-       tristate "HD Audio ACPI"
-       depends on ACPI
-       select SND_HDA
-       help
-         Say Y here to include support for Azalia-compatible HDA controllers
-         which are advertised via ACPI objects.
-
-         To compile this driver as a module, choose M here: the module
-         will be called snd-hda-acpi.
-
 if SND_HDA
 
 config SND_HDA_CIRRUS_SCODEC
index 920011bb1b06c01b15ee36dcbd04510a0eb443a0..79de0af71ad4664f94f727551e930a685a8c6a5a 100644 (file)
@@ -1,11 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-snd-hda-intel-y := hda_intel.o
-snd-hda-tegra-y := hda_tegra.o
-snd-hda-acpi-y := hda_acpi.o
-
-# for trace-points
-CFLAGS_hda_intel.o := -I$(src)
-
 subdir-ccflags-y += -I$(src)/../../hda/common
 
 snd-hda-codec-generic-y :=     hda_generic.o
@@ -66,10 +59,3 @@ obj-$(CONFIG_SND_HDA_SCODEC_COMPONENT) += snd-hda-scodec-component.o
 obj-$(CONFIG_SND_HDA_SCODEC_TAS2781) += snd-hda-scodec-tas2781.o
 obj-$(CONFIG_SND_HDA_SCODEC_TAS2781_I2C) += snd-hda-scodec-tas2781-i2c.o
 obj-$(CONFIG_SND_HDA_SCODEC_TAS2781_SPI) += snd-hda-scodec-tas2781-spi.o
-
-# this must be the last entry after codec drivers;
-# otherwise the codec patches won't be hooked before the PCI probe
-# when built in kernel
-obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-intel.o
-obj-$(CONFIG_SND_HDA_TEGRA) += snd-hda-tegra.o
-obj-$(CONFIG_SND_HDA_ACPI) += snd-hda-acpi.o