From 111a5945207e5ab4948a1486be0729a6a257983a Mon Sep 17 00:00:00 2001 From: Fei Tong Date: Thu, 27 Aug 2020 11:55:42 +0800 Subject: [PATCH] ASOC: fix audio machine driver compile issue LV Platform use the same ARCH cause Kbuild mismatch issue Change-Id: I803aeb3bbee45566b1f9e66b4a6c8b8c26ba86f3 Signed-off-by: Fei Tong --- Makefile.am | 1 + asoc/Kbuild | 13 +++++++++++++ asoc/codecs/Kbuild | 13 +++++++++++++ dsp/Kbuild | 15 +++++++++++++-- ipc/Kbuild | 13 +++++++++++++ soc/Kbuild | 13 +++++++++++++ 6 files changed, 66 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 475103a3cd50..200c1f7f2427 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,6 +40,7 @@ obj-m += asoc/codecs/wcd937x/ endif ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sa8155 sa8155ivi sa6155 sa8195 qtiquingvm)) +KBUILD_OPTIONS += CONFIG_SND_SOC_AUTO=y obj-m := ipc/ obj-m += dsp/ obj-m += asoc/ diff --git a/asoc/Kbuild b/asoc/Kbuild index 1b8c3668bb65..0f359914cac4 100644 --- a/asoc/Kbuild +++ b/asoc/Kbuild @@ -13,6 +13,18 @@ ifeq ($(KERNEL_BUILD), 1) AUDIO_ROOT := $(AUDIO_BLD_DIR)/techpack/audio endif +ifeq ($(CONFIG_SND_SOC_AUTO), y) + ifdef CONFIG_SND_SOC_SA8155 + include $(AUDIO_ROOT)/config/sa8155auto.conf + export + INCS += -include $(AUDIO_ROOT)/config/sa8155autoconf.h + endif + ifdef CONFIG_SND_SOC_SA6155 + include $(AUDIO_ROOT)/config/sa6155auto.conf + export + INCS += -include $(AUDIO_ROOT)/config/sa6155autoconf.h + endif +else ifeq ($(KERNEL_BUILD), 0) ifeq ($(CONFIG_ARCH_SM8150), y) ifdef CONFIG_SND_SOC_SA8155 @@ -77,6 +89,7 @@ ifeq ($(KERNEL_BUILD), 0) INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h endif endif +endif # As per target team, build is done as follows: # Defconfig : build with default flags diff --git a/asoc/codecs/Kbuild b/asoc/codecs/Kbuild index 4376af1e2d96..02b05bce8b38 100644 --- a/asoc/codecs/Kbuild +++ b/asoc/codecs/Kbuild @@ -13,6 +13,18 @@ ifeq ($(KERNEL_BUILD), 1) AUDIO_ROOT := $(AUDIO_BLD_DIR)/techpack/audio endif +ifeq ($(CONFIG_SND_SOC_AUTO), y) + ifdef CONFIG_SND_SOC_SA8155 + include $(AUDIO_ROOT)/config/sa8155auto.conf + export + INCS += -include $(AUDIO_ROOT)/config/sa8155autoconf.h + endif + ifdef CONFIG_SND_SOC_SA6155 + include $(AUDIO_ROOT)/config/sa6155auto.conf + export + INCS += -include $(AUDIO_ROOT)/config/sa6155autoconf.h + endif +else ifeq ($(KERNEL_BUILD), 0) ifeq ($(CONFIG_ARCH_SM8150), y) ifdef CONFIG_SND_SOC_SA8155 @@ -71,6 +83,7 @@ ifeq ($(KERNEL_BUILD), 0) INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h endif endif +endif # As per target team, build is done as follows: # Defconfig : build with default flags diff --git a/dsp/Kbuild b/dsp/Kbuild index f01337cf2384..2832cbcd55d3 100644 --- a/dsp/Kbuild +++ b/dsp/Kbuild @@ -13,6 +13,18 @@ ifeq ($(KERNEL_BUILD), 1) AUDIO_ROOT := $(AUDIO_BLD_DIR)/techpack/audio endif +ifeq ($(CONFIG_SND_SOC_AUTO), y) + ifdef CONFIG_SND_SOC_SA8155 + include $(AUDIO_ROOT)/config/sa8155auto.conf + export + INCS += -include $(AUDIO_ROOT)/config/sa8155autoconf.h + endif + ifdef CONFIG_SND_SOC_SA6155 + include $(AUDIO_ROOT)/config/sa6155auto.conf + export + INCS += -include $(AUDIO_ROOT)/config/sa6155autoconf.h + endif +else ifeq ($(KERNEL_BUILD), 0) ifeq ($(CONFIG_ARCH_SM6150), y) ifdef CONFIG_SND_SOC_SA6155 @@ -77,8 +89,7 @@ ifeq ($(KERNEL_BUILD), 0) INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h endif endif - - +endif # As per target team, build is done as follows: # Defconfig : build with default flags diff --git a/ipc/Kbuild b/ipc/Kbuild index 00a71683d523..ea08817e5819 100644 --- a/ipc/Kbuild +++ b/ipc/Kbuild @@ -14,6 +14,18 @@ ifeq ($(KERNEL_BUILD), 1) AUDIO_ROOT := $(KDIR)/techpack/audio endif +ifeq ($(CONFIG_SND_SOC_AUTO), y) + ifdef CONFIG_SND_SOC_SA8155 + include $(AUDIO_ROOT)/config/sa8155auto.conf + export + INCS += -include $(AUDIO_ROOT)/config/sa8155autoconf.h + endif + ifdef CONFIG_SND_SOC_SA6155 + include $(AUDIO_ROOT)/config/sa6155auto.conf + export + INCS += -include $(AUDIO_ROOT)/config/sa6155autoconf.h + endif +else ifeq ($(KERNEL_BUILD), 0) ifeq ($(CONFIG_ARCH_SM6150), y) ifdef CONFIG_SND_SOC_SA6155 @@ -78,6 +90,7 @@ ifeq ($(KERNEL_BUILD), 0) INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h endif endif +endif # As per target team, build is done as follows: # Defconfig : build with default flags diff --git a/soc/Kbuild b/soc/Kbuild index 10f761ed6584..1b21aca3720d 100644 --- a/soc/Kbuild +++ b/soc/Kbuild @@ -13,6 +13,18 @@ ifeq ($(KERNEL_BUILD), 1) AUDIO_ROOT := $(AUDIO_BLD_DIR)/techpack/audio endif +ifeq ($(CONFIG_SND_SOC_AUTO), y) + ifdef CONFIG_SND_SOC_SA8155 + include $(AUDIO_ROOT)/config/sa8155auto.conf + export + INCS += -include $(AUDIO_ROOT)/config/sa8155autoconf.h + endif + ifdef CONFIG_SND_SOC_SA6155 + include $(AUDIO_ROOT)/config/sa6155auto.conf + export + INCS += -include $(AUDIO_ROOT)/config/sa6155autoconf.h + endif +else ifeq ($(KERNEL_BUILD), 0) ifeq ($(CONFIG_ARCH_SM8150), y) ifdef CONFIG_SND_SOC_SA8155 @@ -77,6 +89,7 @@ ifeq ($(KERNEL_BUILD), 0) INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h endif endif +endif # As per target team, build is done as follows: # Defconfig : build with default flags