Browse Source

audio-driver: Update build files for sa6155

Enable conditional build for audio driver modules
specific to sa6155.

Change-Id: I58701a907242afcfe230623ff42b47c001e3d5f4
Signed-off-by: Rahul Sharma <[email protected]>
Rahul Sharma 6 years ago
parent
commit
f53de7f9fb
15 changed files with 126 additions and 33 deletions
  1. 5 1
      Android.mk
  2. 4 0
      asoc/Android.mk
  3. 17 4
      asoc/Kbuild
  4. 9 5
      asoc/codecs/Android.mk
  5. 9 3
      asoc/codecs/Kbuild
  6. 0 2
      asoc/machine_615x_init.c
  7. 0 2
      asoc/machine_615x_init.h
  8. 3 0
      asoc/sa6155.c
  9. 16 0
      config/sa6155auto.conf
  10. 28 0
      config/sa6155autoconf.h
  11. 10 7
      dsp/Android.mk
  12. 9 3
      dsp/Kbuild
  13. 6 2
      ipc/Android.mk
  14. 9 3
      ipc/Kbuild
  15. 1 1
      soc/Android.mk

+ 5 - 1
Android.mk

@@ -22,9 +22,11 @@ include $(MY_LOCAL_PATH)/asoc/codecs/Android.mk
 endif
 
 ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET)),true)
-ifneq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), msmnile_au msmnile_gvmq))
+ifneq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), msmnile_au sm6150_au msmnile_gvmq))
 $(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/wcd934x/Module.symvers)
 include $(MY_LOCAL_PATH)/asoc/codecs/wcd934x/Android.mk
+$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/soc/Module.symvers)
+include $(MY_LOCAL_PATH)/soc/Android.mk
 endif
 endif
 
@@ -40,11 +42,13 @@ endif
 endif
 
 ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE) $(TRINKET)),true)
+ifneq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), sm6150_au))
 $(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/bolero/Module.symvers)
 include $(MY_LOCAL_PATH)/asoc/codecs/bolero/Android.mk
 $(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/wcd937x/Module.symvers)
 include $(MY_LOCAL_PATH)/asoc/codecs/wcd937x/Android.mk
 endif
+endif
 
 ifeq ($(call is-board-platform-in-list, kona lito),true)
 $(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/bolero/Module.symvers)

+ 4 - 0
asoc/Android.mk

@@ -14,8 +14,12 @@ endif
 
 ifeq ($(call is-board-platform,$(MSMSTEPPE)),true)
 TARGET := talos
+ifeq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), sm6150_au))
+AUDIO_SELECT  := CONFIG_SND_SOC_SA6155=m
+else
 AUDIO_SELECT  := CONFIG_SND_SOC_SM6150=m
 endif
+endif
 
 ifeq ($(call is-board-platform,$(TRINKET)),true)
 TARGET := trinket

+ 17 - 4
asoc/Kbuild

@@ -26,9 +26,15 @@ ifeq ($(KERNEL_BUILD), 0)
 		endif
 	endif
 	ifeq ($(CONFIG_ARCH_SM6150), y)
-		include $(AUDIO_ROOT)/config/sm6150auto.conf
-		export
-		INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
+		ifdef CONFIG_SND_SOC_SA6155
+			include $(AUDIO_ROOT)/config/sa6155auto.conf
+			export
+			INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
+		else
+			include $(AUDIO_ROOT)/config/sm6150auto.conf
+			export
+			INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
+		endif
 	endif
 	ifeq ($(CONFIG_ARCH_TRINKET), y)
 		include $(AUDIO_ROOT)/config/sm6150auto.conf
@@ -96,10 +102,14 @@ endif
 # for SM6150 sound card driver
 ifdef CONFIG_SND_SOC_SM6150
 	MACHINE_OBJS += sm6150.o
-	MACHINE_OBJS += sa6155.o
 	MACHINE_OBJS += machine_615x_init.o
 endif
 
+# For sa6155 sound card driver
+ifdef CONFIG_SND_SOC_SA6155
+	MACHINE_OBJS += sa6155.o
+endif
+
 # for qcs405 sound card driver
 ifdef CONFIG_SND_SOC_QCS405
 	MACHINE_OBJS += qcs405.o
@@ -211,6 +221,9 @@ machine_dlkm-y := $(MACHINE_OBJS)
 obj-$(CONFIG_SND_SOC_SM6150) += machine_dlkm.o
 machine_dlkm-y := $(MACHINE_OBJS)
 
+obj-$(CONFIG_SND_SOC_SA6155) += machine_dlkm.o
+machine_dlkm-y := $(MACHINE_OBJS)
+
 obj-$(CONFIG_SND_SOC_QCS405) += machine_dlkm.o
 machine_dlkm-y := $(MACHINE_OBJS)
 

+ 9 - 5
asoc/codecs/Android.mk

@@ -12,8 +12,12 @@ endif
 endif
 
 ifeq ($(call is-board-platform,$(MSMSTEPPE)),true)
+ifeq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), sm6150_au))
+AUDIO_SELECT  := CONFIG_SND_SOC_SA6155=m
+else
 AUDIO_SELECT  := CONFIG_SND_SOC_SM6150=m
 endif
+endif
 
 ifeq ($(call is-board-platform,$(TRINKET)),true)
 AUDIO_SELECT  := CONFIG_SND_SOC_SM6150=m
@@ -54,9 +58,9 @@ KBUILD_OPTIONS := AUDIO_ROOT=$(AUDIO_BLD_DIR)
 KBUILD_OPTIONS += MODNAME=wcd_core_dlkm
 KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
 KBUILD_OPTIONS += $(AUDIO_SELECT)
-
+# Target specific build
 ###########################################################
-ifneq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), msmnile_au msmnile_gvmq))
+ifneq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), msmnile_au sm6150_au msmnile_gvmq))
 include $(CLEAR_VARS)
 LOCAL_MODULE              := $(AUDIO_CHIPSET)_wcd_core.ko
 LOCAL_MODULE_KBUILD_NAME  := wcd_core_dlkm.ko
@@ -118,8 +122,8 @@ LOCAL_MODULE_TAGS         := optional
 LOCAL_MODULE_DEBUG_ENABLE := true
 LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
 include $(DLKM_DIR)/AndroidKernelModule.mk
-endif
-############################################################
+endif # target specific build
+###########################################################
 include $(CLEAR_VARS)
 LOCAL_MODULE              := $(AUDIO_CHIPSET)_stub.ko
 LOCAL_MODULE_KBUILD_NAME  := stub_dlkm.ko
@@ -127,7 +131,7 @@ LOCAL_MODULE_TAGS         := optional
 LOCAL_MODULE_DEBUG_ENABLE := true
 LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
 include $(DLKM_DIR)/AndroidKernelModule.mk
-##########################################################
+###########################################################
 include $(CLEAR_VARS)
 LOCAL_MODULE              := $(AUDIO_CHIPSET)_hdmi.ko
 LOCAL_MODULE_KBUILD_NAME  := hdmi_dlkm.ko

+ 9 - 3
asoc/codecs/Kbuild

@@ -26,9 +26,15 @@ ifeq ($(KERNEL_BUILD), 0)
 		endif
 	endif
 	ifeq ($(CONFIG_ARCH_SM6150), y)
-		include $(AUDIO_ROOT)/config/sm6150auto.conf
-		export
-		INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
+		ifdef CONFIG_SND_SOC_SA6155
+			include $(AUDIO_ROOT)/config/sa6155auto.conf
+			export
+			INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
+		else
+			include $(AUDIO_ROOT)/config/sm6150auto.conf
+			export
+			INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
+		endif
 	endif
 	ifeq ($(CONFIG_ARCH_TRINKET), y)
 		include $(AUDIO_ROOT)/config/sm6150auto.conf

+ 0 - 2
asoc/machine_615x_init.c

@@ -19,14 +19,12 @@
 static int __init audio_machine_615x_init(void)
 {
 	sm6150_init();
-	sa6155_init();
 	return 0;
 }
 
 static void audio_machine_615x_exit(void)
 {
 	sm6150_exit();
-	sa6155_exit();
 }
 
 module_init(audio_machine_615x_init);

+ 0 - 2
asoc/machine_615x_init.h

@@ -15,9 +15,7 @@
 #ifndef __MACHINE_615X_INIT_H__
 #define __MACHINE_615X_INIT_H__
 int sm6150_init(void);
-int sa6155_init(void);
 
 void sm6150_exit(void);
-void sa6155_exit(void);
 #endif
 

+ 3 - 0
asoc/sa6155.c

@@ -7156,6 +7156,9 @@ void sa6155_exit(void)
 	audio_notifier_deregister("sa6155");
 }
 
+module_init(sa6155_init);
+module_exit(sa6155_exit);
+
 MODULE_DESCRIPTION("ALSA SoC msm");
 MODULE_LICENSE("GPL v2");
 MODULE_ALIAS("platform:" DRV_NAME);

+ 16 - 0
config/sa6155auto.conf

@@ -0,0 +1,16 @@
+CONFIG_MSM_QDSP6_APRV2_RPMSG=m
+CONFIG_MSM_QDSP6_SSR=m
+CONFIG_MSM_ADSP_LOADER=m
+CONFIG_MSM_QDSP6_NOTIFIER=m
+CONFIG_SND_SOC_MSM_QDSP6V2_INTF=m
+CONFIG_QTI_PP=m
+CONFIG_SND_HWDEP_ROUTING=m
+CONFIG_DTS_EAGLE=m
+CONFIG_DOLBY_DS2=m
+CONFIG_DOLBY_LICENSE=m
+CONFIG_SND_SOC_MSM_STUB=m
+CONFIG_SND_SOC_MSM_HDMI_CODEC_RX=m
+CONFIG_MSM_QDSP6V2_CODECS=m
+CONFIG_SND_SOC_QDSP6V2=m
+CONFIG_SND_SOC_SA6155=m
+CONFIG_SOUNDWIRE_MSTR_CTRL=m

+ 28 - 0
config/sa6155autoconf.h

@@ -0,0 +1,28 @@
+/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#define CONFIG_MSM_QDSP6_APRV2_RPMSG 1
+#define CONFIG_MSM_QDSP6_SSR 1
+#define CONFIG_MSM_ADSP_LOADER 1
+#define CONFIG_MSM_QDSP6_NOTIFIER 1
+#define CONFIG_SND_SOC_MSM_QDSP6V2_INTF 1
+#define CONFIG_QTI_PP 1
+#define CONFIG_SND_HWDEP_ROUTING 1
+#define CONFIG_DTS_EAGLE 1
+#define CONFIG_DOLBY_DS2 1
+#define CONFIG_DOLBY_LICENSE 1
+#define CONFIG_SND_SOC_MSM_STUB 1
+#define CONFIG_SND_SOC_MSM_HDMI_CODEC_RX 1
+#define CONFIG_MSM_QDSP6V2_CODECS 1
+#define CONFIG_SND_SOC_QDSP6V2 1
+#define CONFIG_SND_SOC_SA6155 1
+#define CONFIG_SOUNDWIRE_MSTR_CTRL 1

+ 10 - 7
dsp/Android.mk

@@ -11,9 +11,13 @@ AUDIO_SELECT  := CONFIG_SND_SOC_SM8150=m
 endif
 endif
 
-ifeq ($(call is-board-platform,$(MSMSTEPPE) $(TRINKET)),true)
+ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE) $(TRINKET)),true)
+ifeq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), sm6150_au))
+AUDIO_SELECT  := CONFIG_SND_SOC_SA6155=m
+else
 AUDIO_SELECT  := CONFIG_SND_SOC_SM6150=m
 endif
+endif
 
 ifeq ($(call is-board-platform, kona),true)
 AUDIO_SELECT  := CONFIG_SND_SOC_KONA=m
@@ -75,8 +79,9 @@ LOCAL_MODULE_TAGS         := optional
 LOCAL_MODULE_DEBUG_ENABLE := true
 LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
 include $(DLKM_DIR)/AndroidKernelModule.mk
-############################################################
-ifneq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), msmnile_au msmnile_gvmq))
+###########################################################
+# target specific build
+ifneq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), msmnile_au sm6150_au msmnile_gvmq))
 include $(CLEAR_VARS)
 LOCAL_MODULE              := $(AUDIO_CHIPSET)_usf.ko
 LOCAL_MODULE_KBUILD_NAME  := usf_dlkm.ko
@@ -84,7 +89,7 @@ LOCAL_MODULE_TAGS         := optional
 LOCAL_MODULE_DEBUG_ENABLE := true
 LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
 include $(DLKM_DIR)/AndroidKernelModule.mk
-##########################################################
+###########################################################
 include $(CLEAR_VARS)
 LOCAL_MODULE              := $(AUDIO_CHIPSET)_q6_pdr.ko
 LOCAL_MODULE_KBUILD_NAME  := q6_pdr_dlkm.ko
@@ -92,9 +97,7 @@ LOCAL_MODULE_TAGS         := optional
 LOCAL_MODULE_DEBUG_ENABLE := true
 LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
 include $(DLKM_DIR)/AndroidKernelModule.mk
-endif
-###########################################################
 ###########################################################
-
+endif # target specific build
 endif # DLKM check
 endif # supported target check

+ 9 - 3
dsp/Kbuild

@@ -15,9 +15,15 @@ endif
 
 ifeq ($(KERNEL_BUILD), 0)
 	ifeq ($(CONFIG_ARCH_SM6150), y)
-		include $(AUDIO_ROOT)/config/sm6150auto.conf
-		export
-		INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
+		ifdef CONFIG_SND_SOC_SA6155
+			include $(AUDIO_ROOT)/config/sa6155auto.conf
+			export
+			INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
+		else
+			include $(AUDIO_ROOT)/config/sm6150auto.conf
+			export
+			INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
+		endif
 	endif
 	ifeq ($(CONFIG_ARCH_TRINKET), y)
 		include $(AUDIO_ROOT)/config/sm6150auto.conf

+ 6 - 2
ipc/Android.mk

@@ -11,9 +11,13 @@ AUDIO_SELECT  := CONFIG_SND_SOC_SM8150=m
 endif
 endif
 
-ifeq ($(call is-board-platform,$(MSMSTEPPE) $(TRINKET)),true)
+ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE) $(TRINKET)),true)
+ifeq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), sm6150_au))
+AUDIO_SELECT  := CONFIG_SND_SOC_SA6155=m
+else
 AUDIO_SELECT  := CONFIG_SND_SOC_SM6150=m
 endif
+endif
 
 ifeq ($(call is-board-platform,kona),true)
 AUDIO_SELECT  := CONFIG_SND_SOC_KONA=m
@@ -61,7 +65,7 @@ LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
 include $(DLKM_DIR)/AndroidKernelModule.mk
 ###########################################################
 ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET)),true)
-ifneq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), msmnile_au msmnile_gvmq))
+ifneq ($(TARGET_PRODUCT), $(filter $(TARGET_PRODUCT), msmnile_au sm6150_au msmnile_gvmq))
 include $(CLEAR_VARS)
 LOCAL_MODULE              := $(AUDIO_CHIPSET)_wglink.ko
 LOCAL_MODULE_KBUILD_NAME  := wglink_dlkm.ko

+ 9 - 3
ipc/Kbuild

@@ -16,9 +16,15 @@ endif
 
 ifeq ($(KERNEL_BUILD), 0)
         ifeq ($(CONFIG_ARCH_SM6150), y)
-                include $(AUDIO_ROOT)/config/sm6150auto.conf
-                export
-                INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
+		ifdef CONFIG_SND_SOC_SA6155
+			include $(AUDIO_ROOT)/config/sa6155auto.conf
+			export
+			INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
+		else
+			include $(AUDIO_ROOT)/config/sm6150auto.conf
+			export
+			INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
+		endif
         endif
         ifeq ($(CONFIG_ARCH_TRINKET), y)
                 include $(AUDIO_ROOT)/config/sm6150auto.conf

+ 1 - 1
soc/Android.mk

@@ -7,7 +7,7 @@ ifeq ($(call is-board-platform,msmnile),true)
 AUDIO_SELECT  := CONFIG_SND_SOC_SM8150=m
 endif
 
-ifeq ($(call is-board-platform,$(MSMSTEPPE) $(TRINKET)),true)
+ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE) $(TRINKET)),true)
 AUDIO_SELECT  := CONFIG_SND_SOC_SM6150=m
 endif