kernel: modules: break-out WM8960 codec module
authorDaniel Golle <daniel@makrotopia.org>
Mon, 11 Dec 2023 00:24:40 +0000 (00:24 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 11 Dec 2023 18:01:43 +0000 (18:01 +0000)
Package codec module for WM8960 in its own package to be used by more
than one target.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
package/kernel/linux/modules/sound.mk
target/linux/ramips/modules.mk

index 2bfa146207aaf29f766dc29048cf2a459b607082..62a31bfb11f26bdb24a2afe2cd99fe80c272c081 100644 (file)
@@ -254,6 +254,18 @@ endef
 $(eval $(call KernelPackage,sound-soc-imx-sgtl5000))
 
 
+define KernelPackage/sound-soc-wm8960
+  TITLE:=SoC WM8960 codec support
+  KCONFIG:=CONFIG_SND_SOC_WM8960
+  FILES:=$(LINUX_DIR)/sound/soc/codecs/snd-soc-wm8960.ko
+  DEPENDS:=+kmod-sound-soc-core +kmod-i2c-core +kmod-regmap-i2c
+  AUTOLOAD:=$(call AutoProbe,snd-soc-wm8960)
+  $(call AddDepends/sound)
+endef
+
+$(eval $(call KernelPackage,sound-soc-wm8960))
+
+
 define KernelPackage/sound-soc-spdif
   TITLE:=SoC S/PDIF codec support
   KCONFIG:=CONFIG_SND_SOC_SPDIF
index 6f199c46a225c99c2a7f931f6e90a08af246aa80..1127a8f8ab7f4579ad5c2b1d75fe93b395fdd321 100644 (file)
@@ -113,18 +113,17 @@ $(eval $(call KernelPackage,hsdma-mtk))
 
 define KernelPackage/sound-mt7620
   TITLE:=MT7620 PCM/I2S Alsa Driver
-  DEPENDS:=@TARGET_ramips +kmod-sound-soc-core +kmod-regmap-i2c +kmod-dma-ralink @!TARGET_ramips_rt288x
+  DEPENDS:=@TARGET_ramips @!TARGET_ramips_rt288x +kmod-dma-ralink \
+       +kmod-sound-soc-core +kmod-sound-soc-wm8960
   KCONFIG:= \
        CONFIG_SND_RALINK_SOC_I2S \
        CONFIG_SND_SIMPLE_CARD \
-       CONFIG_SND_SIMPLE_CARD_UTILS \
-       CONFIG_SND_SOC_WM8960
+       CONFIG_SND_SIMPLE_CARD_UTILS
   FILES:= \
        $(LINUX_DIR)/sound/soc/ralink/snd-soc-ralink-i2s.ko \
        $(LINUX_DIR)/sound/soc/generic/snd-soc-simple-card.ko \
-       $(LINUX_DIR)/sound/soc/generic/snd-soc-simple-card-utils.ko \
-       $(LINUX_DIR)/sound/soc/codecs/snd-soc-wm8960.ko
-  AUTOLOAD:=$(call AutoLoad,90,snd-soc-wm8960 snd-soc-ralink-i2s snd-soc-simple-card)
+       $(LINUX_DIR)/sound/soc/generic/snd-soc-simple-card-utils.ko
+  AUTOLOAD:=$(call AutoLoad,90,snd-soc-ralink-i2s snd-soc-simple-card)
   $(call AddDepends/sound)
 endef