diff options
author | Asish Bhattacharya <asishb@codeaurora.org> | 2017-12-04 17:23:15 +0530 |
---|---|---|
committer | Laxminath Kasam <lkasam@codeaurora.org> | 2017-12-07 19:57:27 +0530 |
commit | 5faacb3a7ee820c82ad76fad94e4f1c2c13169a2 (patch) | |
tree | d5cdaeee12cf1417fba67af7e6f39db4c7c5f4d0 /asoc/codecs/msm_sdw | |
parent | 50a527cf07f90c1141a8bd90482e30b40583691d (diff) | |
download | msm-extra-5faacb3a7ee820c82ad76fad94e4f1c2c13169a2.tar.gz |
ASoC: allow drivers to compile both static and dynamic
Based on where the code is synced the driver should allow
both static and dynamic linked compilation.
Also remove __exit for modules loaded from another common
init/exit functions.
Change-Id: Ib58f152002aba3af4446f9bbd9b82c279212bd0a
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Diffstat (limited to 'asoc/codecs/msm_sdw')
-rw-r--r-- | asoc/codecs/msm_sdw/Kbuild | 30 | ||||
-rw-r--r-- | asoc/codecs/msm_sdw/Makefile | 2 |
2 files changed, 18 insertions, 14 deletions
diff --git a/asoc/codecs/msm_sdw/Kbuild b/asoc/codecs/msm_sdw/Kbuild index a55948e2..e2b5bc31 100644 --- a/asoc/codecs/msm_sdw/Kbuild +++ b/asoc/codecs/msm_sdw/Kbuild @@ -1,22 +1,32 @@ # We can build either as part of a standalone Kernel build or as # an external module. Determine which mechanism is being used -KERNEL_BUILD := 0 +ifeq ($(MODNAME),) + KERNEL_BUILD := 1 +else + KERNEL_BUILD := 0 +endif -ifeq ($(KERNEL_BUILD), 0) +ifeq ($(KERNEL_BUILD), 1) # These are configurable via Kconfig for kernel-based builds # Need to explicitly configure for Android-based builds + AUDIO_BLD_DIR := $(ANDROID_BUILD_TOP)/kernel/msm-4.9 + AUDIO_ROOT := $(AUDIO_BLD_DIR)/techpack/audio +endif + +ifeq ($(KERNEL_BUILD), 0) ifeq ($(CONFIG_ARCH_SDM845), y) include $(AUDIO_ROOT)/config/sdm845auto.conf export + INCS += -include $(AUDIO_ROOT)/config/sdm845autoconf.h endif ifeq ($(CONFIG_ARCH_SDM670), y) include $(AUDIO_ROOT)/config/sdm670auto.conf export + INCS += -include $(AUDIO_ROOT)/config/sdm670autoconf.h endif endif - # As per target team, build is done as follows: # Defconfig : build with default flags # Slub : defconfig + CONFIG_SLUB_DEBUG := y + @@ -44,7 +54,7 @@ COMMON_INC := -I$(AUDIO_ROOT)/$(COMMON_DIR) ############ MSM Soundwire ############ # for MSM Soundwire Codec -ifeq ($(CONFIG_SND_SOC_MSM_SDW), m) +ifdef CONFIG_SND_SOC_MSM_SDW MSM_SDW_OBJS += msm_sdw_cdc.o MSM_SDW_OBJS += msm_sdw_regmap.o MSM_SDW_OBJS += msm-sdw-tables.o @@ -53,16 +63,9 @@ endif LINUX_INC += -Iinclude/linux -INCS := $(COMMON_INC) \ +INCS += $(COMMON_INC) \ $(UAPI_INC) -ifeq ($(CONFIG_ARCH_SDM845), y) -INCS += -include $(AUDIO_ROOT)/config/sdm845autoconf.h -endif -ifeq ($(CONFIG_ARCH_SDM670), y) -INCS += -include $(AUDIO_ROOT)/config/sdm670autoconf.h -endif - EXTRA_CFLAGS += $(INCS) @@ -91,11 +94,14 @@ ifeq ($(call cc-option-yn, -Wheader-guard),y) EXTRA_CFLAGS += -Wheader-guard endif +ifeq ($(KERNEL_BUILD), 0) KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/ipc/Module.symvers KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/dsp/Module.symvers KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/Module.symvers KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/Module.symvers KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/soc/Module.symvers +endif + # Module information used by KBuild framework obj-$(CONFIG_SND_SOC_MSM_SDW) += msm_sdw_dlkm.o msm_sdw_dlkm-y := $(MSM_SDW_OBJS) diff --git a/asoc/codecs/msm_sdw/Makefile b/asoc/codecs/msm_sdw/Makefile deleted file mode 100644 index 9518f4db..00000000 --- a/asoc/codecs/msm_sdw/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -snd-soc-msm-sdw-objs := msm_sdw_cdc.o msm_sdw_regmap.o msm-sdw-tables.o msm_sdw_cdc_utils.o -obj-$(CONFIG_SND_SOC_MSM_SDW) += snd-soc-msm-sdw.o |