[PATCH] bcm27xx: add SND_SOC_AD193X_SPI to kernel configs

Stijn Tintel stijn at linux-ipv6.be
Thu Sep 30 09:58:29 PDT 2021


When building an image for the bcm27xx target, some combinations of
config options will fail to build due the SND_SOC_AD193X_SPI kernel
config symbol being missing.

The problem only occurs on bcm27xx as the target contains a patch that
modifies the Kconfig file containing the symbol. In the vanilla kernel,
there is no string after the TRISTATE keyword so the symbol is not
exposed.

The symbol depends on SPI_MASTER, which is exposed by either
kmod-mmc-spi, kmod-spi-bitbang, kmod-spi-dev, kmod-spi-bcm2835 or
kmod-spi-bcm2835-aux. It is defined in thesound/soc/codecs directory,
which is only included when SND_SOC is enabled, so this problem doesn't
occur when kmod-sound-soc-core is not enabled. As the
kmod-sound-soc-bcm2835-i2s package disables the SND_SOC_AD193X_SPI
symbol, it also doesn't occur when kmod-sound-soc-bcm2835-i2s is
enabled.

As there are several possible config combinations that do exhibit this
problem, it is best to solve it by adding the missing symbol to the
subtarget kernel configs. By doing this we can remove it from the
kmod-sound-soc-bcm2835-i2s package.

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 target/linux/bcm27xx/bcm2708/config-5.10 | 1 +
 target/linux/bcm27xx/bcm2708/config-5.4  | 1 +
 target/linux/bcm27xx/bcm2709/config-5.10 | 1 +
 target/linux/bcm27xx/bcm2709/config-5.4  | 1 +
 target/linux/bcm27xx/bcm2710/config-5.10 | 1 +
 target/linux/bcm27xx/bcm2710/config-5.4  | 1 +
 target/linux/bcm27xx/bcm2711/config-5.10 | 1 +
 target/linux/bcm27xx/bcm2711/config-5.4  | 1 +
 target/linux/bcm27xx/modules/sound.mk    | 1 -
 9 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/target/linux/bcm27xx/bcm2708/config-5.10 b/target/linux/bcm27xx/bcm2708/config-5.10
index 094765abdc..f49984ba8a 100644
--- a/target/linux/bcm27xx/bcm2708/config-5.10
+++ b/target/linux/bcm27xx/bcm2708/config-5.10
@@ -321,6 +321,7 @@ CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SG_POOL=y
 CONFIG_SMSC_PHY=y
+# CONFIG_SND_SOC_AD193X_SPI is not set
 CONFIG_SPARSE_IRQ=y
 CONFIG_SRCU=y
 # CONFIG_STRIP_ASM_SYMS is not set
diff --git a/target/linux/bcm27xx/bcm2708/config-5.4 b/target/linux/bcm27xx/bcm2708/config-5.4
index ef71076497..7ff6df894f 100644
--- a/target/linux/bcm27xx/bcm2708/config-5.4
+++ b/target/linux/bcm27xx/bcm2708/config-5.4
@@ -309,6 +309,7 @@ CONFIG_SERIAL_DEV_BUS=y
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SG_POOL=y
+# CONFIG_SND_SOC_AD193X_SPI is not set
 CONFIG_SPARSE_IRQ=y
 CONFIG_SRCU=y
 # CONFIG_STRIP_ASM_SYMS is not set
diff --git a/target/linux/bcm27xx/bcm2709/config-5.10 b/target/linux/bcm27xx/bcm2709/config-5.10
index 5b6c8b7edd..b441e1f0df 100644
--- a/target/linux/bcm27xx/bcm2709/config-5.10
+++ b/target/linux/bcm27xx/bcm2709/config-5.10
@@ -402,6 +402,7 @@ CONFIG_SG_POOL=y
 CONFIG_SMP=y
 CONFIG_SMP_ON_UP=y
 CONFIG_SMSC_PHY=y
+# CONFIG_SND_SOC_AD193X_SPI is not set
 CONFIG_SPARSE_IRQ=y
 CONFIG_SRCU=y
 # CONFIG_STRIP_ASM_SYMS is not set
diff --git a/target/linux/bcm27xx/bcm2709/config-5.4 b/target/linux/bcm27xx/bcm2709/config-5.4
index 4118d0f684..bd2fae45d2 100644
--- a/target/linux/bcm27xx/bcm2709/config-5.4
+++ b/target/linux/bcm27xx/bcm2709/config-5.4
@@ -399,6 +399,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SG_POOL=y
 CONFIG_SMP=y
 CONFIG_SMP_ON_UP=y
+# CONFIG_SND_SOC_AD193X_SPI is not set
 CONFIG_SPARSE_IRQ=y
 CONFIG_SRCU=y
 # CONFIG_STRIP_ASM_SYMS is not set
diff --git a/target/linux/bcm27xx/bcm2710/config-5.10 b/target/linux/bcm27xx/bcm2710/config-5.10
index 39818dabac..ff62955591 100644
--- a/target/linux/bcm27xx/bcm2710/config-5.10
+++ b/target/linux/bcm27xx/bcm2710/config-5.10
@@ -393,6 +393,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SG_POOL=y
 CONFIG_SMP=y
 CONFIG_SMSC_PHY=y
+# CONFIG_SND_SOC_AD193X_SPI is not set
 CONFIG_SPARSEMEM=y
 CONFIG_SPARSEMEM_EXTREME=y
 CONFIG_SPARSEMEM_MANUAL=y
diff --git a/target/linux/bcm27xx/bcm2710/config-5.4 b/target/linux/bcm27xx/bcm2710/config-5.4
index 1ad066e0d7..fc92df47f4 100644
--- a/target/linux/bcm27xx/bcm2710/config-5.4
+++ b/target/linux/bcm27xx/bcm2710/config-5.4
@@ -395,6 +395,7 @@ CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SG_POOL=y
 CONFIG_SMP=y
+# CONFIG_SND_SOC_AD193X_SPI is not set
 CONFIG_SPARSEMEM=y
 CONFIG_SPARSEMEM_EXTREME=y
 CONFIG_SPARSEMEM_MANUAL=y
diff --git a/target/linux/bcm27xx/bcm2711/config-5.10 b/target/linux/bcm27xx/bcm2711/config-5.10
index df7721107a..e20007654b 100644
--- a/target/linux/bcm27xx/bcm2711/config-5.10
+++ b/target/linux/bcm27xx/bcm2711/config-5.10
@@ -404,6 +404,7 @@ CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SG_POOL=y
 CONFIG_SMP=y
+# CONFIG_SND_SOC_AD193X_SPI is not set
 CONFIG_SPARSEMEM=y
 CONFIG_SPARSEMEM_EXTREME=y
 CONFIG_SPARSEMEM_MANUAL=y
diff --git a/target/linux/bcm27xx/bcm2711/config-5.4 b/target/linux/bcm27xx/bcm2711/config-5.4
index 89d087fa9e..7ccadbbaaf 100644
--- a/target/linux/bcm27xx/bcm2711/config-5.4
+++ b/target/linux/bcm27xx/bcm2711/config-5.4
@@ -407,6 +407,7 @@ CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SG_POOL=y
 CONFIG_SMP=y
+# CONFIG_SND_SOC_AD193X_SPI is not set
 CONFIG_SPARSEMEM=y
 CONFIG_SPARSEMEM_EXTREME=y
 CONFIG_SPARSEMEM_MANUAL=y
diff --git a/target/linux/bcm27xx/modules/sound.mk b/target/linux/bcm27xx/modules/sound.mk
index 5073e5ff50..b10d943626 100644
--- a/target/linux/bcm27xx/modules/sound.mk
+++ b/target/linux/bcm27xx/modules/sound.mk
@@ -26,7 +26,6 @@ define KernelPackage/sound-soc-bcm2835-i2s
   TITLE:=SoC Audio support for the Broadcom 2835 I2S module
   KCONFIG:= \
     CONFIG_SND_BCM2835_SOC_I2S \
-    CONFIG_SND_SOC_AD193X_SPI=n \
     CONFIG_SND_SOC_AD193X_I2C=n \
     CONFIG_SND_SOC_DMAENGINE_PCM=y \
     CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
-- 
2.32.0




More information about the openwrt-devel mailing list