From b0e04799e4bb9d751bb3f527dfb835b357672f98 Mon Sep 17 00:00:00 2001 From: Meng Wang Date: Thu, 27 Sep 2018 18:46:44 +0800 Subject: [PATCH] ASoC: config: add config to compile audio drivers for kona Add config to compile audio drivers for kona. Change-Id: I3367a68d0109c80de8525fd74ebaef2959684865 Signed-off-by: Meng Wang --- Android.mk | 7 ++++-- asoc/Android.mk | 7 +++++- asoc/Kbuild | 9 +++++++- asoc/codecs/Android.mk | 8 ++++++- asoc/codecs/Kbuild | 16 +++++++++++++- asoc/codecs/bolero/Android.mk | 8 +++++-- asoc/codecs/bolero/Kbuild | 5 +++++ asoc/codecs/ep92/Android.mk | 2 +- asoc/codecs/ep92/Kbuild | 2 +- asoc/codecs/wcd937x/Android.mk | 2 +- asoc/platform_init.h | 16 +++++++++++--- config/konaauto.conf | 36 ++++++++++++++++++++++++++++++ config/konaautoconf.h | 40 ++++++++++++++++++++++++++++++++++ dsp/Android.mk | 6 ++++- dsp/Kbuild | 9 +++++++- dsp/codecs/Android.mk | 6 ++++- dsp/codecs/Kbuild | 5 +++++ dsp/q6_init.h | 16 +++++++++++--- include/asoc/pdata.h | 5 +++++ include/asoc/wcd-irq.h | 3 ++- ipc/Android.mk | 8 ++++++- ipc/Kbuild | 5 +++++ soc/Android.mk | 8 +++++-- soc/Kbuild | 5 +++++ 24 files changed, 210 insertions(+), 24 deletions(-) create mode 100644 config/konaauto.conf create mode 100644 config/konaautoconf.h diff --git a/Android.mk b/Android.mk index 76813c1109..c10d1caf8c 100644 --- a/Android.mk +++ b/Android.mk @@ -3,7 +3,7 @@ MY_LOCAL_PATH := $(call my-dir) UAPI_OUT := $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/include -ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET)),true) +ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET) kona),true) $(shell mkdir -p $(UAPI_OUT)/linux;) $(shell mkdir -p $(UAPI_OUT)/sound;) $(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/ipc/Module.symvers) @@ -12,7 +12,6 @@ $(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/dsp/codecs $(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/soc/Module.symvers) $(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/Module.symvers) $(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/Module.symvers) -$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/wcd934x/Module.symvers) include $(MY_LOCAL_PATH)/include/uapi/Android.mk include $(MY_LOCAL_PATH)/ipc/Android.mk @@ -21,6 +20,10 @@ include $(MY_LOCAL_PATH)/dsp/codecs/Android.mk include $(MY_LOCAL_PATH)/soc/Android.mk include $(MY_LOCAL_PATH)/asoc/Android.mk include $(MY_LOCAL_PATH)/asoc/codecs/Android.mk +endif + +ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET)),true) +$(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 endif diff --git a/asoc/Android.mk b/asoc/Android.mk index 7937120084..db01167eba 100644 --- a/asoc/Android.mk +++ b/asoc/Android.mk @@ -18,9 +18,14 @@ TARGET := trinket AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m endif +ifeq ($(call is-board-platform,kona),true) +TARGET := kona +AUDIO_SELECT := CONFIG_SND_SOC_KONA=m +endif + AUDIO_CHIPSET := audio # Build/Package only in case of supported target -ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET)),true) +ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET) kona),true) LOCAL_PATH := $(call my-dir) diff --git a/asoc/Kbuild b/asoc/Kbuild index ee290b26a7..945d554c70 100644 --- a/asoc/Kbuild +++ b/asoc/Kbuild @@ -29,6 +29,11 @@ ifeq ($(KERNEL_BUILD), 0) export INCS += -include $(AUDIO_ROOT)/config/sm6150autoconf.h endif + ifeq ($(CONFIG_ARCH_KONA), y) + include $(AUDIO_ROOT)/config/konaauto.conf + export + INCS += -include $(AUDIO_ROOT)/config/konaautoconf.h + endif ifeq ($(CONFIG_ARCH_SDMSHRIKE), y) include $(AUDIO_ROOT)/config/sm8150auto.conf export @@ -99,7 +104,6 @@ ifdef CONFIG_SND_SOC_QDSP6V2 PLATFORM_OBJS += msm-dai-fe.o PLATFORM_OBJS += msm-dai-q6-hdmi-v2.o PLATFORM_OBJS += msm-dai-q6-v2.o - PLATFORM_OBJS += msm-dai-slim.o PLATFORM_OBJS += msm-dai-stub-v2.o PLATFORM_OBJS += msm-lsm-client.o PLATFORM_OBJS += msm-pcm-afe-v2.o @@ -115,6 +119,9 @@ ifdef CONFIG_SND_SOC_QDSP6V2 PLATFORM_OBJS += msm-transcode-loopback-q6-v2.o PLATFORM_OBJS += platform_init.o endif +ifdef CONFIG_WCD9XXX_CODEC_CORE + PLATFORM_OBJS += msm-dai-slim.o +endif ifdef CONFIG_DOLBY_DS2 PLATFORM_OBJS += msm-ds2-dap-config.o endif diff --git a/asoc/codecs/Android.mk b/asoc/codecs/Android.mk index 8eb61c1d01..b73b983ca0 100644 --- a/asoc/codecs/Android.mk +++ b/asoc/codecs/Android.mk @@ -15,9 +15,13 @@ ifeq ($(call is-board-platform,$(TRINKET)),true) AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m endif +ifeq ($(call is-board-platform,kona),true) +AUDIO_SELECT := CONFIG_SND_SOC_KONA=m +endif + AUDIO_CHIPSET := audio # Build/Package only in case of supported target -ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET)),true) +ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET) kona),true) LOCAL_PATH := $(call my-dir) @@ -70,6 +74,7 @@ LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT) include $(DLKM_DIR)/AndroidKernelModule.mk endif ########################################################### +ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET)),true) include $(CLEAR_VARS) LOCAL_MODULE := $(AUDIO_CHIPSET)_wcd_spi.ko LOCAL_MODULE_KBUILD_NAME := wcd_spi_dlkm.ko @@ -77,6 +82,7 @@ LOCAL_MODULE_TAGS := optional LOCAL_MODULE_DEBUG_ENABLE := true LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT) include $(DLKM_DIR)/AndroidKernelModule.mk +endif ########################################################### ifeq ($(call is-board-platform-in-list, ),true) include $(CLEAR_VARS) diff --git a/asoc/codecs/Kbuild b/asoc/codecs/Kbuild index ee4c61f929..a4cbc45d75 100644 --- a/asoc/codecs/Kbuild +++ b/asoc/codecs/Kbuild @@ -29,6 +29,11 @@ ifeq ($(KERNEL_BUILD), 0) export INCS += -include $(AUDIO_ROOT)/config/sm6150autoconf.h endif + ifeq ($(CONFIG_ARCH_KONA), y) + include $(AUDIO_ROOT)/config/konaauto.conf + export + INCS += -include $(AUDIO_ROOT)/config/konaautoconf.h + endif ifeq ($(CONFIG_ARCH_SDMSHRIKE), y) include $(AUDIO_ROOT)/config/sm8150auto.conf export @@ -81,10 +86,18 @@ ifdef CONFIG_WCD9XXX_CODEC_CORE CORE_OBJS += wcd934x/wcd934x-tables.o endif +ifdef CONFIG_WCD9XXX_CODEC_CORE_V2 + CORE_OBJS += msm-cdc-pinctrl.o + CORE_OBJS += msm-cdc-supply.o +endif + ifdef CONFIG_SND_SOC_WCD9XXX_V2 - WCD9XXX_OBJS += wcd-clsh.o +ifdef CONFIG_WCD9XXX_CODEC_CORE WCD9XXX_OBJS += wcd9xxx-common-v2.o WCD9XXX_OBJS += wcd9xxx-resmgr-v2.o +else + WCD9XXX_OBJS += wcd-clsh.o +endif WCD9XXX_OBJS += wcdcal-hwdep.o WCD9XXX_OBJS += wcd9xxx-soc-init.o WCD9XXX_OBJS += wcd-dsp-utils.o @@ -181,6 +194,7 @@ ifeq ($(KERNEL_BUILD), 1) endif # Module information used by KBuild framework obj-$(CONFIG_WCD9XXX_CODEC_CORE) += wcd_core_dlkm.o +obj-$(CONFIG_WCD9XXX_CODEC_CORE_V2) += wcd_core_dlkm.o wcd_core_dlkm-y := $(CORE_OBJS) obj-$(CONFIG_SND_SOC_WCD9XXX_V2) += wcd9xxx_dlkm.o diff --git a/asoc/codecs/bolero/Android.mk b/asoc/codecs/bolero/Android.mk index e858207320..d96d61645e 100644 --- a/asoc/codecs/bolero/Android.mk +++ b/asoc/codecs/bolero/Android.mk @@ -7,9 +7,13 @@ ifeq ($(call is-board-platform,$(MSMSTEPPE) $(TRINKET)),true) AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m endif +ifeq ($(call is-board-platform,kona),true) +AUDIO_SELECT := CONFIG_SND_SOC_KONA=m +endif + AUDIO_CHIPSET := audio # Build/Package only in case of supported target -ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE) $(TRINKET)),true) +ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE) $(TRINKET) kona),true) LOCAL_PATH := $(call my-dir) @@ -17,7 +21,7 @@ LOCAL_PATH := $(call my-dir) ifneq ($(findstring vendor,$(LOCAL_PATH)),) ifneq ($(findstring opensource,$(LOCAL_PATH)),) - AUDIO_BLD_DIR := $(ANDROID_BUILD_TOP)/vendor/qcom/opensource/audio-kernel + AUDIO_BLD_DIR := $(shell pwd)/vendor/qcom/opensource/audio-kernel endif # opensource DLKM_DIR := $(TOP)/device/qcom/common/dlkm diff --git a/asoc/codecs/bolero/Kbuild b/asoc/codecs/bolero/Kbuild index 1c60ec6fa4..f01f523dcf 100644 --- a/asoc/codecs/bolero/Kbuild +++ b/asoc/codecs/bolero/Kbuild @@ -26,6 +26,11 @@ ifeq ($(KERNEL_BUILD), 0) export INCS += -include $(AUDIO_ROOT)/config/sm6150autoconf.h endif + ifeq ($(CONFIG_ARCH_KONA), y) + include $(AUDIO_ROOT)/config/konaauto.conf + export + INCS += -include $(AUDIO_ROOT)/config/konaautoconf.h + endif ifeq ($(CONFIG_ARCH_QCS405), y) include $(AUDIO_ROOT)/config/qcs405auto.conf export diff --git a/asoc/codecs/ep92/Android.mk b/asoc/codecs/ep92/Android.mk index c2ac0599f7..e50f8ebe86 100644 --- a/asoc/codecs/ep92/Android.mk +++ b/asoc/codecs/ep92/Android.mk @@ -17,7 +17,7 @@ LOCAL_PATH := $(call my-dir) ifneq ($(findstring vendor,$(LOCAL_PATH)),) ifneq ($(findstring opensource,$(LOCAL_PATH)),) - AUDIO_BLD_DIR := $(ANDROID_BUILD_TOP)/vendor/qcom/opensource/audio-kernel + AUDIO_BLD_DIR := $(shell pwd)/vendor/qcom/opensource/audio-kernel endif # opensource DLKM_DIR := $(TOP)/device/qcom/common/dlkm diff --git a/asoc/codecs/ep92/Kbuild b/asoc/codecs/ep92/Kbuild index 1b38aad9ff..fc46a72f77 100644 --- a/asoc/codecs/ep92/Kbuild +++ b/asoc/codecs/ep92/Kbuild @@ -11,7 +11,7 @@ endif 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.19 + AUDIO_BLD_DIR := $(shell pwd)/kernel/msm-4.19 AUDIO_ROOT := $(AUDIO_BLD_DIR)/techpack/audio endif diff --git a/asoc/codecs/wcd937x/Android.mk b/asoc/codecs/wcd937x/Android.mk index 95d8058d01..cbd087733d 100644 --- a/asoc/codecs/wcd937x/Android.mk +++ b/asoc/codecs/wcd937x/Android.mk @@ -17,7 +17,7 @@ LOCAL_PATH := $(call my-dir) ifneq ($(findstring vendor,$(LOCAL_PATH)),) ifneq ($(findstring opensource,$(LOCAL_PATH)),) - AUDIO_BLD_DIR := $(ANDROID_BUILD_TOP)/vendor/qcom/opensource/audio-kernel + AUDIO_BLD_DIR := $(shell pwd)/vendor/qcom/opensource/audio-kernel endif # opensource DLKM_DIR := $(TOP)/device/qcom/common/dlkm diff --git a/asoc/platform_init.h b/asoc/platform_init.h index 17f07845e6..caa54042cf 100644 --- a/asoc/platform_init.h +++ b/asoc/platform_init.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. */ #ifndef __PLATFORM_INIT_H__ @@ -9,7 +9,6 @@ int msm_compress_dsp_init(void); int msm_fe_dai_init(void); int msm_dai_q6_hdmi_init(void); int msm_dai_q6_init(void); -int msm_dai_slim_init(void); int msm_dai_stub_init(void); int msm_lsm_client_init(void); int msm_pcm_afe_init(void); @@ -39,11 +38,22 @@ void msm_pcm_dtmf_exit(void); void msm_pcm_afe_exit(void); void msm_lsm_client_exit(void); void msm_dai_stub_exit(void); -void msm_dai_slim_exit(void); void msm_dai_q6_exit(void); void msm_dai_q6_hdmi_exit(void); void msm_fe_dai_exit(void); void msm_compress_dsp_exit(void); +#if IS_ENABLED(CONFIG_WCD9XXX_CODEC_CORE) +int msm_dai_slim_init(void); +void msm_dai_slim_exit(void); +#else +static inline int msm_dai_slim_init(void) +{ + return 0; +}; +static inline void msm_dai_slim_exit(void) +{ +}; +#endif #endif diff --git a/config/konaauto.conf b/config/konaauto.conf new file mode 100644 index 0000000000..328b67f8bd --- /dev/null +++ b/config/konaauto.conf @@ -0,0 +1,36 @@ +CONFIG_PINCTRL_WCD=m +CONFIG_AUDIO_EXT_CLK=m +CONFIG_SND_SOC_WCD9XXX_V2=m +CONFIG_SND_SOC_WCD_MBHC=m +CONFIG_SND_SOC_WSA881X=m +CONFIG_WCD9XXX_CODEC_CORE_V2=m +CONFIG_MSM_CDC_PINCTRL=m +CONFIG_MSM_QDSP6V2_CODECS=m +CONFIG_MSM_ULTRASOUND=m +CONFIG_MSM_QDSP6_APRV2_RPMSG=m +CONFIG_MSM_ADSP_LOADER=m +CONFIG_REGMAP_SWR=m +CONFIG_MSM_QDSP6_SSR=m +CONFIG_MSM_QDSP6_PDR=m +CONFIG_MSM_QDSP6_NOTIFIER=m +CONFIG_SND_SOC_MSM_HOSTLESS_PCM=m +CONFIG_SND_SOC_MSM_QDSP6V2_INTF=m +CONFIG_SOUNDWIRE=m +CONFIG_SOUNDWIRE_MSTR_CTRL=m +CONFIG_SND_SOC_QDSP6V2=m +CONFIG_SND_SOC_WCD_MBHC_ADC=m +CONFIG_SND_SOC_MSM_HDMI_CODEC_RX=m +CONFIG_QTI_PP=m +CONFIG_SND_HWDEP_ROUTING=m +CONFIG_SND_SOC_MSM_STUB=m +CONFIG_MSM_AVTIMER=m +CONFIG_SND_SOC_BOLERO=m +CONFIG_WSA_MACRO=m +CONFIG_VA_MACRO=m +CONFIG_RX_MACRO=m +CONFIG_TX_MACRO=m +CONFIG_SND_SOC_WCD_IRQ=m +CONFIG_SND_SOC_WCD938X=m +CONFIG_SND_SOC_WCD938X_SLAVE=m +CONFIG_SND_SOC_KONA=m +CONFIG_SND_EVENT=m diff --git a/config/konaautoconf.h b/config/konaautoconf.h new file mode 100644 index 0000000000..4e6da4a0be --- /dev/null +++ b/config/konaautoconf.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* Copyright (c) 2018, The Linux Foundation. All rights reserved. + */ + +#define CONFIG_PINCTRL_WCD 1 +#define CONFIG_AUDIO_EXT_CLK 1 +#define CONFIG_SND_SOC_WCD9XXX_V2 1 +#define CONFIG_SND_SOC_WCD_MBHC 1 +#define CONFIG_SND_SOC_WSA881X 1 +#define CONFIG_WCD9XXX_CODEC_CORE_V2 1 +#define CONFIG_MSM_CDC_PINCTRL 1 +#define CONFIG_MSM_QDSP6V2_CODECS 1 +#define CONFIG_MSM_ULTRASOUND 1 +#define CONFIG_MSM_QDSP6_APRV2_RPMSG 1 +#define CONFIG_SND_SOC_MSM_QDSP6V2_INTF 1 +#define CONFIG_MSM_ADSP_LOADER 1 +#define CONFIG_REGMAP_SWR 1 +#define CONFIG_MSM_QDSP6_SSR 1 +#define CONFIG_MSM_QDSP6_PDR 1 +#define CONFIG_MSM_QDSP6_NOTIFIER 1 +#define CONFIG_SND_SOC_MSM_HOSTLESS_PCM 1 +#define CONFIG_SOUNDWIRE 1 +#define CONFIG_SOUNDWIRE_MSTR_CTRL 1 +#define CONFIG_SND_SOC_WCD_MBHC_ADC 1 +#define CONFIG_SND_SOC_QDSP6V2 1 +#define CONFIG_SND_SOC_MSM_HDMI_CODEC_RX 1 +#define CONFIG_QTI_PP 1 +#define CONFIG_SND_HWDEP_ROUTING 1 +#define CONFIG_SND_SOC_MSM_STUB 1 +#define CONFIG_MSM_AVTIMER 1 +#define CONFIG_SND_SOC_BOLERO 1 +#define CONFIG_WSA_MACRO 1 +#define CONFIG_VA_MACRO 1 +#define CONFIG_RX_MACRO 1 +#define CONFIG_TX_MACRO 1 +#define CONFIG_SND_SOC_WCD_IRQ 1 +#define CONFIG_SND_SOC_WCD938X 1 +#define CONFIG_SND_SOC_WCD938X_SLAVE 1 +#define CONFIG_SND_SOC_KONA 1 +#define CONFIG_SND_EVENT 1 diff --git a/dsp/Android.mk b/dsp/Android.mk index c81a1bdc52..ddaebe2d61 100644 --- a/dsp/Android.mk +++ b/dsp/Android.mk @@ -11,9 +11,13 @@ ifeq ($(call is-board-platform,$(MSMSTEPPE) $(TRINKET)),true) AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m endif +ifeq ($(call is-board-platform, kona),true) +AUDIO_SELECT := CONFIG_SND_SOC_KONA=m +endif + AUDIO_CHIPSET := audio # Build/Package only in case of supported target -ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET)),true) +ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET) kona),true) LOCAL_PATH := $(call my-dir) diff --git a/dsp/Kbuild b/dsp/Kbuild index 724dc12aef..11e87c2068 100644 --- a/dsp/Kbuild +++ b/dsp/Kbuild @@ -24,6 +24,11 @@ ifeq ($(KERNEL_BUILD), 0) export INCS += -include $(AUDIO_ROOT)/config/sm6150autoconf.h endif + ifeq ($(CONFIG_ARCH_KONA), y) + include $(AUDIO_ROOT)/config/konaauto.conf + export + INCS += -include $(AUDIO_ROOT)/config/konaautoconf.h + endif ifeq ($(CONFIG_ARCH_SM8150), y) include $(AUDIO_ROOT)/config/sm8150auto.conf export @@ -82,13 +87,15 @@ ifdef CONFIG_SND_SOC_MSM_QDSP6V2_INTF Q6_OBJS += q6common.o Q6_OBJS += rtac.o Q6_OBJS += q6lsm.o - Q6_OBJS += audio_slimslave.o Q6_OBJS += adsp_err.o Q6_OBJS += msm_audio_ion.o Q6_OBJS += avtimer.o Q6_OBJS += q6_init.o endif +ifdef CONFIG_WCD9XXX_CODEC_CORE + Q6_OBJS += audio_slimslave.o +endif ifdef CONFIG_DTS_SRS_TM Q6_OBJS += msm-dts-srs-tm-config.o endif diff --git a/dsp/codecs/Android.mk b/dsp/codecs/Android.mk index 62f6db80a8..25726ace8f 100644 --- a/dsp/codecs/Android.mk +++ b/dsp/codecs/Android.mk @@ -11,9 +11,13 @@ ifeq ($(call is-board-platform,$(MSMSTEPPE) $(TRINKET)),true) AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m endif +ifeq ($(call is-board-platform,kona),true) +AUDIO_SELECT := CONFIG_SND_SOC_KONA=m +endif + AUDIO_CHIPSET := audio # Build/Package only in case of supported target -ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET)),true) +ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET) kona),true) LOCAL_PATH := $(call my-dir) diff --git a/dsp/codecs/Kbuild b/dsp/codecs/Kbuild index 54d64f2d87..c80cace5ee 100644 --- a/dsp/codecs/Kbuild +++ b/dsp/codecs/Kbuild @@ -24,6 +24,11 @@ ifeq ($(KERNEL_BUILD), 0) export INCS += -include $(AUDIO_ROOT)/config/sm6150autoconf.h endif + ifeq ($(CONFIG_ARCH_KONA), y) + include $(AUDIO_ROOT)/config/konaauto.conf + export + INCS += -include $(AUDIO_ROOT)/config/konaautoconf.h + endif ifeq ($(CONFIG_ARCH_SM8150), y) include $(AUDIO_ROOT)/config/sm8150auto.conf export diff --git a/dsp/q6_init.h b/dsp/q6_init.h index 71af2dacdf..21be5241ac 100644 --- a/dsp/q6_init.h +++ b/dsp/q6_init.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * Copyright (c) 2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. */ #ifndef __Q6_INIT_H__ @@ -15,7 +15,6 @@ int audio_cal_init(void); int core_init(void); int rtac_init(void); int msm_audio_ion_init(void); -int audio_slimslave_init(void); int avtimer_init(void); #ifdef CONFIG_MSM_MDF int msm_mdf_init(void); @@ -33,7 +32,6 @@ static inline void msm_mdf_exit(void) #endif void avtimer_exit(void); -void audio_slimslave_exit(void); void msm_audio_ion_exit(void); void rtac_exit(void); void core_exit(void); @@ -44,5 +42,17 @@ void q6asm_exit(void); void afe_exit(void); void adm_exit(void); void adsp_err_exit(void); +#if IS_ENABLED(CONFIG_WCD9XXX_CODEC_CORE) +int audio_slimslave_init(void); +void audio_slimslave_exit(void); +#else +static inline int audio_slimslave_init(void) +{ + return 0; +}; +static inline void audio_slimslave_exit(void) +{ +}; +#endif #endif diff --git a/include/asoc/pdata.h b/include/asoc/pdata.h index 1182ef7881..d24d56aed3 100644 --- a/include/asoc/pdata.h +++ b/include/asoc/pdata.h @@ -6,7 +6,10 @@ #define __MFD_WCD9XXX_PDATA_H__ +#if IS_ENABLED(CONFIG_WCD9XXX_CODEC_CORE) #include +#endif + #include "msm-cdc-supply.h" #define MICBIAS_EXT_BYP_CAP 0x00 @@ -177,7 +180,9 @@ struct wcd9xxx_pdata { struct device_node *micb_en_ctl; struct device_node *wcd_rst_np; struct wcd9xxx_amic amic_settings; +#if IS_ENABLED(CONFIG_WCD9XXX_CODEC_CORE) struct slim_device slimbus_slave_device; +#endif struct wcd9xxx_micbias_setting micbias; struct wcd9xxx_ocp_setting ocp; struct cdc_regulator *regulator; diff --git a/include/asoc/wcd-irq.h b/include/asoc/wcd-irq.h index 1388cfcb77..5460e18067 100644 --- a/include/asoc/wcd-irq.h +++ b/include/asoc/wcd-irq.h @@ -18,7 +18,8 @@ struct wcd_irq_info { struct device *dev; }; -#if IS_ENABLED(CONFIG_WCD9XXX_CODEC_CORE) +#if (IS_ENABLED(CONFIG_WCD9XXX_CODEC_CORE) | \ + IS_ENABLED(CONFIG_WCD9XXX_CODEC_CORE_V2)) int wcd_irq_init(struct wcd_irq_info *irq_info, struct irq_domain **virq); int wcd_irq_exit(struct wcd_irq_info *irq_info, struct irq_domain *virq); int wcd_request_irq(struct wcd_irq_info *irq_info, int irq, const char *name, diff --git a/ipc/Android.mk b/ipc/Android.mk index b54e5225b6..066c5b801c 100644 --- a/ipc/Android.mk +++ b/ipc/Android.mk @@ -11,9 +11,13 @@ ifeq ($(call is-board-platform,$(MSMSTEPPE) $(TRINKET)),true) AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m endif +ifeq ($(call is-board-platform,kona),true) +AUDIO_SELECT := CONFIG_SND_SOC_KONA=m +endif + AUDIO_CHIPSET := audio # Build/Package only in case of supported target -ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET)),true) +ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET) kona),true) LOCAL_PATH := $(call my-dir) @@ -48,6 +52,7 @@ LOCAL_MODULE_DEBUG_ENABLE := true LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT) include $(DLKM_DIR)/AndroidKernelModule.mk ########################################################### +ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET)),true) include $(CLEAR_VARS) LOCAL_MODULE := $(AUDIO_CHIPSET)_wglink.ko LOCAL_MODULE_KBUILD_NAME := wglink_dlkm.ko @@ -55,6 +60,7 @@ LOCAL_MODULE_TAGS := optional LOCAL_MODULE_DEBUG_ENABLE := true LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT) include $(DLKM_DIR)/AndroidKernelModule.mk +endif ########################################################### endif # DLKM check diff --git a/ipc/Kbuild b/ipc/Kbuild index 484d79a37f..3577623d5a 100644 --- a/ipc/Kbuild +++ b/ipc/Kbuild @@ -25,6 +25,11 @@ ifeq ($(KERNEL_BUILD), 0) export INCS += -include $(AUDIO_ROOT)/config/sm6150autoconf.h endif + ifeq ($(CONFIG_ARCH_KONA), y) + include $(AUDIO_ROOT)/config/konaauto.conf + export + INCS += -include $(AUDIO_ROOT)/config/konaautoconf.h + endif ifeq ($(CONFIG_ARCH_SM8150), y) include $(AUDIO_ROOT)/config/sm8150auto.conf export diff --git a/soc/Android.mk b/soc/Android.mk index 7a8bd0e8fb..8ce2c7515f 100644 --- a/soc/Android.mk +++ b/soc/Android.mk @@ -11,9 +11,13 @@ ifeq ($(call is-board-platform,$(MSMSTEPPE) $(TRINKET)),true) AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m endif +ifeq ($(call is-board-platform,kona),true) +AUDIO_SELECT := CONFIG_SND_SOC_KONA=m +endif + AUDIO_CHIPSET := audio # Build/Package only in case of supported target -ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET)),true) +ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET) kona),true) LOCAL_PATH := $(call my-dir) @@ -74,7 +78,7 @@ LOCAL_MODULE_DEBUG_ENABLE := true LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT) include $(DLKM_DIR)/AndroidKernelModule.mk ########################################################### -ifeq ($(call is-board-platform-in-list, $(MSMSTEPPE)),true) +ifeq ($(call is-board-platform-in-list, $(MSMSTEPPE) kona),true) include $(CLEAR_VARS) LOCAL_MODULE := $(AUDIO_CHIPSET)_snd_event.ko LOCAL_MODULE_KBUILD_NAME := snd_event_dlkm.ko diff --git a/soc/Kbuild b/soc/Kbuild index 4e545778bf..12d99c3dc0 100644 --- a/soc/Kbuild +++ b/soc/Kbuild @@ -19,6 +19,11 @@ ifeq ($(KERNEL_BUILD), 0) export INCS += -include $(AUDIO_ROOT)/config/sm8150autoconf.h endif + ifeq ($(CONFIG_ARCH_KONA), y) + include $(AUDIO_ROOT)/config/konaauto.conf + export + INCS += -include $(AUDIO_ROOT)/config/konaautoconf.h + endif ifeq ($(CONFIG_ARCH_SM6150), y) include $(AUDIO_ROOT)/config/sm6150auto.conf export