summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--asoc/Kbuild59
-rw-r--r--asoc/Makefile41
-rw-r--r--asoc/codecs/Kbuild55
-rw-r--r--asoc/codecs/Makefile40
-rw-r--r--asoc/codecs/msm_sdw/Kbuild30
-rw-r--r--asoc/codecs/msm_sdw/Makefile2
-rw-r--r--asoc/codecs/sdm660_cdc/Kbuild32
-rw-r--r--asoc/codecs/sdm660_cdc/Makefile4
-rw-r--r--asoc/codecs/wcd934x/Kbuild32
-rw-r--r--asoc/codecs/wcd934x/Makefile6
-rw-r--r--asoc/msm-compress-q6-v2.c2
-rw-r--r--asoc/msm-dai-fe.c2
-rw-r--r--asoc/msm-dai-q6-hdmi-v2.c2
-rw-r--r--asoc/msm-dai-q6-v2.c2
-rw-r--r--asoc/msm-dai-slim.c2
-rw-r--r--asoc/msm-dai-stub-v2.c2
-rw-r--r--asoc/msm-lsm-client.c2
-rw-r--r--asoc/msm-pcm-afe-v2.c2
-rw-r--r--asoc/msm-pcm-dtmf-v2.c2
-rw-r--r--asoc/msm-pcm-host-voice-v2.c2
-rw-r--r--asoc/msm-pcm-hostless.c2
-rw-r--r--asoc/msm-pcm-loopback-v2.c2
-rw-r--r--asoc/msm-pcm-q6-noirq.c2
-rw-r--r--asoc/msm-pcm-q6-v2.c2
-rw-r--r--asoc/msm-pcm-routing-v2.c2
-rw-r--r--asoc/msm-pcm-voice-v2.c2
-rw-r--r--asoc/msm-pcm-voip-v2.c2
-rw-r--r--asoc/msm-transcode-loopback-q6-v2.c2
-rw-r--r--config/sdm670auto_static.conf50
-rw-r--r--dsp/Kbuild47
-rw-r--r--dsp/Makefile10
-rw-r--r--dsp/adsp_err.c2
-rw-r--r--dsp/audio_calibration.c2
-rw-r--r--dsp/audio_slimslave.c4
-rw-r--r--dsp/avtimer.c2
-rw-r--r--dsp/codecs/Kbuild39
-rw-r--r--dsp/codecs/Makefile5
-rw-r--r--dsp/codecs/aac_in.c2
-rw-r--r--dsp/codecs/amrnb_in.c2
-rw-r--r--dsp/codecs/amrwb_in.c2
-rw-r--r--dsp/codecs/audio_aac.c2
-rw-r--r--dsp/codecs/audio_alac.c2
-rw-r--r--dsp/codecs/audio_amrnb.c2
-rw-r--r--dsp/codecs/audio_amrwb.c2
-rw-r--r--dsp/codecs/audio_amrwbplus.c2
-rw-r--r--dsp/codecs/audio_ape.c2
-rw-r--r--dsp/codecs/audio_evrc.c2
-rw-r--r--dsp/codecs/audio_g711alaw.c2
-rw-r--r--dsp/codecs/audio_g711mlaw.c2
-rw-r--r--dsp/codecs/audio_hwacc_effects.c2
-rw-r--r--dsp/codecs/audio_mp3.c2
-rw-r--r--dsp/codecs/audio_multi_aac.c2
-rw-r--r--dsp/codecs/audio_qcelp.c2
-rw-r--r--dsp/codecs/audio_wma.c2
-rw-r--r--dsp/codecs/audio_wmapro.c2
-rw-r--r--dsp/codecs/evrc_in.c2
-rw-r--r--dsp/codecs/g711alaw_in.c2
-rw-r--r--dsp/codecs/g711mlaw_in.c2
-rw-r--r--dsp/codecs/qcelp_in.c2
-rw-r--r--dsp/msm_audio_ion.c2
-rw-r--r--dsp/q6adm.c2
-rw-r--r--dsp/q6afe.c2
-rw-r--r--dsp/q6asm.c2
-rw-r--r--dsp/q6core.c2
-rw-r--r--dsp/q6lsm.c2
-rw-r--r--dsp/q6voice.c2
-rw-r--r--dsp/rtac.c2
-rw-r--r--ipc/Kbuild53
-rw-r--r--ipc/Makefile3
-rw-r--r--soc/Kbuild37
-rw-r--r--soc/Makefile6
72 files changed, 332 insertions, 327 deletions
diff --git a/Makefile b/Makefile
index de65a18f..2848799a 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ include $(srctree)/techpack/audio/config/sdm845auto.conf
export
endif
ifeq ($(CONFIG_ARCH_SDM670), y)
-include $(srctree)/techpack/audio/config/sdm670auto.conf
+include $(srctree)/techpack/audio/config/sdm670auto_static.conf
export
endif
ifeq ($(CONFIG_ARCH_SDXPOORWILLS), y)
diff --git a/asoc/Kbuild b/asoc/Kbuild
index eb32e884..e5b8514c 100644
--- a/asoc/Kbuild
+++ b/asoc/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 +
@@ -45,31 +55,31 @@ COMMON_INC := -I$(AUDIO_ROOT)/$(COMMON_DIR)
# for SDM6xx sound card driver
-ifeq ($(CONFIG_SND_SOC_SDM670), m)
+ifdef CONFIG_SND_SOC_SDM670
MACHINE_OBJS += sdm660-common.o
endif
# for SDM6xx sound card driver
-ifeq ($(CONFIG_SND_SOC_INT_CODEC), m)
+ifdef CONFIG_SND_SOC_INT_CODEC
MACHINE_OBJS += sdm660-internal.o
endif
# for SDM6xx sound card driver
-ifeq ($(CONFIG_SND_SOC_EXT_CODEC), m)
+ifdef CONFIG_SND_SOC_EXT_CODEC
MACHINE_OBJS += sdm660-external.o
MACHINE_OBJS += sdm660-ext-dai-links.o
endif
# for SDM845 sound card driver
-ifeq ($(CONFIG_SND_SOC_MACHINE_SDM845), m)
+ifdef CONFIG_SND_SOC_MACHINE_SDM845
MACHINE_OBJS += sdm845.o
endif
-ifeq ($(CONFIG_SND_SOC_CPE), m)
+ifdef CONFIG_SND_SOC_CPE
CPE_LSM_OBJS += msm-cpe-lsm.o
endif
-ifeq ($(CONFIG_SND_SOC_QDSP6V2), m)
+ifdef CONFIG_SND_SOC_QDSP6V2
PLATFORM_OBJS += msm-audio-effects-q6-v2.o
PLATFORM_OBJS += msm-compress-q6-v2.o
PLATFORM_OBJS += msm-dai-fe.o
@@ -77,7 +87,6 @@ ifeq ($(CONFIG_SND_SOC_QDSP6V2), m)
PLATFORM_OBJS += msm-dai-q6-v2.o
PLATFORM_OBJS += msm-dai-slim.o
PLATFORM_OBJS += msm-dai-stub-v2.o
- PLATFORM_OBJS += msm-ds2-dap-config.o
PLATFORM_OBJS += msm-lsm-client.o
PLATFORM_OBJS += msm-pcm-afe-v2.o
PLATFORM_OBJS += msm-pcm-dtmf-v2.o
@@ -86,30 +95,32 @@ ifeq ($(CONFIG_SND_SOC_QDSP6V2), m)
PLATFORM_OBJS += msm-pcm-loopback-v2.o
PLATFORM_OBJS += msm-pcm-q6-noirq.o
PLATFORM_OBJS += msm-pcm-q6-v2.o
- PLATFORM_OBJS += msm-pcm-routing-devdep.o
PLATFORM_OBJS += msm-pcm-routing-v2.o
PLATFORM_OBJS += msm-pcm-voice-v2.o
PLATFORM_OBJS += msm-pcm-voip-v2.o
- PLATFORM_OBJS += msm-qti-pp-config.o
PLATFORM_OBJS += msm-transcode-loopback-q6-v2.o
PLATFORM_OBJS += platform_init.o
endif
+ifdef CONFIG_DOLBY_DS2
+ PLATFORM_OBJS += msm-ds2-dap-config.o
+endif
+ifdef CONFIG_DOLBY_LICENSE
+ PLATFORM_OBJS += msm-ds2-dap-config.o
+endif
+ifdef CONFIG_SND_HWDEP
+ PLATFORM_OBJS += msm-pcm-routing-devdep.o
+endif
+ifdef CONFIG_QTI_PP
+ PLATFORM_OBJS += msm-qti-pp-config.o
+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)
-
CDEFINES += -DANI_LITTLE_BYTE_ENDIAN \
-DANI_LITTLE_BIT_ENDIAN \
-DDOT11F_LITTLE_ENDIAN_HOST \
@@ -135,12 +146,16 @@ 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/dsp/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/asoc/codecs/wcd934x/Module.symvers
KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/sdm660_cdc/Module.symvers
KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/msm_sdw/Module.symvers
+endif
+ifeq ($(KERNEL_BUILD), 1)
+ obj-y += codecs/
+endif
# Module information used by KBuild framework
obj-$(CONFIG_SND_SOC_QDSP6V2) += platform_dlkm.o
platform_dlkm-y := $(PLATFORM_OBJS)
diff --git a/asoc/Makefile b/asoc/Makefile
deleted file mode 100644
index 4d3839de..00000000
--- a/asoc/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-# MSM Machine Support
-
-snd-soc-hostless-pcm-objs := msm-pcm-hostless.o
-obj-$(CONFIG_SND_SOC_MSM_HOSTLESS_PCM) += snd-soc-hostless-pcm.o
-
-
-snd-soc-qdsp6v2-objs := msm-dai-fe.o
-obj-$(CONFIG_SND_SOC_QDSP6V2) += snd-soc-qdsp6v2.o
-
-#for CPE drivers
-snd-soc-cpe-objs := msm-cpe-lsm.o
-obj-$(CONFIG_SND_SOC_CPE) += snd-soc-cpe.o
-
-# for MSM8998 sound card driver
-snd-soc-msm8998-objs := msm8998.o
-obj-$(CONFIG_SND_SOC_MACHINE_MSM8998) += snd-soc-msm8998.o
-
-# for SDM670 sound card driver
-snd-soc-sdm670-objs := sdm660-common.o sdm660-internal.o sdm660-external.o sdm660-ext-dai-links.o
-obj-$(CONFIG_SND_SOC_SDM670) += snd-soc-sdm670.o
-
-# for SDM845 sound card driver
-snd-soc-sdm845-objs := sdm845.o
-obj-$(CONFIG_SND_SOC_MACHINE_SDM845) += snd-soc-sdm845.o
-
-snd-soc-qdsp6v2-objs += msm-dai-q6-v2.o msm-pcm-q6-v2.o \
- msm-pcm-routing-v2.o msm-compress-q6-v2.o \
- msm-pcm-afe-v2.o msm-pcm-voip-v2.o \
- msm-pcm-voice-v2.o msm-dai-q6-hdmi-v2.o \
- msm-lsm-client.o msm-pcm-host-voice-v2.o \
- msm-audio-effects-q6-v2.o msm-pcm-loopback-v2.o \
- msm-dai-slim.o msm-transcode-loopback-q6-v2.o msm-pcm-q6-noirq.o
-obj-$(CONFIG_SND_SOC_QDSP6V2) += snd-soc-qdsp6v2.o msm-pcm-dtmf-v2.o \
- msm-dai-stub-v2.o
-obj-$(CONFIG_SND_HWDEP) += msm-pcm-routing-devdep.o
-obj-$(CONFIG_DOLBY_DAP) += msm-dolby-dap-config.o
-obj-$(CONFIG_DOLBY_DS2) += msm-ds2-dap-config.o
-obj-$(CONFIG_DOLBY_LICENSE) += msm-ds2-dap-config.o
-obj-$(CONFIG_DTS_SRS_TM) += msm-dts-srs-tm-config.o
-obj-$(CONFIG_QTI_PP) += msm-qti-pp-config.o
-obj-y += codecs/
diff --git a/asoc/codecs/Kbuild b/asoc/codecs/Kbuild
index 83d4da44..1cbd20e4 100644
--- a/asoc/codecs/Kbuild
+++ b/asoc/codecs/Kbuild
@@ -1,22 +1,31 @@
# 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 +
@@ -42,7 +51,7 @@ COMMON_DIR := include
COMMON_INC := -I$(AUDIO_ROOT)/$(COMMON_DIR)
############ ASoC Codecs ############
-ifeq ($(CONFIG_WCD9XXX_CODEC_CORE), m)
+ifdef CONFIG_WCD9XXX_CODEC_CORE
CORE_OBJS += wcd9xxx-rst.o
CORE_OBJS += wcd9xxx-core-init.o
CORE_OBJS += wcd9xxx-core.o
@@ -57,7 +66,7 @@ ifeq ($(CONFIG_WCD9XXX_CODEC_CORE), m)
CORE_OBJS += wcd934x/wcd934x-tables.o
endif
-ifeq ($(CONFIG_SND_SOC_WCD9XXX_V2), m)
+ifdef CONFIG_SND_SOC_WCD9XXX_V2
WCD9XXX_OBJS += wcd9xxx-common-v2.o
WCD9XXX_OBJS += wcd9xxx-resmgr-v2.o
WCD9XXX_OBJS += wcdcal-hwdep.o
@@ -67,56 +76,50 @@ ifeq ($(CONFIG_SND_SOC_WCD9XXX_V2), m)
WCD9XXX_OBJS += audio-ext-clk-up.o
endif
-ifeq ($(CONFIG_SND_SOC_WCD9335), m)
+ifdef CONFIG_SND_SOC_WCD9335
WCD9335_OBJS += wcd9335.o
endif
-ifeq ($(CONFIG_SND_SOC_WSA881X), m)
+ifdef CONFIG_SND_SOC_WSA881X
WSA881X_OBJS += wsa881x.o
WSA881X_OBJS += wsa881x-tables.o
WSA881X_OBJS += wsa881x-regmap.o
WSA881X_OBJS += wsa881x-temp-sensor.o
endif
-ifeq ($(CONFIG_SND_SOC_MSM_STUB), m)
+ifdef CONFIG_SND_SOC_MSM_STUB
STUB_OBJS += msm_stub.o
endif
-ifeq ($(CONFIG_SND_SOC_WCD_SPI), m)
+ifdef CONFIG_SND_SOC_WCD_SPI
SPI_OBJS += wcd-spi.o
endif
-ifeq ($(CONFIG_SND_SOC_WCD_CPE), m)
+ifdef CONFIG_SND_SOC_WCD_CPE
WCD_CPE_OBJS += wcd_cpe_core.o
WCD_CPE_OBJS += wcd_cpe_services.o
endif
-ifeq ($(CONFIG_SND_SOC_WCD_MBHC), m)
+ifdef CONFIG_SND_SOC_WCD_MBHC
MBHC_OBJS += wcd-mbhc-v2.o
endif
-ifeq ($(CONFIG_SND_SOC_WCD_MBHC_ADC), m)
+ifdef CONFIG_SND_SOC_WCD_MBHC_ADC
MBHC_OBJS += wcd-mbhc-adc.o
endif
-ifeq ($(CONFIG_SND_SOC_WCD_MBHC_LEGACY), m)
+ifdef CONFIG_SND_SOC_WCD_MBHC_LEGACY
MBHC_OBJS += wcd-mbhc-legacy.o
endif
-ifeq ($(CONFIG_SND_SOC_MSM_HDMI_CODEC_RX), m)
+ifdef CONFIG_SND_SOC_MSM_HDMI_CODEC_RX
HDMICODEC_OBJS += msm_hdmi_codec_rx.o
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)
@@ -147,8 +150,16 @@ EXTRA_CFLAGS += -Wheader-guard
endif
+ifeq ($(KERNEL_BUILD), 0)
KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/dsp/Module.symvers
KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/soc/Module.symvers
+endif
+
+ifeq ($(KERNEL_BUILD), 1)
+ obj-y += wcd934x/
+ obj-y += sdm660_cdc/
+ obj-y += msm_sdw/
+endif
# Module information used by KBuild framework
obj-$(CONFIG_WCD9XXX_CODEC_CORE) += wcd_core_dlkm.o
wcd_core_dlkm-y := $(CORE_OBJS)
diff --git a/asoc/codecs/Makefile b/asoc/codecs/Makefile
deleted file mode 100644
index 9b02c8a5..00000000
--- a/asoc/codecs/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-snd-soc-wcd9xxx-objs := wcd9xxx-common-v2.o wcd9xxx-resmgr-v2.o \
- wcdcal-hwdep.o wcd9xxx-soc-init.o wcd-dsp-utils.o \
- wcd-dsp-mgr.o audio-ext-clk-up.o
-snd-soc-wcd-cpe-objs := wcd_cpe_services.o wcd_cpe_core.o
-snd-soc-wsa881x-objs := wsa881x.o wsa881x-tables.o wsa881x-regmap.o wsa881x-temp-sensor.o
-snd-soc-wcd-mbhc-objs := wcd-mbhc-v2.o
-ifneq (,$(filter $(CONFIG_SND_SOC_WCD_MBHC_LEGACY),y m))
- snd-soc-wcd-mbhc-objs += wcd-mbhc-legacy.o
-endif
-ifneq (,$(filter $(CONFIG_SND_SOC_WCD_MBHC_ADC),y m))
- snd-soc-wcd-mbhc-objs += wcd-mbhc-adc.o
-endif
-snd-soc-wcd-spi-objs := wcd-spi.o
-snd-soc-wcd9335-objs := wcd9335.o
-snd-soc-wcd-cpe-objs := wcd_cpe_services.o wcd_cpe_core.o
-
-obj-$(CONFIG_SND_SOC_WCD9335) += snd-soc-wcd9335.o
-obj-$(CONFIG_SND_SOC_WCD_CPE) += snd-soc-wcd-cpe.o
-obj-$(CONFIG_SND_SOC_WCD934X) += wcd934x/
-obj-$(CONFIG_SND_SOC_SDM660_CDC) += sdm660_cdc/
-obj-$(CONFIG_SND_SOC_MSM_SDW) += msm_sdw/
-
-obj-$(CONFIG_SND_SOC_WCD9XXX_V2) += snd-soc-wcd9xxx.o
-obj-$(CONFIG_SND_SOC_WCD_MBHC) += snd-soc-wcd-mbhc.o
-obj-$(CONFIG_SND_SOC_WSA881X) += snd-soc-wsa881x.o
-obj-$(CONFIG_SND_SOC_WCD_SPI) += snd-soc-wcd-spi.o
-
-snd-soc-msm-stub-objs := msm_stub.o
-obj-$(CONFIG_SND_SOC_MSM_STUB) += snd-soc-msm-stub.o
-
-wcd-core-objs := wcd9xxx-rst.o wcd9xxx-core-init.o \
- wcd9xxx-core.o wcd9xxx-irq.o \
- wcd9xxx-slimslave.o wcd9xxx-utils.o \
- wcd9335-regmap.o wcd9335-tables.o \
- msm-cdc-pinctrl.o msm-cdc-supply.o
-wcd-core-objs += wcd934x/wcd934x-regmap.o
-wcd-core-objs += wcd934x/wcd934x-tables.o
-
-obj-$(CONFIG_WCD9XXX_CODEC_CORE) += wcd-core.o
-obj-$(CONFIG_SND_SOC_MSM_HDMI_CODEC_RX) += msm_hdmi_codec_rx.o
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
diff --git a/asoc/codecs/sdm660_cdc/Kbuild b/asoc/codecs/sdm660_cdc/Kbuild
index c1777ee5..56122c1e 100644
--- a/asoc/codecs/sdm660_cdc/Kbuild
+++ b/asoc/codecs/sdm660_cdc/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,27 +54,20 @@ COMMON_INC := -I$(AUDIO_ROOT)/$(COMMON_DIR)
############ SDM660_CDC ############
# for SDM660_CDC Codec
-ifeq ($(CONFIG_SND_SOC_ANALOG_CDC), m)
+ifdef CONFIG_SND_SOC_ANALOG_CDC
ANALOG_CDC_OBJS += msm-analog-cdc.o
ANALOG_CDC_OBJS += sdm660-cdc-irq.o
endif
-ifeq ($(CONFIG_SND_SOC_DIGITAL_CDC), m)
+ifdef CONFIG_SND_SOC_DIGITAL_CDC
DIGITAL_CDC_OBJS += msm-digital-cdc.o
DIGITAL_CDC_OBJS += msm-digital-cdc-regmap.o
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)
@@ -94,11 +97,14 @@ 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_ANALOG_CDC) += analog_cdc_dlkm.o
analog_cdc_dlkm-y := $(ANALOG_CDC_OBJS)
diff --git a/asoc/codecs/sdm660_cdc/Makefile b/asoc/codecs/sdm660_cdc/Makefile
deleted file mode 100644
index 0ebf4071..00000000
--- a/asoc/codecs/sdm660_cdc/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-snd-soc-analog-cdc-objs := sdm660-cdc-irq.o msm-analog-cdc.o
-snd-soc-digital-cdc-objs := msm-digital-cdc.o msm-digital-cdc-regmap.o
-obj-$(CONFIG_SND_SOC_ANALOG_CDC) += snd-soc-analog-cdc.o
-obj-$(CONFIG_SND_SOC_DIGITAL_CDC) += snd-soc-digital-cdc.o
diff --git a/asoc/codecs/wcd934x/Kbuild b/asoc/codecs/wcd934x/Kbuild
index 6bc854c8..e46e39d2 100644
--- a/asoc/codecs/wcd934x/Kbuild
+++ b/asoc/codecs/wcd934x/Kbuild
@@ -1,22 +1,33 @@
# 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 +55,7 @@ COMMON_INC := -I$(AUDIO_ROOT)/$(COMMON_DIR)
############ WCD934X ############
# for WCD934X Codec
-ifeq ($(CONFIG_SND_SOC_WCD934X), m)
+ifdef CONFIG_SND_SOC_WCD934X
WCD934X_OBJS += wcd934x.o
WCD934X_OBJS += wcd934x-dsp-cntl.o
WCD934X_OBJS += wcd934x-mbhc.o
@@ -53,16 +64,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,12 +95,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_WCD934X) += wcd934x_dlkm.o
wcd934x_dlkm-y := $(WCD934X_OBJS)
diff --git a/asoc/codecs/wcd934x/Makefile b/asoc/codecs/wcd934x/Makefile
deleted file mode 100644
index 12781f6d..00000000
--- a/asoc/codecs/wcd934x/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# Makefile for wcd934x codec driver.
-#
-snd-soc-wcd934x-objs := wcd934x.o wcd934x-dsp-cntl.o \
- wcd934x-mbhc.o wcd934x-dsd.o
-obj-$(CONFIG_SND_SOC_WCD934X) += snd-soc-wcd934x.o
diff --git a/asoc/msm-compress-q6-v2.c b/asoc/msm-compress-q6-v2.c
index 1df13afd..b5e28275 100644
--- a/asoc/msm-compress-q6-v2.c
+++ b/asoc/msm-compress-q6-v2.c
@@ -4546,7 +4546,7 @@ int __init msm_compress_dsp_init(void)
return platform_driver_register(&msm_compr_driver);
}
-void __exit msm_compress_dsp_exit(void)
+void msm_compress_dsp_exit(void)
{
platform_driver_unregister(&msm_compr_driver);
}
diff --git a/asoc/msm-dai-fe.c b/asoc/msm-dai-fe.c
index 9160a2d7..72883eb8 100644
--- a/asoc/msm-dai-fe.c
+++ b/asoc/msm-dai-fe.c
@@ -2576,7 +2576,7 @@ int __init msm_fe_dai_init(void)
return platform_driver_register(&msm_fe_dai_driver);
}
-void __exit msm_fe_dai_exit(void)
+void msm_fe_dai_exit(void)
{
platform_driver_unregister(&msm_fe_dai_driver);
}
diff --git a/asoc/msm-dai-q6-hdmi-v2.c b/asoc/msm-dai-q6-hdmi-v2.c
index eb9f5f5d..c061c08b 100644
--- a/asoc/msm-dai-q6-hdmi-v2.c
+++ b/asoc/msm-dai-q6-hdmi-v2.c
@@ -543,7 +543,7 @@ int __init msm_dai_q6_hdmi_init(void)
return platform_driver_register(&msm_dai_q6_hdmi_driver);
}
-void __exit msm_dai_q6_hdmi_exit(void)
+void msm_dai_q6_hdmi_exit(void)
{
platform_driver_unregister(&msm_dai_q6_hdmi_driver);
}
diff --git a/asoc/msm-dai-q6-v2.c b/asoc/msm-dai-q6-v2.c
index af288f1c..5156e0d2 100644
--- a/asoc/msm-dai-q6-v2.c
+++ b/asoc/msm-dai-q6-v2.c
@@ -8928,7 +8928,7 @@ fail:
return rc;
}
-void __exit msm_dai_q6_exit(void)
+void msm_dai_q6_exit(void)
{
platform_driver_unregister(&msm_dai_q6_tdm_driver);
platform_driver_unregister(&msm_dai_q6_spdif_driver);
diff --git a/asoc/msm-dai-slim.c b/asoc/msm-dai-slim.c
index 427fd6ce..e8bdf13f 100644
--- a/asoc/msm-dai-slim.c
+++ b/asoc/msm-dai-slim.c
@@ -653,7 +653,7 @@ int __init msm_dai_slim_init(void)
return rc;
}
-void __exit msm_dai_slim_exit(void)
+void msm_dai_slim_exit(void)
{
slim_driver_unregister(&msm_dai_slim_driver);
}
diff --git a/asoc/msm-dai-stub-v2.c b/asoc/msm-dai-stub-v2.c
index d4178c89..c8b6b773 100644
--- a/asoc/msm-dai-stub-v2.c
+++ b/asoc/msm-dai-stub-v2.c
@@ -379,7 +379,7 @@ fail:
return rc;
}
-void __exit msm_dai_stub_exit(void)
+void msm_dai_stub_exit(void)
{
pr_debug("%s:\n", __func__);
diff --git a/asoc/msm-lsm-client.c b/asoc/msm-lsm-client.c
index 15cdfb15..f6a56985 100644
--- a/asoc/msm-lsm-client.c
+++ b/asoc/msm-lsm-client.c
@@ -2406,7 +2406,7 @@ int __init msm_lsm_client_init(void)
return platform_driver_register(&msm_lsm_driver);
}
-void __exit msm_lsm_client_exit(void)
+void msm_lsm_client_exit(void)
{
platform_driver_unregister(&msm_lsm_driver);
}
diff --git a/asoc/msm-pcm-afe-v2.c b/asoc/msm-pcm-afe-v2.c
index f700f0bf..77eecb23 100644
--- a/asoc/msm-pcm-afe-v2.c
+++ b/asoc/msm-pcm-afe-v2.c
@@ -910,7 +910,7 @@ int __init msm_pcm_afe_init(void)
return platform_driver_register(&msm_afe_driver);
}
-void __exit msm_pcm_afe_exit(void)
+void msm_pcm_afe_exit(void)
{
pr_debug("%s\n", __func__);
platform_driver_unregister(&msm_afe_driver);
diff --git a/asoc/msm-pcm-dtmf-v2.c b/asoc/msm-pcm-dtmf-v2.c
index 7bc823be..9953eebc 100644
--- a/asoc/msm-pcm-dtmf-v2.c
+++ b/asoc/msm-pcm-dtmf-v2.c
@@ -585,7 +585,7 @@ int __init msm_pcm_dtmf_init(void)
return platform_driver_register(&msm_pcm_driver);
}
-void __exit msm_pcm_dtmf_exit(void)
+void msm_pcm_dtmf_exit(void)
{
platform_driver_unregister(&msm_pcm_driver);
}
diff --git a/asoc/msm-pcm-host-voice-v2.c b/asoc/msm-pcm-host-voice-v2.c
index 0c47ec11..fd771df5 100644
--- a/asoc/msm-pcm-host-voice-v2.c
+++ b/asoc/msm-pcm-host-voice-v2.c
@@ -1542,7 +1542,7 @@ int __init msm_voice_host_init(void)
return platform_driver_register(&msm_pcm_driver);
}
-void __exit msm_voice_host_exit(void)
+void msm_voice_host_exit(void)
{
platform_driver_unregister(&msm_pcm_driver);
}
diff --git a/asoc/msm-pcm-hostless.c b/asoc/msm-pcm-hostless.c
index 90d76b49..e2850a42 100644
--- a/asoc/msm-pcm-hostless.c
+++ b/asoc/msm-pcm-hostless.c
@@ -71,7 +71,7 @@ int __init msm_pcm_hostless_init(void)
return platform_driver_register(&msm_pcm_hostless_driver);
}
-void __exit msm_pcm_hostless_exit(void)
+void msm_pcm_hostless_exit(void)
{
platform_driver_unregister(&msm_pcm_hostless_driver);
}
diff --git a/asoc/msm-pcm-loopback-v2.c b/asoc/msm-pcm-loopback-v2.c
index e50a0057..1c26d196 100644
--- a/asoc/msm-pcm-loopback-v2.c
+++ b/asoc/msm-pcm-loopback-v2.c
@@ -790,7 +790,7 @@ int __init msm_pcm_loopback_init(void)
return platform_driver_register(&msm_pcm_driver);
}
-void __exit msm_pcm_loopback_exit(void)
+void msm_pcm_loopback_exit(void)
{
platform_driver_unregister(&msm_pcm_driver);
}
diff --git a/asoc/msm-pcm-q6-noirq.c b/asoc/msm-pcm-q6-noirq.c
index 307e7a6f..dbc6d33a 100644
--- a/asoc/msm-pcm-q6-noirq.c
+++ b/asoc/msm-pcm-q6-noirq.c
@@ -1273,7 +1273,7 @@ int __init msm_pcm_noirq_init(void)
return platform_driver_register(&msm_pcm_driver_noirq);
}
-void __exit msm_pcm_noirq_exit(void)
+void msm_pcm_noirq_exit(void)
{
platform_driver_unregister(&msm_pcm_driver_noirq);
}
diff --git a/asoc/msm-pcm-q6-v2.c b/asoc/msm-pcm-q6-v2.c
index 0a0e26d8..314584e5 100644
--- a/asoc/msm-pcm-q6-v2.c
+++ b/asoc/msm-pcm-q6-v2.c
@@ -1873,7 +1873,7 @@ int __init msm_pcm_dsp_init(void)
return platform_driver_register(&msm_pcm_driver);
}
-void __exit msm_pcm_dsp_exit(void)
+void msm_pcm_dsp_exit(void)
{
platform_driver_unregister(&msm_pcm_driver);
}
diff --git a/asoc/msm-pcm-routing-v2.c b/asoc/msm-pcm-routing-v2.c
index 0aed70c4..c0dc3556 100644
--- a/asoc/msm-pcm-routing-v2.c
+++ b/asoc/msm-pcm-routing-v2.c
@@ -17212,7 +17212,7 @@ int __init msm_soc_routing_platform_init(void)
return platform_driver_register(&msm_routing_pcm_driver);
}
-void __exit msm_soc_routing_platform_exit(void)
+void msm_soc_routing_platform_exit(void)
{
msm_routing_delete_cal_data();
memset(&be_dai_name_table, 0, sizeof(be_dai_name_table));
diff --git a/asoc/msm-pcm-voice-v2.c b/asoc/msm-pcm-voice-v2.c
index 7b236b4f..b82c5871 100644
--- a/asoc/msm-pcm-voice-v2.c
+++ b/asoc/msm-pcm-voice-v2.c
@@ -770,7 +770,7 @@ int __init msm_pcm_voice_init(void)
return platform_driver_register(&msm_pcm_driver);
}
-void __exit msm_pcm_voice_exit(void)
+void msm_pcm_voice_exit(void)
{
platform_driver_unregister(&msm_pcm_driver);
}
diff --git a/asoc/msm-pcm-voip-v2.c b/asoc/msm-pcm-voip-v2.c
index 58fc534f..02cee29e 100644
--- a/asoc/msm-pcm-voip-v2.c
+++ b/asoc/msm-pcm-voip-v2.c
@@ -1704,7 +1704,7 @@ int __init msm_pcm_voip_init(void)
return platform_driver_register(&msm_pcm_driver);
}
-void __exit msm_pcm_voip_exit(void)
+void msm_pcm_voip_exit(void)
{
platform_driver_unregister(&msm_pcm_driver);
}
diff --git a/asoc/msm-transcode-loopback-q6-v2.c b/asoc/msm-transcode-loopback-q6-v2.c
index 94ebbf74..3c8e917f 100644
--- a/asoc/msm-transcode-loopback-q6-v2.c
+++ b/asoc/msm-transcode-loopback-q6-v2.c
@@ -958,7 +958,7 @@ int __init msm_transcode_loopback_init(void)
return platform_driver_register(&msm_transcode_loopback_driver);
}
-void __exit msm_transcode_loopback_exit(void)
+void msm_transcode_loopback_exit(void)
{
mutex_destroy(&transcode_info.lock);
platform_driver_unregister(&msm_transcode_loopback_driver);
diff --git a/config/sdm670auto_static.conf b/config/sdm670auto_static.conf
new file mode 100644
index 00000000..dc555646
--- /dev/null
+++ b/config/sdm670auto_static.conf
@@ -0,0 +1,50 @@
+CONFIG_PINCTRL_LPI=y
+CONFIG_PINCTRL_WCD=y
+CONFIG_AUDIO_EXT_CLK=y
+CONFIG_SND_SOC_WCD9XXX_V2=y
+CONFIG_SND_SOC_WCD_MBHC=y
+CONFIG_SND_SOC_WSA881X=y
+CONFIG_SND_SOC_WCD_DSP_MGR=y
+CONFIG_SND_SOC_WCD_SPI=y
+CONFIG_SND_SOC_WCD_CPE=y
+CONFIG_SND_SOC_CPE=y
+CONFIG_SND_SOC_WCD9335=y
+CONFIG_SND_SOC_WCD934X=y
+CONFIG_SND_SOC_WCD934X_MBHC=y
+CONFIG_SND_SOC_WCD934X_DSD=y
+CONFIG_MSM_QDSP6V2_CODECS=y
+CONFIG_MSM_ULTRASOUND=y
+CONFIG_MSM_QDSP6_APRV2_GLINK=y
+CONFIG_MSM_ADSP_LOADER=y
+CONFIG_REGMAP_SWR=y
+CONFIG_MSM_QDSP6_SSR=y
+CONFIG_MSM_QDSP6_PDR=y
+CONFIG_MSM_QDSP6_NOTIFIER=y
+CONFIG_SND_SOC_MSM_HOSTLESS_PCM=y
+CONFIG_SND_SOC_MSM_QDSP6V2_INTF=y
+CONFIG_SND_SOC_SDM670=y
+CONFIG_MSM_GLINK_SPI_XPRT=y
+CONFIG_SOUNDWIRE=y
+CONFIG_SOUNDWIRE_WCD_CTRL=y
+CONFIG_SND_SOC_QDSP6V2=y
+CONFIG_SND_SOC_MSM_QDSP6V2_INTF=y
+CONFIG_WCD9XXX_CODEC_CORE=y
+CONFIG_MSM_CDC_PINCTRL=y
+CONFIG_SND_SOC_WCD_MBHC_ADC=y
+CONFIG_SND_SOC_WCD_MBHC_LEGACY=y
+CONFIG_QTI_PP=y
+CONFIG_SND_HWDEP=y
+CONFIG_DTS_EAGLE=y
+CONFIG_DOLBY_DS2=y
+CONFIG_DOLBY_LICENSE=y
+CONFIG_DTS_SRS_TM=y
+CONFIG_SND_SOC_EXT_CODEC=y
+CONFIG_SND_SOC_INT_CODEC=y
+CONFIG_SND_SOC_MSM_STUB=y
+CONFIG_WCD_DSP_GLINK=y
+CONFIG_MSM_AVTIMER=y
+CONFIG_SND_SOC_SDM660_CDC=y
+CONFIG_SND_SOC_ANALOG_CDC=y
+CONFIG_SND_SOC_DIGITAL_CDC=y
+CONFIG_SND_SOC_MSM_SDW=y
+CONFIG_SND_SOC_MSM_HDMI_CODEC_RX=y
diff --git a/dsp/Kbuild b/dsp/Kbuild
index 87720854..306a25a1 100644
--- a/dsp/Kbuild
+++ b/dsp/Kbuild
@@ -1,22 +1,33 @@
# 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 +
@@ -43,10 +54,9 @@ COMMON_INC := -I$(AUDIO_ROOT)/$(COMMON_DIR)
############ QDSP6V2 ############
-ifeq ($(CONFIG_SND_SOC_MSM_QDSP6V2_INTF), m)
+ifdef CONFIG_SND_SOC_MSM_QDSP6V2_INTF
Q6_OBJS += audio_calibration.o
Q6_OBJS += audio_cal_utils.o
- Q6_OBJS += msm-dts-srs-tm-config.o
Q6_OBJS += q6adm.o
Q6_OBJS += q6afe.o
Q6_OBJS += q6asm.o
@@ -61,34 +71,31 @@ ifeq ($(CONFIG_SND_SOC_MSM_QDSP6V2_INTF), m)
Q6_OBJS += avtimer.o
Q6_OBJS += q6_init.o
endif
-ifeq ($(CONFIG_MSM_ADSP_LOADER), m)
+ifdef CONFIG_DTS_SRS_TM
+ Q6_OBJS += msm-dts-srs-tm-config.o
+endif
+
+ifdef CONFIG_MSM_ADSP_LOADER
ADSP_LOADER_OBJS += adsp-loader.o
endif
-ifeq ($(CONFIG_MSM_QDSP6_NOTIFIER), m)
+ifdef CONFIG_MSM_QDSP6_NOTIFIER
QDSP6_NOTIFIER_OBJS += audio_notifier.o audio_ssr.o
endif
-ifeq ($(CONFIG_MSM_QDSP6_PDR), m)
+ifdef CONFIG_MSM_QDSP6_PDR
QDSP6_PDR_OBJS += audio_pdr.o
endif
-ifeq ($(CONFIG_MSM_ULTRASOUND), m)
+ifdef CONFIG_MSM_ULTRASOUND
USF_OBJS += usf.o usfcdev.o q6usm.o
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)
@@ -128,7 +135,13 @@ CHIP_NAME ?= $(MODNAME)
CDEFINES += -DMULTI_IF_NAME=\"$(CHIP_NAME)\"
endif
+ifeq ($(KERNEL_BUILD), 0)
KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/ipc/Module.symvers
+endif
+
+ifeq ($(KERNEL_BUILD), 1)
+ obj-y += codecs/
+endif
obj-$(CONFIG_SND_SOC_MSM_QDSP6V2_INTF) += q6_dlkm.o
q6_dlkm-y := $(Q6_OBJS)
diff --git a/dsp/Makefile b/dsp/Makefile
deleted file mode 100644
index b609df22..00000000
--- a/dsp/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-obj-$(CONFIG_SND_SOC_MSM_QDSP6V2_INTF) += audio_calibration.o audio_cal_utils.o \
- q6adm.o q6afe.o q6asm.o q6audio-v2.o q6voice.o q6core.o \
- rtac.o q6lsm.o audio_slimslave.o adsp_err.o msm_audio_ion.o
-obj-$(CONFIG_MSM_ADSP_LOADER) += adsp-loader.o
-obj-$(CONFIG_MSM_QDSP6_SSR) += audio_ssr.o
-obj-$(CONFIG_MSM_QDSP6_PDR) += audio_pdr.o
-obj-$(CONFIG_MSM_QDSP6_NOTIFIER) += audio_notifier.o
-obj-$(CONFIG_MSM_ULTRASOUND) += usf.o usfcdev.o q6usm.o
-obj-$(CONFIG_MSM_AVTIMER) += avtimer.o
-obj-$(CONFIG_MSM_QDSP6V2_CODECS) += codecs/
diff --git a/dsp/adsp_err.c b/dsp/adsp_err.c
index 7ad80dc6..e34d76b6 100644
--- a/dsp/adsp_err.c
+++ b/dsp/adsp_err.c
@@ -167,7 +167,7 @@ int __init adsp_err_init(void) { return 0; }
#endif
-void __exit adsp_err_exit(void)
+void adsp_err_exit(void)
{
return;
}
diff --git a/dsp/audio_calibration.c b/dsp/audio_calibration.c
index f812c98a..c895fa78 100644
--- a/dsp/audio_calibration.c
+++ b/dsp/audio_calibration.c
@@ -609,7 +609,7 @@ int __init audio_cal_init(void)
return misc_register(&audio_cal_misc);
}
-void __exit audio_cal_exit(void)
+void audio_cal_exit(void)
{
int i = 0;
struct list_head *ptr, *next;
diff --git a/dsp/audio_slimslave.c b/dsp/audio_slimslave.c
index f9e9cdc3..25866d12 100644
--- a/dsp/audio_slimslave.c
+++ b/dsp/audio_slimslave.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2014, 2017 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
@@ -165,7 +165,7 @@ int __init audio_slimslave_init(void)
return slim_driver_register(&audio_slimslave_driver);
}
-void __exit audio_slimslave_exit(void)
+void audio_slimslave_exit(void)
{
}
diff --git a/dsp/avtimer.c b/dsp/avtimer.c
index 184e0e93..b6833ed7 100644
--- a/dsp/avtimer.c
+++ b/dsp/avtimer.c
@@ -535,7 +535,7 @@ error_platform_driver:
return rc;
}
-void __exit avtimer_exit(void)
+void avtimer_exit(void)
{
platform_driver_unregister(&dev_avtimer_driver);
}
diff --git a/dsp/codecs/Kbuild b/dsp/codecs/Kbuild
index 683f5997..13b23992 100644
--- a/dsp/codecs/Kbuild
+++ b/dsp/codecs/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 +
@@ -43,7 +53,7 @@ COMMON_INC := -I$(AUDIO_ROOT)/$(COMMON_DIR)
############ Native Enc/Dec ############
-ifeq ($(CONFIG_MSM_QDSP6V2_CODECS), m)
+ifdef CONFIG_MSM_QDSP6V2_CODECS
NATIVE_OBJS += q6audio_v2.o q6audio_v2_aio.o
NATIVE_OBJS += audio_utils_aio.o
NATIVE_OBJS += audio_utils.o
@@ -74,16 +84,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)
@@ -112,17 +115,9 @@ 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/dsp/Module.symvers
KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/Module.symvers
-# If the module name is not "wlan", then the define MULTI_IF_NAME to be the
-# same a the QCA CHIP name. The host driver will then append MULTI_IF_NAME to
-# any string that must be unique for all instances of the driver on the system.
-# This allows multiple instances of the driver with different module names.
-# If the module name is wlan, leave MULTI_IF_NAME undefined and the code will
-# treat the driver as the primary driver.
-ifneq ($(MODNAME), qdsp6v2)
-CHIP_NAME ?= $(MODNAME)
-CDEFINES += -DMULTI_IF_NAME=\"$(CHIP_NAME)\"
endif
# Module information used by KBuild framework
diff --git a/dsp/codecs/Makefile b/dsp/codecs/Makefile
deleted file mode 100644
index f9052190..00000000
--- a/dsp/codecs/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-obj-$(CONFIG_MSM_QDSP6V2_CODECS) += aac_in.o qcelp_in.o evrc_in.o amrnb_in.o g711mlaw_in.o g711alaw_in.o audio_utils.o
-obj-$(CONFIG_MSM_QDSP6V2_CODECS) += audio_wma.o audio_wmapro.o audio_aac.o audio_multi_aac.o audio_alac.o audio_ape.o audio_utils_aio.o
-obj-$(CONFIG_MSM_QDSP6V2_CODECS) += q6audio_v2.o q6audio_v2_aio.o
-obj-$(CONFIG_MSM_QDSP6V2_CODECS) += audio_g711mlaw.o audio_g711alaw.o
-obj-$(CONFIG_MSM_QDSP6V2_CODECS) += audio_mp3.o audio_amrnb.o audio_amrwb.o audio_amrwbplus.o audio_evrc.o audio_qcelp.o amrwb_in.o audio_hwacc_effects.o
diff --git a/dsp/codecs/aac_in.c b/dsp/codecs/aac_in.c
index 5c071416..e10fbee6 100644
--- a/dsp/codecs/aac_in.c
+++ b/dsp/codecs/aac_in.c
@@ -707,7 +707,7 @@ int __init aac_in_init(void)
return misc_register(&audio_aac_in_misc);
}
-void __exit aac_in_exit(void)
+void aac_in_exit(void)
{
misc_deregister(&audio_aac_in_misc);
}
diff --git a/dsp/codecs/amrnb_in.c b/dsp/codecs/amrnb_in.c
index d9a019de..4e358603 100644
--- a/dsp/codecs/amrnb_in.c
+++ b/dsp/codecs/amrnb_in.c
@@ -399,7 +399,7 @@ int __init amrnb_in_init(void)
return misc_register(&audio_amrnb_in_misc);
}
-void __exit amrnb_in_exit(void)
+void amrnb_in_exit(void)
{
misc_deregister(&audio_amrnb_in_misc);
}
diff --git a/dsp/codecs/amrwb_in.c b/dsp/codecs/amrwb_in.c
index d1d4ab71..ce9dc45c 100644
--- a/dsp/codecs/amrwb_in.c
+++ b/dsp/codecs/amrwb_in.c
@@ -397,7 +397,7 @@ int __init amrwb_in_init(void)
return misc_register(&audio_amrwb_in_misc);
}
-void __exit amrwb_in_exit(void)
+void amrwb_in_exit(void)
{
misc_deregister(&audio_amrwb_in_misc);
}
diff --git a/dsp/codecs/audio_aac.c b/dsp/codecs/audio_aac.c
index ea7506fb..c742f722 100644
--- a/dsp/codecs/audio_aac.c
+++ b/dsp/codecs/audio_aac.c
@@ -473,7 +473,7 @@ int __init audio_aac_init(void)
return ret;
}
-void __exit audio_aac_exit(void)
+void audio_aac_exit(void)
{
mutex_destroy(&audio_aac_ws_mgr.ws_lock);
misc_deregister(&audio_aac_misc);
diff --git a/dsp/codecs/audio_alac.c b/dsp/codecs/audio_alac.c
index 50a0bf7e..cfb3087f 100644
--- a/dsp/codecs/audio_alac.c
+++ b/dsp/codecs/audio_alac.c
@@ -432,7 +432,7 @@ int __init audio_alac_init(void)
return ret;
}
-void __exit audio_alac_exit(void)
+void audio_alac_exit(void)
{
mutex_destroy(&audio_alac_ws_mgr.ws_lock);
misc_deregister(&audio_alac_misc);
diff --git a/dsp/codecs/audio_amrnb.c b/dsp/codecs/audio_amrnb.c
index 04177425..1b5dd949 100644
--- a/dsp/codecs/audio_amrnb.c
+++ b/dsp/codecs/audio_amrnb.c
@@ -223,7 +223,7 @@ int __init audio_amrnb_init(void)
return ret;
}
-void __exit audio_amrnb_exit(void)
+void audio_amrnb_exit(void)
{
mutex_destroy(&audio_amrnb_ws_mgr.ws_lock);
misc_deregister(&audio_amrnb_misc);
diff --git a/dsp/codecs/audio_amrwb.c b/dsp/codecs/audio_amrwb.c
index 091bee4d..14087821 100644
--- a/dsp/codecs/audio_amrwb.c
+++ b/dsp/codecs/audio_amrwb.c
@@ -228,7 +228,7 @@ int __init audio_amrwb_init(void)
return ret;
}
-void __exit audio_amrwb_exit(void)
+void audio_amrwb_exit(void)
{
mutex_destroy(&audio_amrwb_ws_mgr.ws_lock);
misc_deregister(&audio_amrwb_misc);
diff --git a/dsp/codecs/audio_amrwbplus.c b/dsp/codecs/audio_amrwbplus.c
index 566aee73..9d6c1187 100644
--- a/dsp/codecs/audio_amrwbplus.c
+++ b/dsp/codecs/audio_amrwbplus.c
@@ -394,7 +394,7 @@ int __init audio_amrwbplus_init(void)
return ret;
}
-void __exit audio_amrwbplus_exit(void)
+void audio_amrwbplus_exit(void)
{
mutex_destroy(&audio_amrwbplus_ws_mgr.ws_lock);
misc_deregister(&audio_amrwbplus_misc);
diff --git a/dsp/codecs/audio_ape.c b/dsp/codecs/audio_ape.c
index b11f83ef..3df63471 100644
--- a/dsp/codecs/audio_ape.c
+++ b/dsp/codecs/audio_ape.c
@@ -356,7 +356,7 @@ int __init audio_ape_init(void)
return ret;
}
-void __exit audio_ape_exit(void)
+void audio_ape_exit(void)
{
mutex_destroy(&audio_ape_ws_mgr.ws_lock);
misc_deregister(&audio_ape_misc);
diff --git a/dsp/codecs/audio_evrc.c b/dsp/codecs/audio_evrc.c
index 78bbde64..6cddc9ca 100644
--- a/dsp/codecs/audio_evrc.c
+++ b/dsp/codecs/audio_evrc.c
@@ -181,7 +181,7 @@ int __init audio_evrc_init(void)
return ret;
}
-void __exit audio_evrc_exit(void)
+void audio_evrc_exit(void)
{
mutex_destroy(&audio_evrc_ws_mgr.ws_lock);
misc_deregister(&audio_evrc_misc);
diff --git a/dsp/codecs/audio_g711alaw.c b/dsp/codecs/audio_g711alaw.c
index a6e0a6e6..6382616f 100644
--- a/dsp/codecs/audio_g711alaw.c
+++ b/dsp/codecs/audio_g711alaw.c
@@ -387,7 +387,7 @@ int __init audio_g711alaw_init(void)
return ret;
}
-void __exit audio_g711alaw_exit(void)
+void audio_g711alaw_exit(void)
{
mutex_destroy(&audio_g711_ws_mgr.ws_lock);
misc_deregister(&audio_g711alaw_misc);
diff --git a/dsp/codecs/audio_g711mlaw.c b/dsp/codecs/audio_g711mlaw.c
index 2a2598c7..9994aabc 100644
--- a/dsp/codecs/audio_g711mlaw.c
+++ b/dsp/codecs/audio_g711mlaw.c
@@ -386,7 +386,7 @@ int __init audio_g711mlaw_init(void)
return ret;
}
-void __exit audio_g711mlaw_exit(void)
+void audio_g711mlaw_exit(void)
{
mutex_destroy(&audio_g711_ws_mgr.ws_lock);
misc_deregister(&audio_g711mlaw_misc);
diff --git a/dsp/codecs/audio_hwacc_effects.c b/dsp/codecs/audio_hwacc_effects.c
index cd54b90c..f66164bf 100644
--- a/dsp/codecs/audio_hwacc_effects.c
+++ b/dsp/codecs/audio_hwacc_effects.c
@@ -772,7 +772,7 @@ int __init audio_effects_init(void)
return misc_register(&audio_effects_misc);
}
-void __exit audio_effects_exit(void)
+void audio_effects_exit(void)
{
misc_deregister(&audio_effects_misc);
}
diff --git a/dsp/codecs/audio_mp3.c b/dsp/codecs/audio_mp3.c
index 81e8486a..4435f3e7 100644
--- a/dsp/codecs/audio_mp3.c
+++ b/dsp/codecs/audio_mp3.c
@@ -185,7 +185,7 @@ int __init audio_mp3_init(void)
return ret;
}
-void __exit audio_mp3_exit(void)
+void audio_mp3_exit(void)
{
mutex_destroy(&audio_mp3_ws_mgr.ws_lock);
misc_deregister(&audio_mp3_misc);
diff --git a/dsp/codecs/audio_multi_aac.c b/dsp/codecs/audio_multi_aac.c
index c3e616ae..45405dd5 100644
--- a/dsp/codecs/audio_multi_aac.c
+++ b/dsp/codecs/audio_multi_aac.c
@@ -520,7 +520,7 @@ int __init audio_multiaac_init(void)
return ret;
}
-void __exit audio_multiaac_exit(void)
+void audio_multiaac_exit(void)
{
mutex_destroy(&audio_multiaac_ws_mgr.ws_lock);
misc_deregister(&audio_multiaac_misc);
diff --git a/dsp/codecs/audio_qcelp.c b/dsp/codecs/audio_qcelp.c
index 86902948..4b23bace 100644
--- a/dsp/codecs/audio_qcelp.c
+++ b/dsp/codecs/audio_qcelp.c
@@ -188,7 +188,7 @@ int audio_qcelp_init(void)
return ret;
}
-void __exit audio_qcelp_exit(void)
+void audio_qcelp_exit(void)
{
mutex_destroy(&audio_qcelp_ws_mgr.ws_lock);
misc_deregister(&audio_qcelp_misc);
diff --git a/dsp/codecs/audio_wma.c b/dsp/codecs/audio_wma.c
index 975dc0b0..ef9c8c65 100644
--- a/dsp/codecs/audio_wma.c
+++ b/dsp/codecs/audio_wma.c
@@ -342,7 +342,7 @@ int __init audio_wma_init(void)
return ret;
}
-void __exit audio_wma_exit(void)
+void audio_wma_exit(void)
{
mutex_destroy(&audio_wma_ws_mgr.ws_lock);
misc_deregister(&audio_wma_misc);
diff --git a/dsp/codecs/audio_wmapro.c b/dsp/codecs/audio_wmapro.c
index 3ce4cdc8..21826189 100644
--- a/dsp/codecs/audio_wmapro.c
+++ b/dsp/codecs/audio_wmapro.c
@@ -415,7 +415,7 @@ int __init audio_wmapro_init(void)
return ret;
}
-void __exit audio_wmapro_exit(void)
+void audio_wmapro_exit(void)
{
mutex_destroy(&audio_wmapro_ws_mgr.ws_lock);
misc_deregister(&audio_wmapro_misc);
diff --git a/dsp/codecs/evrc_in.c b/dsp/codecs/evrc_in.c
index 158ff6f0..15f08e74 100644
--- a/dsp/codecs/evrc_in.c
+++ b/dsp/codecs/evrc_in.c
@@ -407,7 +407,7 @@ int __init evrc_in_init(void)
return misc_register(&audio_evrc_in_misc);
}
-void __exit evrc_in_exit(void)
+void evrc_in_exit(void)
{
misc_deregister(&audio_evrc_in_misc);
}
diff --git a/dsp/codecs/g711alaw_in.c b/dsp/codecs/g711alaw_in.c
index bd49bc9a..c668b48b 100644
--- a/dsp/codecs/g711alaw_in.c
+++ b/dsp/codecs/g711alaw_in.c
@@ -379,7 +379,7 @@ int __init g711alaw_in_init(void)
return misc_register(&audio_g711alaw_in_misc);
}
-void __exit g711alaw_in_exit(void)
+void g711alaw_in_exit(void)
{
misc_deregister(&audio_g711alaw_in_misc);
}
diff --git a/dsp/codecs/g711mlaw_in.c b/dsp/codecs/g711mlaw_in.c
index d646bd13..2f20c133 100644
--- a/dsp/codecs/g711mlaw_in.c
+++ b/dsp/codecs/g711mlaw_in.c
@@ -382,7 +382,7 @@ int __init g711mlaw_in_init(void)
return misc_register(&audio_g711mlaw_in_misc);
}
-void __exit g711mlaw_in_exit(void)
+void g711mlaw_in_exit(void)
{
misc_deregister(&audio_g711mlaw_in_misc);
}
diff --git a/dsp/codecs/qcelp_in.c b/dsp/codecs/qcelp_in.c
index 050c95f3..be09ea4a 100644
--- a/dsp/codecs/qcelp_in.c
+++ b/dsp/codecs/qcelp_in.c
@@ -407,7 +407,7 @@ int __init qcelp_in_init(void)
return misc_register(&audio_qcelp_in_misc);
}
-void __exit qcelp_in_exit(void)
+void qcelp_in_exit(void)
{
misc_deregister(&audio_qcelp_in_misc);
}
diff --git a/dsp/msm_audio_ion.c b/dsp/msm_audio_ion.c
index ca9505f0..11382905 100644
--- a/dsp/msm_audio_ion.c
+++ b/dsp/msm_audio_ion.c
@@ -917,7 +917,7 @@ int __init msm_audio_ion_init(void)
return platform_driver_register(&msm_audio_ion_driver);
}
-void __exit msm_audio_ion_exit(void)
+void msm_audio_ion_exit(void)
{
platform_driver_unregister(&msm_audio_ion_driver);
}
diff --git a/dsp/q6adm.c b/dsp/q6adm.c
index 77c28976..78ce2b88 100644
--- a/dsp/q6adm.c
+++ b/dsp/q6adm.c
@@ -5246,7 +5246,7 @@ int __init adm_init(void)
return 0;
}
-void __exit adm_exit(void)
+void adm_exit(void)
{
mutex_destroy(&dts_srs_lock);
adm_delete_cal_data();
diff --git a/dsp/q6afe.c b/dsp/q6afe.c
index 864ae4ad..bdc6cda0 100644
--- a/dsp/q6afe.c
+++ b/dsp/q6afe.c
@@ -7576,7 +7576,7 @@ int __init afe_init(void)
return 0;
}
-void __exit afe_exit(void)
+void afe_exit(void)
{
afe_delete_cal_data();
diff --git a/dsp/q6asm.c b/dsp/q6asm.c
index 4e988ee4..c990f823 100644
--- a/dsp/q6asm.c
+++ b/dsp/q6asm.c
@@ -10286,7 +10286,7 @@ int __init q6asm_init(void)
return 0;
}
-void __exit q6asm_exit(void)
+void q6asm_exit(void)
{
q6asm_delete_cal_data();
}
diff --git a/dsp/q6core.c b/dsp/q6core.c
index b8078620..5e09faa7 100644
--- a/dsp/q6core.c
+++ b/dsp/q6core.c
@@ -1105,7 +1105,7 @@ int __init core_init(void)
return 0;
}
-void __exit core_exit(void)
+void core_exit(void)
{
mutex_destroy(&q6core_lcl.cmd_lock);
mutex_destroy(&q6core_lcl.ver_lock);
diff --git a/dsp/q6lsm.c b/dsp/q6lsm.c
index e34bff97..2a98dc71 100644
--- a/dsp/q6lsm.c
+++ b/dsp/q6lsm.c
@@ -2376,7 +2376,7 @@ int __init q6lsm_init(void)
return 0;
}
-void __exit q6lsm_exit(void)
+void q6lsm_exit(void)
{
lsm_delete_cal_data();
}
diff --git a/dsp/q6voice.c b/dsp/q6voice.c
index 985e959a..1a20f9d1 100644
--- a/dsp/q6voice.c
+++ b/dsp/q6voice.c
@@ -9606,7 +9606,7 @@ int __init voice_init(void)
}
-void __exit voice_exit(void)
+void voice_exit(void)
{
voice_delete_cal_data();
free_cal_map_table();
diff --git a/dsp/rtac.c b/dsp/rtac.c
index 806bbc5f..43c69cca 100644
--- a/dsp/rtac.c
+++ b/dsp/rtac.c
@@ -1949,7 +1949,7 @@ nomem:
return -ENOMEM;
}
-void __exit rtac_exit(void)
+void rtac_exit(void)
{
kzfree(rtac_adm_buffer);
kzfree(rtac_asm_buffer);
diff --git a/ipc/Kbuild b/ipc/Kbuild
index b729f903..92760fb0 100644
--- a/ipc/Kbuild
+++ b/ipc/Kbuild
@@ -1,25 +1,41 @@
# 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
+
+TARGET_KERNEL_VERSION := 4.9
-TARGET_KERNEL_VERSION := 4.4
+# These are configurable via Kconfig for kernel-based builds
+# Need to explicitly configure for Android-based builds
+ifeq ($(CONFIG_ARCH_SDM845), y)
+ TARGET_KERNEL_VERSION := 4.9
+endif
+ifeq ($(CONFIG_ARCH_SDM670), y)
+ TARGET_KERNEL_VERSION := 4.9
+endif
+
+KDIR := $(TOP)/kernel/msm-$(TARGET_KERNEL_VERSION)
+
+ifeq ($(KERNEL_BUILD), 1)
+ AUDIO_ROOT := $(KDIR)/techpack/audio
+endif
ifeq ($(KERNEL_BUILD), 0)
- # These are configurable via Kconfig for kernel-based builds
- # Need to explicitly configure for Android-based builds
ifeq ($(CONFIG_ARCH_SDM845), y)
include $(AUDIO_ROOT)/config/sdm845auto.conf
export
- TARGET_KERNEL_VERSION := 4.9
+ INCS += -include $(AUDIO_ROOT)/config/sdm845autoconf.h
endif
ifeq ($(CONFIG_ARCH_SDM670), y)
include $(AUDIO_ROOT)/config/sdm670auto.conf
export
- TARGET_KERNEL_VERSION := 4.9
+ 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 +
@@ -46,34 +62,27 @@ COMMON_INC := -I$(AUDIO_ROOT)/$(COMMON_DIR)
############ IPC ############
-ifeq ($(CONFIG_MSM_QDSP6_APRV2_GLINK), m)
+ifdef CONFIG_MSM_QDSP6_APRV2_GLINK
APRV_GLINK += apr.o
APRV_GLINK += apr_v2.o
APRV_GLINK += apr_tal_glink.o
endif
-ifeq ($(CONFIG_MSM_QDSP6_APRV3_GLINK), m)
+ifdef CONFIG_MSM_QDSP6_APRV3_GLINK
APRV_GLINK += apr.o
APRV_GLINK += apr_v3.o
APRV_GLINK += apr_tal_glink.o
endif
-ifeq ($(CONFIG_WCD_DSP_GLINK), m)
+ifdef CONFIG_WCD_DSP_GLINK
WDSP_GLINK += wcd-dsp-glink.o
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)
@@ -89,6 +98,8 @@ CDEFINES += -DANI_LITTLE_BYTE_ENDIAN \
KBUILD_CPPFLAGS += $(CDEFINES)
+ifeq ($(KERNEL_BUILD), 0)
+
HEADER_INSTALL_DIR := $(TOP)/kernel/msm-$(TARGET_KERNEL_VERSION)/scripts
UAPI_OUT := $(OUT)/obj/vendor/qcom/opensource/audio-kernel/include
$(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ avtimer.h;)
@@ -118,6 +129,10 @@ $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/sound/ $(AUDIO_ROOT
$(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/sound/ $(AUDIO_ROOT)/include/uapi/sound/ voice_params.h;)
$(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/sound/ $(AUDIO_ROOT)/include/uapi/sound/ wcd-dsp-glink.h;)
+KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/dsp/Module.symvers
+
+endif
+
# Currently, for versions of gcc which support it, the kernel Makefile
# is disabling the maybe-uninitialized warning. Re-enable it for the
# AUDIO driver. Note that we must use EXTRA_CFLAGS here so that it
@@ -141,9 +156,9 @@ CHIP_NAME ?= $(MODNAME)
CDEFINES += -DMULTI_IF_NAME=\"$(CHIP_NAME)\"
endif
-KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/dsp/Module.symvers
# Module information used by KBuild framework
obj-$(CONFIG_MSM_QDSP6_APRV2_GLINK) += apr_dlkm.o
+obj-$(CONFIG_MSM_QDSP6_APRV3_GLINK) += apr_dlkm.o
apr_dlkm-y := $(APRV_GLINK)
obj-$(CONFIG_WCD_DSP_GLINK) += wglink_dlkm.o
diff --git a/ipc/Makefile b/ipc/Makefile
deleted file mode 100644
index 69389153..00000000
--- a/ipc/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-obj-$(CONFIG_MSM_QDSP6_APRV2_GLINK) += apr.o apr_v2.o apr_tal_glink.o
-obj-$(CONFIG_MSM_QDSP6_APRV3_GLINK) += apr.o apr_v3.o apr_tal_glink.o
-obj-$(CONFIG_WCD_DSP_GLINK) += wcd-dsp-glink.o
diff --git a/soc/Kbuild b/soc/Kbuild
index 45b77e9c..c9cf31bc 100644
--- a/soc/Kbuild
+++ b/soc/Kbuild
@@ -1,22 +1,31 @@
# 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,37 +53,30 @@ COMMON_INC := -I$(AUDIO_ROOT)/$(COMMON_DIR)
############ SoC Modules ############
# for pinctrl WCD driver
-ifeq ($(CONFIG_PINCTRL_WCD), m)
+ifdef CONFIG_PINCTRL_WCD
PINCTRL_WCD_OBJS += pinctrl-wcd.o
endif
# for pinctrl LPI driver
-ifeq ($(CONFIG_PINCTRL_LPI), m)
+ifdef CONFIG_PINCTRL_LPI
PINCTRL_LPI_OBJS += pinctrl-lpi.o
endif
# for soundwire driver
-ifeq ($(CONFIG_SOUNDWIRE_WCD_CTRL), m)
+ifdef CONFIG_SOUNDWIRE_WCD_CTRL
SWR_CTRL_OBJS += swr-wcd-ctrl.o
endif
-ifeq ($(CONFIG_SOUNDWIRE), m)
+ifdef CONFIG_SOUNDWIRE
SWR_OBJS += regmap-swr.o
SWR_OBJS += soundwire.o
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)
@@ -90,7 +92,10 @@ CDEFINES += -DANI_LITTLE_BYTE_ENDIAN \
KBUILD_CPPFLAGS += $(CDEFINES)
+ifeq ($(KERNEL_BUILD), 0)
KBUILD_EXTRA_SYMBOLS +=$(OUT)/obj/vendor/qcom/opensource/audio-kernel/dsp/Module.symvers
+endif
+
# Currently, for versions of gcc which support it, the kernel Makefile
# is disabling the maybe-uninitialized warning. Re-enable it for the
# AUDIO driver. Note that we must use EXTRA_CFLAGS here so that it
diff --git a/soc/Makefile b/soc/Makefile
deleted file mode 100644
index c563e76e..00000000
--- a/soc/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-obj-$(CONFIG_REGMAP_SWR) += regmap-swr.o
-obj-$(CONFIG_PINCTRL_WCD) += pinctrl-wcd.o
-obj-$(CONFIG_PINCTRL_LPI) += pinctrl-lpi.o
-obj-$(CONFIG_SOUNDWIRE) += soundwire.o
-obj-$(CONFIG_SOUNDWIRE_WCD_CTRL) += swr-wcd-ctrl.o