Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5643be18 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: allow drivers to compile both static and dynamic"

parents 6d3d8cf5 5faacb3a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)
+37 −22
Original line number Diff line number Diff line
# We can build either as part of a standalone Kernel build or as
# an external module.  Determine which mechanism is being used
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)

asoc/Makefile

deleted100644 → 0
+0 −41
Original line number Diff line number Diff line
# 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/
+33 −22
Original line number Diff line number Diff line
# We can build either as part of a standalone Kernel build or as
# an external module.  Determine which mechanism is being used
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)

asoc/codecs/Makefile

deleted100644 → 0
+0 −40
Original line number Diff line number Diff line
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
Loading