浏览代码

Merge eb89e5b18668ffbef83f480912bade7c97fc6356 on remote branch

Change-Id: I4e8aed009e0cc718f54241fb2bcf6a99f24a8b68
Linux Build Service Account 1 年之前
父节点
当前提交
420ba7df8d

+ 20 - 0
Android.mk

@@ -338,6 +338,7 @@ LOCAL_MODULE_DEBUG_ENABLE := true
 LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
 include $(DLKM_DIR)/Build_external_kernelmodule.mk
 
+ifneq ($(call is-board-platform-in-list, pitti),true)
 ########################### WSA884x CODEC  ###########################
 include $(CLEAR_VARS)
 LOCAL_SRC_FILES           := $(AUDIO_SRC_FILES)
@@ -395,6 +396,7 @@ LOCAL_MODULE_DEBUG_ENABLE := true
 LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
 include $(DLKM_DIR)/Build_external_kernelmodule.mk
 ########################### WCD939x CODEC  ################################
+endif
 
 ifneq ($(call is-board-platform-in-list, niobe pitti),true)
 include $(CLEAR_VARS)
@@ -414,6 +416,24 @@ LOCAL_MODULE_TAGS         := optional
 LOCAL_MODULE_DEBUG_ENABLE := true
 LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
 include $(DLKM_DIR)/Build_external_kernelmodule.mk
+###########################################################
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES           := $(AUDIO_SRC_FILES)
+LOCAL_MODULE              := wcd9378_dlkm.ko
+LOCAL_MODULE_KBUILD_NAME  := asoc/codecs/wcd9378/wcd9378_dlkm.ko
+LOCAL_MODULE_TAGS         := optional
+LOCAL_MODULE_DEBUG_ENABLE := true
+LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
+include $(DLKM_DIR)/Build_external_kernelmodule.mk
+###########################################################
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES           := $(AUDIO_SRC_FILES)
+LOCAL_MODULE              := wcd9378_slave_dlkm.ko
+LOCAL_MODULE_KBUILD_NAME  := asoc/codecs/wcd9378/wcd9378_slave_dlkm.ko
+LOCAL_MODULE_TAGS         := optional
+LOCAL_MODULE_DEBUG_ENABLE := true
+LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
+include $(DLKM_DIR)/Build_external_kernelmodule.mk
 endif
 ifeq ($(call is-board-platform-in-list, pitti),true)
 ###########################################################

+ 2 - 0
BUILD.bazel

@@ -50,9 +50,11 @@ load(":build/pitti.bzl", "define_pitti")
 load(":build/kalama.bzl", "define_kalama")
 load(":build/blair.bzl", "define_blair")
 load(":build/niobe.bzl", "define_niobe")
+load(":build/volcano.bzl", "define_volcano")
 
 define_kalama()
 define_pineapple()
 define_pitti()
 define_blair()
 define_niobe()
+define_volcano()

+ 2 - 0
EnableBazel.mk

@@ -35,6 +35,8 @@ LOCAL_MODULE_KO_DIRS += asoc/codecs/wcd938x/wcd938x_dlkm.ko
 LOCAL_MODULE_KO_DIRS += asoc/codecs/wcd938x/wcd938x_slave_dlkm.ko
 LOCAL_MODULE_KO_DIRS += asoc/codecs/wcd939x/wcd939x_dlkm.ko
 LOCAL_MODULE_KO_DIRS += asoc/codecs/wcd939x/wcd939x_slave_dlkm.ko
+LOCAL_MODULE_KO_DIRS += asoc/codecs/wcd9378/wcd9378_dlkm.ko
+LOCAL_MODULE_KO_DIRS += asoc/codecs/wcd9378/wcd9378_slave_dlkm.ko
 LOCAL_MODULE_KO_DIRS += asoc/codecs/hdmi_dlkm.ko
 endif
 

+ 1 - 1
Makefile

@@ -15,7 +15,7 @@ AUDIO_ROOT=$(KERNEL_SRC)/$(M)
 
 KBUILD_OPTIONS+=  AUDIO_ROOT=$(AUDIO_ROOT)
 
-all: clean modules
+all: modules
 
 clean:
 	$(MAKE) -C $(KERNEL_SRC) M=$(M) clean

+ 9 - 12
asoc/Kbuild

@@ -16,22 +16,18 @@ endif
 ifeq ($(CONFIG_SND_SOC_AUTO), y)
 	ifdef CONFIG_SND_SOC_SA8155
 		include $(AUDIO_ROOT)/config/sa8155auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_SA6155
 		include $(AUDIO_ROOT)/config/sa6155auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_GVM
 	    include $(AUDIO_ROOT)/config/gvmauto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/gvmautoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_SA7255
 		include $(AUDIO_ROOT)/config/sa7255auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa7255autoconf.h
 	endif
 
@@ -40,22 +36,18 @@ ifeq ($(KERNEL_BUILD), 0)
 	ifeq ($(CONFIG_ARCH_SM8150), y)
 		ifdef CONFIG_SND_SOC_SA8155
 			include $(AUDIO_ROOT)/config/sa8155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm8150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm8150autoconf.h
 		endif
 	endif
 	ifeq ($(CONFIG_ARCH_SM6150), y)
 		ifdef CONFIG_SND_SOC_SA6155
 			include $(AUDIO_ROOT)/config/sa6155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm6150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
 		endif
 	endif
@@ -76,10 +68,18 @@ ifeq ($(KERNEL_BUILD), 0)
 		include $(AUDIO_ROOT)/config/kalamaauto.conf
 		INCS    +=  -include $(AUDIO_ROOT)/config/kalamaautoconf.h
 	endif
-	ifeq ($(CONFIG_ARCH_PINEAPPLE), y)
+	ifeq ($(BOARD_PLATFORM), pineapple)
 		include $(AUDIO_ROOT)/config/pineappleauto.conf
 		INCS    +=  -include $(AUDIO_ROOT)/config/pineappleautoconf.h
 	endif
+	ifeq ($(BOARD_PLATFORM), cliffs)
+		include $(AUDIO_ROOT)/config/pineappleauto.conf
+		INCS    +=  -include $(AUDIO_ROOT)/config/pineappleautoconf.h
+	endif
+	ifeq ($(BOARD_PLATFORM), volcano)
+		include $(AUDIO_ROOT)/config/volcanoauto.conf
+		INCS    +=  -include $(AUDIO_ROOT)/config/volcanoautoconf.h
+	endif
 	ifeq ($(CONFIG_ARCH_PITTI), y)
 		include $(AUDIO_ROOT)/config/pittiauto.conf
 		INCS    +=  -include $(AUDIO_ROOT)/config/pittiautoconf.h
@@ -105,11 +105,9 @@ ifeq ($(KERNEL_BUILD), 0)
 	ifeq ($(CONFIG_ARCH_SDMSHRIKE), y)
 		ifdef CONFIG_SND_SOC_SA8155
 			include $(AUDIO_ROOT)/config/sa8155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm8150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm8150autoconf.h
 		endif
 	endif
@@ -120,7 +118,6 @@ ifeq ($(KERNEL_BUILD), 0)
 	endif
 	ifeq ($(CONFIG_QTI_QUIN_GVM), y)
 		include $(AUDIO_ROOT)/config/gvmauto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/gvmautoconf.h
 	endif
 	ifeq ($(CONFIG_ARCH_SDXLEMUR), y)

+ 0 - 10
asoc/codecs/Kbuild

@@ -16,22 +16,18 @@ endif
 ifeq ($(CONFIG_SND_SOC_AUTO), y)
 	ifdef CONFIG_SND_SOC_SA8155
 		include $(AUDIO_ROOT)/config/sa8155auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_SA6155
 		include $(AUDIO_ROOT)/config/sa6155auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_GVM
 		include $(AUDIO_ROOT)/config/gvmauto.conf
-        export
         INCS    +=  -include $(AUDIO_ROOT)/config/gvmautoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_SA7255
 		include $(AUDIO_ROOT)/config/sa7255auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa7255autoconf.h
 	endif
 else
@@ -39,22 +35,18 @@ ifeq ($(KERNEL_BUILD), 0)
 	ifeq ($(CONFIG_ARCH_SM8150), y)
 		ifdef CONFIG_SND_SOC_SA8155
 			include $(AUDIO_ROOT)/config/sa8155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm8150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm8150autoconf.h
 		endif
 	endif
 	ifeq ($(CONFIG_ARCH_SM6150), y)
 		ifdef CONFIG_SND_SOC_SA6155
 			include $(AUDIO_ROOT)/config/sa6155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm6150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
 		endif
 	endif
@@ -103,7 +95,6 @@ ifeq ($(KERNEL_BUILD), 0)
 	endif
 	ifeq ($(CONFIG_ARCH_SDMSHRIKE), y)
 		include $(AUDIO_ROOT)/config/sm8150auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sm8150autoconf.h
 	endif
 	ifeq ($(CONFIG_ARCH_QCS405), y)
@@ -113,7 +104,6 @@ ifeq ($(KERNEL_BUILD), 0)
 	endif
 	ifeq ($(CONFIG_QTI_QUIN_GVM), y)
 		include $(AUDIO_ROOT)/config/gvmauto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/gvmautoconf.h
 	endif
 	ifeq ($(CONFIG_ARCH_SDXLEMUR), y)

+ 4 - 0
asoc/codecs/lpass-cdc/lpass-cdc-wsa-macro.c

@@ -1132,6 +1132,7 @@ static int lpass_cdc_wsa_macro_enable_vi_decimator(struct snd_soc_component *com
 		snd_soc_component_update_bits(component,
 			LPASS_CDC_WSA_TX1_SPKR_PROT_PATH_CTL,
 		0x20, 0x20);
+		usleep_range(1000, 1500);
 		snd_soc_component_update_bits(component,
 			LPASS_CDC_WSA_TX0_SPKR_PROT_PATH_CTL,
 		0x0F, val);
@@ -1144,6 +1145,7 @@ static int lpass_cdc_wsa_macro_enable_vi_decimator(struct snd_soc_component *com
 		snd_soc_component_update_bits(component,
 			LPASS_CDC_WSA_TX1_SPKR_PROT_PATH_CTL,
 			0x10, 0x10);
+		usleep_range(1000, 1500);
 		snd_soc_component_update_bits(component,
 			LPASS_CDC_WSA_TX0_SPKR_PROT_PATH_CTL,
 			0x20, 0x00);
@@ -1161,6 +1163,7 @@ static int lpass_cdc_wsa_macro_enable_vi_decimator(struct snd_soc_component *com
 		snd_soc_component_update_bits(component,
 			LPASS_CDC_WSA_TX3_SPKR_PROT_PATH_CTL,
 			0x20, 0x20);
+		usleep_range(1000, 1500);
 		snd_soc_component_update_bits(component,
 			LPASS_CDC_WSA_TX2_SPKR_PROT_PATH_CTL,
 			0x0F, val);
@@ -1173,6 +1176,7 @@ static int lpass_cdc_wsa_macro_enable_vi_decimator(struct snd_soc_component *com
 		snd_soc_component_update_bits(component,
 			LPASS_CDC_WSA_TX3_SPKR_PROT_PATH_CTL,
 			0x10, 0x10);
+		usleep_range(1000, 1500);
 		snd_soc_component_update_bits(component,
 			LPASS_CDC_WSA_TX2_SPKR_PROT_PATH_CTL,
 			0x20, 0x00);

+ 6 - 8
asoc/codecs/wcd9378/internal.h

@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
  * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
- * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #ifndef _WCD9378_INTERNAL_H
@@ -65,13 +65,14 @@ enum {
 struct wcd9378_priv {
 	struct device *dev;
 	u32 sys_usage;
+	/* to track the sys_usage status */
+	unsigned long sys_usage_status;
 	u32 wcd_mode;
 
 	int variant;
 	struct snd_soc_component *component;
 	struct device_node *rst_np;
 	struct regmap *regmap;
-	bool sjmic_support;
 
 	struct swr_device *rx_swr_dev;
 	struct swr_device *tx_swr_dev;
@@ -86,6 +87,7 @@ struct wcd9378_priv {
 
 	struct mutex micb_lock;
 	struct mutex wakeup_lock;
+	struct mutex sys_usage_lock;
 	s32 dmic_0_1_clk_cnt;
 	s32 dmic_2_3_clk_cnt;
 	s32 dmic_4_5_clk_cnt;
@@ -97,14 +99,12 @@ struct wcd9378_priv {
 
 	u32 hph_mode;
 	u16 hph_gain;
+	u32 curr_micbias2;
 	u32 rx2_clk_mode;
 	u32 tx_mode[TX_ADC_MAX];
 	s32 adc_count;
 	bool comp1_enable;
 	bool comp2_enable;
-	bool va_amic_en;
-	bool ear_enable;
-	bool aux_enable;
 	bool ldoh;
 	bool bcs_dis;
 	bool dapm_bias_off;
@@ -138,8 +138,6 @@ struct wcd9378_priv {
 	struct snd_info_entry *version_entry;
 	struct snd_info_entry *variant_entry;
 	int flyback_cur_det_disable;
-	int ear_rx_path;
-	int aux_rx_path;
 	bool dev_up;
 	u8 tx_master_ch_map[WCD9378_MAX_SLAVE_CH_TYPES];
 	bool usbc_hs_status;
@@ -226,5 +224,5 @@ extern int wcd9378_mbhc_micb_adjust_voltage(struct snd_soc_component *component,
 					int volt, int micb_num);
 extern int wcd9378_get_micb_vout_ctl_val(u32 micb_mv);
 extern int wcd9378_micbias_control(struct snd_soc_component *component,
-				unsigned char tx_path, int req, bool is_dapm);
+				int micb_num, int req, bool is_dapm);
 #endif /* _WCD9378_INTERNAL_H */

+ 40 - 32
asoc/codecs/wcd9378/wcd9378-mbhc.c

@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 #include <linux/module.h>
 #include <linux/init.h>
@@ -24,9 +24,10 @@
 
 #define WCD9378_ZDET_SUPPORTED          true
 /* Z value defined in milliohm */
+#define WCD9378_ZDET_VAL_0              0
 #define WCD9378_ZDET_VAL_32             32000
 #define WCD9378_ZDET_VAL_400            400000
-#define WCD9378_ZDET_VAL_1200           1200000
+#define WCD9378_ZDET_VAL_2500           2500000
 #define WCD9378_ZDET_VAL_100K           100000000
 /* Z floating defined in ohms */
 #define WCD9378_ZDET_FLOATING_IMPEDANCE 0x0FFFFFFE
@@ -222,6 +223,15 @@ static void wcd9378_mbhc_mbhc_bias_control(struct snd_soc_component *component,
 				    0x01, 0x00);
 }
 
+static void wcd9378_mbhc_get_micbias_val(struct wcd_mbhc *mbhc,
+					int *mb)
+{
+	struct snd_soc_component *component = mbhc->component;
+	struct wcd9378_priv *wcd9378 = dev_get_drvdata(component->dev);
+
+	*mb = wcd9378->curr_micbias2;
+}
+
 static void wcd9378_mbhc_program_btn_thr(struct snd_soc_component *component,
 				       s16 *btn_low, s16 *btn_high,
 				       int num_btn, bool is_micbias)
@@ -272,13 +282,12 @@ static int wcd9378_mbhc_register_notifier(struct wcd_mbhc *mbhc,
 
 static bool wcd9378_mbhc_micb_en_status(struct wcd_mbhc *mbhc, int micb_num)
 {
-	u8 val = 0;
+	struct snd_soc_component *component = mbhc->component;
+	struct wcd9378_priv *wcd9378 =
+			dev_get_drvdata(component->dev);
 
 	if (micb_num == MIC_BIAS_2) {
-		val = ((snd_soc_component_read(mbhc->component,
-								WCD9378_ANA_MICB2) & 0xC0)
-			>> 6);
-		if (val == 0x01)
+		if (wcd9378->curr_micbias2)
 			return true;
 	}
 	return false;
@@ -286,8 +295,10 @@ static bool wcd9378_mbhc_micb_en_status(struct wcd_mbhc *mbhc, int micb_num)
 
 static bool wcd9378_mbhc_hph_pa_on_status(struct snd_soc_component *component)
 {
-	return (snd_soc_component_read(component, WCD9378_ANA_HPH) & 0xC0) ?
-									true : false;
+	if (snd_soc_component_read(component, WCD9378_PDE47_ACT_PS))
+		return false;
+	else
+		return true;
 }
 
 static void wcd9378_mbhc_hph_l_pull_up_control(
@@ -310,18 +321,7 @@ static void wcd9378_mbhc_hph_l_pull_up_control(
 static int wcd9378_mbhc_request_micbias(struct snd_soc_component *component,
 					int micb_num, int req)
 {
-	int ret = 0, tx_path = 0;
-
-	if (micb_num == MIC_BIAS_2) {
-		tx_path = ADC2;
-	} else {
-		pr_err("%s: cannot support other micbias\n", __func__);
-		return -EINVAL;
-	}
-
-	ret = wcd9378_micbias_control(component, tx_path, req, false);
-
-	return ret;
+	return wcd9378_micbias_control(component, micb_num, req, false);
 }
 
 static void wcd9378_mbhc_micb_ramp_control(struct snd_soc_component *component,
@@ -410,6 +410,7 @@ static inline void wcd9378_mbhc_get_result_params(struct wcd9378_priv *wcd9378,
 	regmap_update_bits(wcd9378->regmap, WCD9378_ANA_MBHC_ZDET, 0x20, 0x00);
 	x1 = WCD9378_MBHC_GET_X1(val);
 	c1 = WCD9378_MBHC_GET_C1(val);
+
 	/* If ramp is not complete, give additional 5ms */
 	if ((c1 < 2) && x1)
 		usleep_range(5000, 5050);
@@ -418,6 +419,7 @@ static inline void wcd9378_mbhc_get_result_params(struct wcd9378_priv *wcd9378,
 		dev_dbg(wcd9378->dev,
 			"%s: Impedance detect ramp error, c1=%d, x1=0x%x\n",
 			__func__, c1, x1);
+		*zdet = WCD9378_ZDET_VAL_0;
 		goto ramp_down;
 	}
 	d1 = d1_a[c1];
@@ -524,10 +526,10 @@ static void wcd9378_wcd_mbhc_calc_impedance(struct wcd_mbhc *mbhc, uint32_t *zl,
 	int zMono, z_diff1, z_diff2;
 	bool is_fsm_disable = false;
 	struct wcd9378_mbhc_zdet_param zdet_param[] = {
-		{4, 0, 4, 0x08, 0x14, 0x18}, /* < 32ohm */
-		{2, 0, 3, 0x18, 0x7C, 0x90}, /* 32ohm < Z < 400ohm */
-		{1, 4, 5, 0x18, 0x7C, 0x90}, /* 400ohm < Z < 1200ohm */
-		{1, 6, 7, 0x18, 0x7C, 0x90}, /* >1200ohm */
+		{4, 0, 4, 0x08, 0x14, 0x18}, /* 0ohm < Z < 32ohm */
+		{2, 0, 3, 0x20, 0x7C, 0x90}, /* 32ohm < Z < 400ohm */
+		{2, 4, 6, 0x20, 0x7C, 0x90}, /* 400ohm < Z < 2500ohm */
+		{2, 5, 7, 0x20, 0x7C, 0x90}, /* >2500ohm or < 0ohm */
 	};
 	struct wcd9378_mbhc_zdet_param *zdet_param_ptr = NULL;
 	s16 d1_a[][4] = {
@@ -578,14 +580,16 @@ static void wcd9378_wcd_mbhc_calc_impedance(struct wcd_mbhc *mbhc, uint32_t *zl,
 		goto left_ch_impedance;
 
 	/* Second ramp for left ch */
-	if (z1L < WCD9378_ZDET_VAL_32) {
+	if ((z1L < WCD9378_ZDET_VAL_32) &&
+		(z1L >= WCD9378_ZDET_VAL_0)) {
 		zdet_param_ptr = &zdet_param[0];
 		d1 = d1_a[0];
 	} else if ((z1L > WCD9378_ZDET_VAL_400) &&
-		  (z1L <= WCD9378_ZDET_VAL_1200)) {
+		  (z1L <= WCD9378_ZDET_VAL_2500)) {
 		zdet_param_ptr = &zdet_param[2];
 		d1 = d1_a[2];
-	} else if (z1L > WCD9378_ZDET_VAL_1200) {
+	} else if ((z1L > WCD9378_ZDET_VAL_2500) ||
+		(z1L < WCD9378_ZDET_VAL_0)) {
 		zdet_param_ptr = &zdet_param[3];
 		d1 = d1_a[3];
 	}
@@ -607,19 +611,22 @@ left_ch_impedance:
 	/* Start of right impedance ramp and calculation */
 	wcd9378_mbhc_zdet_ramp(component, zdet_param_ptr, NULL, &z1R, d1);
 	if (WCD9378_MBHC_IS_SECOND_RAMP_REQUIRED(z1R)) {
-		if (((z1R > WCD9378_ZDET_VAL_1200) &&
+		if ((((z1R > WCD9378_ZDET_VAL_2500) ||
+			(z1R < WCD9378_ZDET_VAL_0)) &&
 			(zdet_param_ptr->noff == 0x6)) ||
 			((*zl) != WCD9378_ZDET_FLOATING_IMPEDANCE))
 			goto right_ch_impedance;
 		/* Second ramp for right ch */
-		if (z1R < WCD9378_ZDET_VAL_32) {
+		if ((z1R < WCD9378_ZDET_VAL_32) &&
+			(z1R >= WCD9378_ZDET_VAL_0)) {
 			zdet_param_ptr = &zdet_param[0];
 			d1 = d1_a[0];
 		} else if ((z1R > WCD9378_ZDET_VAL_400) &&
-			(z1R <= WCD9378_ZDET_VAL_1200)) {
+			(z1R <= WCD9378_ZDET_VAL_2500)) {
 			zdet_param_ptr = &zdet_param[2];
 			d1 = d1_a[2];
-		} else if (z1R > WCD9378_ZDET_VAL_1200) {
+		} else if ((z1L > WCD9378_ZDET_VAL_2500) ||
+		(z1L < WCD9378_ZDET_VAL_0)) {
 			zdet_param_ptr = &zdet_param[3];
 			d1 = d1_a[3];
 		}
@@ -833,6 +840,7 @@ static const struct wcd_mbhc_cb mbhc_cb = {
 	.clk_setup = wcd9378_mbhc_clk_setup,
 	.map_btn_code_to_num = wcd9378_mbhc_btn_to_num,
 	.mbhc_bias = wcd9378_mbhc_mbhc_bias_control,
+	.get_micbias_val = wcd9378_mbhc_get_micbias_val,
 	.set_btn_thr = wcd9378_mbhc_program_btn_thr,
 	.lock_sleep = wcd9378_mbhc_lock_sleep,
 	.register_notifier = wcd9378_mbhc_register_notifier,

+ 2 - 1
asoc/codecs/wcd9378/wcd9378-registers.h

@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #ifndef WCD9378_REGISTERS_H
@@ -873,6 +873,7 @@ enum {
 #define WCD9378_TX_NEW_TX_CH34_MUX_CH3_SEL_SHIFT                          0x00
 #define WCD9378_CDC_HPH_GAIN_CTL_HPHR_RX_EN_SHIFT                         0x03
 #define WCD9378_CDC_HPH_GAIN_CTL_HPHL_RX_EN_SHIFT                         0x02
+#define WCD9378_CDC_AUX_GAIN_CTL_AUX_EN_SHIFT                             0x00
 
 #define SWRS_SCP_BASE_CLK_BASE                 (0x004d)
 #define SWRS_SCP_BUSCLOCK_SCALE_BANK0          (0x0062)

文件差异内容过多而无法显示
+ 379 - 201
asoc/codecs/wcd9378/wcd9378.c


+ 4 - 2
asoc/codecs/wcd937x/wcd937x.c

@@ -3358,7 +3358,8 @@ static int wcd937x_bind(struct device *dev)
 	pdata = wcd937x_populate_dt_data(dev);
 	if (!pdata) {
 		dev_err(dev, "%s: Fail to obtain platform data\n", __func__);
-		return -EINVAL;
+		ret = -EINVAL;
+		goto err_pdata;
 	}
 	wcd937x->dev = dev;
 	wcd937x->dev->platform_data = pdata;
@@ -3524,8 +3525,9 @@ err_irq:
 err:
 	component_unbind_all(dev, wcd937x);
 err_bind_all:
-	dev_set_drvdata(dev, NULL);
 	kfree(pdata);
+err_pdata:
+	dev_set_drvdata(dev, NULL);
 	kfree(wcd937x);
 	return ret;
 }

+ 2 - 1
asoc/codecs/wsa884x/wsa884x-tables.c

@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <linux/regmap.h>
@@ -390,7 +391,7 @@ const u8 wsa884x_reg_access[WSA884X_NUM_REGISTERS] = {
 	[WSA884X_REG(WSA884X_SPARE_2)]                        = RD_WR_REG,
 	[WSA884X_REG(WSA884X_SCODE)]                          = RD_WR_REG,
 	[WSA884X_REG(WSA884X_DIG_TRIM_PAGE)]                  = RD_WR_REG,
-	[WSA884X_REG(WSA884X_OTP_REG_0)]                      = RD_WR_REG,
+	[WSA884X_REG(WSA884X_OTP_REG_0)]                      = RD_REG,
 	[WSA884X_REG(WSA884X_OTP_REG_1)]                      = RD_WR_REG,
 	[WSA884X_REG(WSA884X_OTP_REG_2)]                      = RD_WR_REG,
 	[WSA884X_REG(WSA884X_OTP_REG_3)]                      = RD_WR_REG,

+ 13 - 19
asoc/codecs/wsa884x/wsa884x.c

@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <linux/module.h>
@@ -1310,14 +1310,11 @@ static int wsa884x_enable_swr_dac_port(struct snd_soc_dapm_widget *w,
 			ch_rate[num_port] = SWR_CLK_RATE_4P8MHZ;
 		++num_port;
 
-		if (wsa884x->comp_enable) {
-			wsa884x_set_port(component, SWR_COMP_PORT,
-					&port_id[num_port], &num_ch[num_port],
-					&ch_mask[num_port], &ch_rate[num_port],
-					&port_type[num_port]);
-			++num_port;
-			set_bit(COMP_PORT_EN_STATUS_BIT, &wsa884x->port_status_mask);
-		}
+		wsa884x_set_port(component, SWR_COMP_PORT,
+				&port_id[num_port], &num_ch[num_port],
+				&ch_mask[num_port], &ch_rate[num_port],
+				&port_type[num_port]);
+		++num_port;
 		if (wsa884x->pbr_enable) {
 			wsa884x_set_port(component, SWR_PBR_PORT,
 					&port_id[num_port], &num_ch[num_port],
@@ -1356,15 +1353,12 @@ static int wsa884x_enable_swr_dac_port(struct snd_soc_dapm_widget *w,
 				&port_type[num_port]);
 		++num_port;
 
-		if (wsa884x->comp_enable &&
-			test_bit(COMP_PORT_EN_STATUS_BIT, &wsa884x->port_status_mask)) {
-			wsa884x_set_port(component, SWR_COMP_PORT,
-					&port_id[num_port], &num_ch[num_port],
-					&ch_mask[num_port], &ch_rate[num_port],
-					&port_type[num_port]);
-			++num_port;
-			clear_bit(COMP_PORT_EN_STATUS_BIT, &wsa884x->port_status_mask);
-		}
+		wsa884x_set_port(component, SWR_COMP_PORT,
+				&port_id[num_port], &num_ch[num_port],
+				&ch_mask[num_port], &ch_rate[num_port],
+				&port_type[num_port]);
+		++num_port;
+
 		if (wsa884x->pbr_enable &&
 			test_bit(PBR_PORT_EN_STATUS_BIT, &wsa884x->port_status_mask)) {
 			wsa884x_set_port(component, SWR_PBR_PORT,
@@ -2249,7 +2243,7 @@ static int wsa884x_swr_probe(struct swr_device *pdev)
 				goto err_mem;
 			}
 
-			sys_gain_length = sys_gain_size / (2 * sizeof(u32));
+			sys_gain_length = sys_gain_size / sizeof(u32);
 			ret = of_property_read_u32_array(
 				wsa884x->macro_dev->dev.of_node,
 				"qcom,wsa-system-gains", wsa884x->sys_gains,

+ 75 - 14
asoc/pineapple.c

@@ -64,6 +64,7 @@
 #define WCN_CDC_SLIM_RX_CH_MAX 2
 #define WCN_CDC_SLIM_TX_CH_MAX 2
 #define WCN_CDC_SLIM_TX_CH_MAX_LITO 3
+#define WCN_CDC_SLIM_TX_CH_MAX_FM 3
 
 /* Number of WSAs */
 #define MONO_SPEAKER    1
@@ -455,6 +456,23 @@ static int msm_wcn_init(struct snd_soc_pcm_runtime *rtd)
 	msm_common_dai_link_init(rtd);
     return ret;
 }
+
+static int msm_wcn_init_btfm(struct snd_soc_pcm_runtime *rtd)
+{
+	unsigned int rx_ch[WCN_CDC_SLIM_RX_CH_MAX] = {157, 158};
+	unsigned int tx_ch[WCN_CDC_SLIM_TX_CH_MAX_FM]  = {159, 160, 161};
+	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
+	int ret = 0;
+
+	ret = snd_soc_dai_set_channel_map(codec_dai, ARRAY_SIZE(tx_ch),
+					   tx_ch, ARRAY_SIZE(rx_ch), rx_ch);
+	if (ret)
+		return ret;
+
+	msm_common_dai_link_init(rtd);
+	return ret;
+}
+
 #endif
 
 static struct snd_info_entry *msm_snd_info_create_subdir(struct module *mod,
@@ -633,6 +651,29 @@ static struct snd_soc_dai_link msm_wcn_be_dai_links[] = {
 };
 
 static struct snd_soc_dai_link msm_wcn_btfm_be_dai_links[] = {
+	{
+		.name = LPASS_BE_SLIMBUS_7_RX,
+		.stream_name = LPASS_BE_SLIMBUS_7_RX,
+		.playback_only = 1,
+		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
+			SND_SOC_DPCM_TRIGGER_POST},
+		.init = &msm_wcn_init_btfm,
+		.ops = &msm_common_be_ops,
+		/* dai link has playback support */
+		.ignore_pmdown_time = 1,
+		.ignore_suspend = 1,
+		SND_SOC_DAILINK_REG(slimbus_7_rx),
+	},
+	{
+		.name = LPASS_BE_SLIMBUS_7_TX,
+		.stream_name = LPASS_BE_SLIMBUS_7_TX,
+		.capture_only = 1,
+		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
+			SND_SOC_DPCM_TRIGGER_POST},
+		.ops = &msm_common_be_ops,
+		.ignore_suspend = 1,
+		SND_SOC_DAILINK_REG(slimbus_7_tx),
+	},
 	{
 		.name = LPASS_BE_SLIMBUS_8_TX,
 		.stream_name = LPASS_BE_SLIMBUS_8_TX,
@@ -1709,15 +1750,25 @@ static int msm_int_wsa883x_init(struct snd_soc_pcm_runtime *rtd)
 		component = snd_soc_rtdcom_lookup(rtd, "wsa-codec.1");
 		if (!component) {
 			pr_err("%s: wsa-codec.1 component is NULL\n", __func__);
-			return -EINVAL;
-		}
+			component = snd_soc_rtdcom_lookup(rtd, "wsa-codec.2");
+			if (!component) {
+				pr_err("%s: wsa-codec.2 component is NULL\n", __func__);
+				return -EINVAL;
+			}
+			wsa883x_set_channel_map(component, &spkright_ports[0],
+					WSA883X_MAX_SWR_PORTS, &ch_mask[0],
+					&ch_rate[0], &spkright_port_types[0]);
 
-		wsa883x_set_channel_map(component, &spkleft_ports[0],
-				WSA883X_MAX_SWR_PORTS, &ch_mask[0],
-				&ch_rate[0], &spkleft_port_types[0]);
+			wsa883x_codec_info_create_codec_entry(pdata->codec_root,
+					component);
+		} else {
+			wsa883x_set_channel_map(component, &spkleft_ports[0],
+					WSA883X_MAX_SWR_PORTS, &ch_mask[0],
+					&ch_rate[0], &spkleft_port_types[0]);
 
-		wsa883x_codec_info_create_codec_entry(pdata->codec_root,
-				component);
+			wsa883x_codec_info_create_codec_entry(pdata->codec_root,
+					component);
+		}
 	}
 
 	/* If current platform has more than one WSA */
@@ -1794,15 +1845,25 @@ static int msm_int_wsa884x_init(struct snd_soc_pcm_runtime *rtd)
 		component = snd_soc_rtdcom_lookup(rtd, "wsa-codec.1");
 		if (!component) {
 			pr_err("%s: wsa-codec.1 component is NULL\n", __func__);
-			return -EINVAL;
-		}
+			component = snd_soc_rtdcom_lookup(rtd, "wsa-codec.2");
+			if (!component) {
+				pr_err("%s: wsa-codec.2 component is NULL\n", __func__);
+				return -EINVAL;
+			}
+			wsa884x_set_channel_map(component, &spkright_ports[0],
+					WSA884X_MAX_SWR_PORTS, &ch_mask[0],
+					&ch_rate[0], &spkright_port_types[0]);
 
-		wsa884x_set_channel_map(component, &spkleft_ports[0],
-			WSA884X_MAX_SWR_PORTS, &ch_mask[0],
-			&ch_rate[0], &spkleft_port_types[0]);
+			wsa884x_codec_info_create_codec_entry(pdata->codec_root,
+					component);
+		} else {
+			wsa884x_set_channel_map(component, &spkleft_ports[0],
+				WSA884X_MAX_SWR_PORTS, &ch_mask[0],
+				&ch_rate[0], &spkleft_port_types[0]);
 
-		wsa884x_codec_info_create_codec_entry(pdata->codec_root,
-				component);
+			wsa884x_codec_info_create_codec_entry(pdata->codec_root,
+					component);
+		}
 	}
 
 	/* If current platform has more than one WSA */

+ 2 - 0
audio_kernel_modules.mk

@@ -46,6 +46,8 @@ AUDIO_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/wsa884x_dlkm.ko \
 	$(KERNEL_MODULES_OUT)/wcd937x_slave_dlkm.ko \
 	$(KERNEL_MODULES_OUT)/wcd938x_dlkm.ko \
 	$(KERNEL_MODULES_OUT)/wcd938x_slave_dlkm.ko \
+	$(KERNEL_MODULES_OUT)/wcd9378_dlkm.ko \
+	$(KERNEL_MODULES_OUT)/wcd9378_slave_dlkm.ko \
 	$(KERNEL_MODULES_OUT)/swr_dmic_dlkm.ko
 endif
 ifneq ($(call is-board-platform-in-list,niobe pitti), true)

+ 3 - 1
audio_kernel_product_board.mk

@@ -33,7 +33,9 @@ PRODUCT_PACKAGES += $(KERNEL_MODULES_OUT)/swr_dmic_dlkm.ko \
 	$(KERNEL_MODULES_OUT)/wcd937x_dlkm.ko \
 	$(KERNEL_MODULES_OUT)/wcd937x_slave_dlkm.ko \
 	$(KERNEL_MODULES_OUT)/wcd938x_dlkm.ko \
-	$(KERNEL_MODULES_OUT)/wcd938x_slave_dlkm.ko
+	$(KERNEL_MODULES_OUT)/wcd938x_slave_dlkm.ko \
+	$(KERNEL_MODULES_OUT)/wcd9378_dlkm.ko \
+	$(KERNEL_MODULES_OUT)/wcd9378_slave_dlkm.ko
 endif
 ifneq ($(call is-board-platform-in-list,niobe pitti), true)
 PRODUCT_PACKAGES += $(KERNEL_MODULES_OUT)/wcd939x_dlkm.ko \

+ 4 - 1
audio_modules.bzl

@@ -163,6 +163,9 @@ audio_modules.register(
         "CONFIG_SND_SOC_PITTI": [
             "pineapple.c"
         ],
+	"CONFIG_SND_SOC_VOLCANO": [
+	    "pineapple.c"
+	],
         "CONFIG_SND_SOC_NIOBE": [
             "pineapple.c"
         ],
@@ -460,4 +463,4 @@ audio_modules.register(
     path = ASOC_CODECS_PATH + "/wcd9378",
     config_option = "CONFIG_SND_SOC_WCD9378_SLAVE",
     srcs = ["wcd9378-slave.c"]
-)
+)

+ 3 - 1
build/pineapple.bzl

@@ -41,7 +41,9 @@ def define_pineapple():
             "wcd938x_dlkm",
             "wcd938x_slave_dlkm",
             "wcd939x_dlkm",
-            "wcd939x_slave_dlkm"
+            "wcd939x_slave_dlkm",
+            "wcd9378_dlkm",
+            "wcd9378_slave_dlkm"
         ],
         config_options = [
             "CONFIG_SND_SOC_PINEAPPLE",

+ 63 - 0
build/volcano.bzl

@@ -0,0 +1,63 @@
+load(":audio_modules.bzl", "audio_modules")
+load(":module_mgr.bzl", "define_target_modules")
+
+def define_volcano():
+    define_target_modules(
+        target = "volcano",
+        variants = ["consolidate", "gki"],
+        registry = audio_modules,
+        modules = [
+            "q6_dlkm",
+            "spf_core_dlkm",
+            "audpkt_ion_dlkm",
+            "q6_notifier_dlkm",
+            "adsp_loader_dlkm",
+            "audio_prm_dlkm",
+            "q6_pdr_dlkm",
+            "gpr_dlkm",
+            "audio_pkt_dlkm",
+            "pinctrl_lpi_dlkm",
+            "swr_dlkm",
+            "swr_ctrl_dlkm",
+            "snd_event_dlkm",
+            "machine_dlkm",
+            "wcd_core_dlkm",
+            "mbhc_dlkm",
+            "swr_dmic_dlkm",
+            "wcd9xxx_dlkm",
+            "swr_haptics_dlkm",
+            "stub_dlkm",
+            "hdmi_dlkm",
+            "lpass_cdc_dlkm",
+            "lpass_cdc_wsa_macro_dlkm",
+            "lpass_cdc_wsa2_macro_dlkm",
+            "lpass_cdc_va_macro_dlkm",
+            "lpass_cdc_rx_macro_dlkm",
+            "lpass_cdc_tx_macro_dlkm",
+            "wsa883x_dlkm",
+            "wsa884x_dlkm",
+            "wcd937x_dlkm",
+            "wcd937x_slave_dlkm",
+            "wcd938x_dlkm",
+            "wcd938x_slave_dlkm",
+            "wcd939x_dlkm",
+            "wcd939x_slave_dlkm",
+            "wcd9378_dlkm",
+            "wcd9378_slave_dlkm"
+        ],
+        config_options = [
+            "CONFIG_SND_SOC_VOLCANO",
+            "CONFIG_SND_SOC_MSM_QDSP6V2_INTF",
+            "CONFIG_MSM_QDSP6_SSR",
+            "CONFIG_DIGITAL_CDC_RSC_MGR",
+            "CONFIG_SOUNDWIRE_MSTR_CTRL",
+            "CONFIG_SWRM_VER_1P7",
+            "CONFIG_BOLERO_VER_2P6",
+            "CONFIG_WCD9XXX_CODEC_CORE_V2",
+            "CONFIG_MSM_CDC_PINCTRL",
+            "CONFIG_SND_SOC_WCD_IRQ",
+            "CONFIG_SND_SOC_WCD9XXX_V2",
+            "CONFIG_SND_SOC_WCD_MBHC_ADC",
+            "CONFIG_MSM_EXT_DISPLAY",
+        ]
+    )

+ 3 - 0
config/pineappleauto.conf

@@ -1,5 +1,6 @@
 export CONFIG_SND_SOC_MSM_QDSP6V2_INTF=m
 export CONFIG_SND_SOC_PINEAPPLE=m
+export CONFIG_SND_SOC_VOLCANO=m
 export CONFIG_SND_EVENT=m
 export CONFIG_AUDIO_PKT_ION=m
 export CONFIG_MSM_QDSP6_NOTIFIER=m
@@ -32,6 +33,8 @@ export CONFIG_SND_SOC_WCD938X=m
 export CONFIG_SND_SOC_WCD938X_SLAVE=m
 export CONFIG_SND_SOC_WCD939X=m
 export CONFIG_SND_SOC_WCD939X_SLAVE=m
+export CONFIG_SND_SOC_WCD9378=m
+export CONFIG_SND_SOC_WCD9378_SLAVE=m
 export CONFIG_SND_SOC_WCD_MBHC=m
 export CONFIG_SND_SOC_WCD_MBHC_ADC=m
 export CONFIG_SND_SWR_HAPTICS=m

+ 4 - 1
config/pineappleautoconf.h

@@ -1,11 +1,12 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
  * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #define CONFIG_SND_SOC_MSM_QDSP6V2_INTF 1
 #define CONFIG_SND_SOC_PINEAPPLE 1
+#define CONFIG_SND_SOC_VOLCANO 1
 #define CONFIG_SND_EVENT 1
 #define CONFIG_AUDIO_PKT_ION 1
 #define CONFIG_MSM_QDSP6_NOTIFIER 1
@@ -40,6 +41,8 @@
 #define CONFIG_SND_SOC_WCD938X_SLAVE 1
 #define CONFIG_SND_SOC_WCD939X 1
 #define CONFIG_SND_SOC_WCD939X_SLAVE 1
+#define CONFIG_SND_SOC_WCD9378 1
+#define CONFIG_SND_SOC_WCD9378_SLAVE 1
 #define CONFIG_SND_SOC_WCD_MBHC 1
 #define CONFIG_SND_SOC_WCD_MBHC_ADC 1
 #define CONFIG_SND_SWR_HAPTICS 1

+ 3 - 3
config/pittiauto.conf

@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
-/*
- * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved.
- */
+#
+# Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved.
+#
 export CONFIG_SND_SOC_MSM_QDSP6V2_INTF=m
 export CONFIG_SND_SOC_PITTI=m
 export CONFIG_SND_EVENT=m

+ 47 - 0
config/volcanoauto.conf

@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
+#
+export CONFIG_SND_SOC_MSM_QDSP6V2_INTF=m
+export CONFIG_SND_SOC_PINEAPPLE=m
+export CONFIG_SND_SOC_VOLCANO=m
+export CONFIG_SND_EVENT=m
+export CONFIG_AUDIO_PKT_ION=m
+export CONFIG_MSM_QDSP6_NOTIFIER=m
+export CONFIG_MSM_QDSP6_SSR=m
+export CONFIG_MSM_ADSP_LOADER=m
+export CONFIG_SPF_CORE=m
+export CONFIG_MSM_QDSP6_GPR_RPMSG=m
+export CONFIG_MSM_QDSP6_PDR=m
+export CONFIG_AUDIO_PRM=m
+export CONFIG_AUDIO_PKT=m
+export CONFIG_DIGITAL_CDC_RSC_MGR=m
+export CONFIG_PINCTRL_LPI=m
+export CONFIG_SOUNDWIRE=m
+export CONFIG_SOUNDWIRE_MSTR_CTRL=m
+export CONFIG_WCD9XXX_CODEC_CORE_V2=m
+export CONFIG_MSM_CDC_PINCTRL=m
+export CONFIG_SND_SOC_WSA884X=m
+export CONFIG_SND_SOC_WSA883X=m
+export CONFIG_SND_SOC_LPASS_CDC=m
+export CONFIG_SND_SOC_WCD_IRQ=m
+export CONFIG_LPASS_CDC_WSA2_MACRO=m
+export CONFIG_LPASS_CDC_WSA_MACRO=m
+export CONFIG_LPASS_CDC_VA_MACRO=m
+export CONFIG_LPASS_CDC_TX_MACRO=m
+export CONFIG_LPASS_CDC_RX_MACRO=m
+export CONFIG_SND_SOC_WCD9XXX_V2=m
+export CONFIG_SND_SOC_WCD937X=m
+export CONFIG_SND_SOC_WCD937X_SLAVE=m
+export CONFIG_SND_SOC_WCD938X=m
+export CONFIG_SND_SOC_WCD938X_SLAVE=m
+export CONFIG_SND_SOC_WCD939X=m
+export CONFIG_SND_SOC_WCD939X_SLAVE=m
+export CONFIG_SND_SOC_WCD9378=m
+export CONFIG_SND_SOC_WCD9378_SLAVE=m
+export CONFIG_SND_SOC_WCD_MBHC=m
+export CONFIG_SND_SOC_WCD_MBHC_ADC=m
+export CONFIG_SND_SWR_HAPTICS=m
+export CONFIG_SND_SOC_MSM_STUB=m
+export CONFIG_SND_SOC_MSM_HDMI_CODEC_RX=m
+export CONFIG_SND_SOC_SWR_DMIC=m

+ 52 - 0
config/volcanoautoconf.h

@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#define CONFIG_SND_SOC_MSM_QDSP6V2_INTF 1
+#define CONFIG_SND_SOC_PINEAPPLE 1
+#define CONFIG_SND_SOC_VOLCANO 1
+#define CONFIG_SND_EVENT 1
+#define CONFIG_AUDIO_PKT_ION 1
+#define CONFIG_MSM_QDSP6_NOTIFIER 1
+#define CONFIG_MSM_QDSP6_SSR 1
+#define CONFIG_MSM_QDSP6_PDR 1
+#define CONFIG_MSM_ADSP_LOADER 1
+#define CONFIG_SPF_CORE 1
+#define CONFIG_MSM_QDSP6_GPR_RPMSG 1
+#define CONFIG_AUDIO_PRM 1
+#define CONFIG_AUDIO_PKT 1
+#define CONFIG_DIGITAL_CDC_RSC_MGR 1
+#define CONFIG_PINCTRL_LPI 1
+#define CONFIG_SOUNDWIRE 1
+#define CONFIG_SOUNDWIRE_MSTR_CTRL 1
+#define CONFIG_SWRM_VER_1P7 1
+#define CONFIG_BOLERO_VER_2P6 1
+#define CONFIG_WCD9XXX_CODEC_CORE_V2 1
+#define CONFIG_MSM_CDC_PINCTRL 1
+#define CONFIG_SND_SOC_WSA884X 1
+#define CONFIG_SND_SOC_WSA883X 1
+#define CONFIG_SND_SOC_LPASS_CDC 1
+#define CONFIG_SND_SOC_WCD_IRQ 1
+#define CONFIG_LPASS_CDC_WSA2_MACRO 1
+#define CONFIG_LPASS_CDC_WSA_MACRO 1
+#define CONFIG_LPASS_CDC_VA_MACRO 1
+#define CONFIG_LPASS_CDC_TX_MACRO 1
+#define CONFIG_LPASS_CDC_RX_MACRO 1
+#define CONFIG_SND_SOC_WCD9XXX_V2 1
+#define CONFIG_SND_SOC_WCD937X 1
+#define CONFIG_SND_SOC_WCD937X_SLAVE 1
+#define CONFIG_SND_SOC_WCD938X 1
+#define CONFIG_SND_SOC_WCD938X_SLAVE 1
+#define CONFIG_SND_SOC_WCD939X 1
+#define CONFIG_SND_SOC_WCD939X_SLAVE 1
+#define CONFIG_SND_SOC_WCD9378 1
+#define CONFIG_SND_SOC_WCD9378_SLAVE 1
+#define CONFIG_SND_SOC_WCD_MBHC 1
+#define CONFIG_SND_SOC_WCD_MBHC_ADC 1
+#define CONFIG_SND_SWR_HAPTICS 1
+#define CONFIG_SND_SOC_MSM_STUB 1
+#define CONFIG_SND_SOC_MSM_HDMI_CODEC_RX 1
+#define CONFIG_MSM_EXT_DISPLAY 1
+#define CONFIG_SND_SOC_SWR_DMIC 1

+ 0 - 12
dsp/Kbuild

@@ -16,22 +16,18 @@ endif
 ifeq ($(CONFIG_SND_SOC_AUTO), y)
 	ifdef CONFIG_SND_SOC_SA8155
 		include $(AUDIO_ROOT)/config/sa8155auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_SA6155
 		include $(AUDIO_ROOT)/config/sa6155auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_GVM
 		include $(AUDIO_ROOT)/config/gvmauto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/gvmautoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_SA7255
 		include $(AUDIO_ROOT)/config/sa7255auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa7255autoconf.h
 	endif
 else
@@ -39,17 +35,14 @@ ifeq ($(KERNEL_BUILD), 0)
 	ifeq ($(CONFIG_ARCH_SM6150), y)
 		ifdef CONFIG_SND_SOC_SA6155
 			include $(AUDIO_ROOT)/config/sa6155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm6150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
 		endif
 	endif
 	ifeq ($(CONFIG_ARCH_TRINKET), y)
 		include $(AUDIO_ROOT)/config/sm6150auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
 	endif
 	ifeq ($(CONFIG_ARCH_KONA), y)
@@ -93,22 +86,18 @@ ifeq ($(KERNEL_BUILD), 0)
 	ifeq ($(CONFIG_ARCH_SM8150), y)
 		ifdef CONFIG_SND_SOC_SA8155
 			include $(AUDIO_ROOT)/config/sa8155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm8150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm8150autoconf.h
 		endif
 	endif
 	ifeq ($(CONFIG_ARCH_SDMSHRIKE), y)
 		ifdef CONFIG_SND_SOC_SA8155
 			include $(AUDIO_ROOT)/config/sa8155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm8150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm8150autoconf.h
 		endif
 	endif
@@ -119,7 +108,6 @@ ifeq ($(KERNEL_BUILD), 0)
 	endif
 	ifeq ($(CONFIG_QTI_QUIN_GVM), y)
 		include $(AUDIO_ROOT)/config/gvmauto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/gvmautoconf.h
 	endif
 	ifeq ($(CONFIG_ARCH_SDXLEMUR), y)

+ 0 - 11
ipc/Kbuild

@@ -17,22 +17,18 @@ endif
 ifeq ($(CONFIG_SND_SOC_AUTO), y)
 	ifdef CONFIG_SND_SOC_SA8155
 		include $(AUDIO_ROOT)/config/sa8155auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_SA6155
 		include $(AUDIO_ROOT)/config/sa6155auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_GVM
 		include $(AUDIO_ROOT)/config/gvmauto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/gvmautoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_SA7255
 		include $(AUDIO_ROOT)/config/sa7255auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa7255autoconf.h
 	endif
 else
@@ -40,11 +36,9 @@ ifeq ($(KERNEL_BUILD), 0)
         ifeq ($(CONFIG_ARCH_SM6150), y)
 		ifdef CONFIG_SND_SOC_SA6155
 			include $(AUDIO_ROOT)/config/sa6155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm6150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
 		endif
         endif
@@ -94,11 +88,9 @@ ifeq ($(KERNEL_BUILD), 0)
 	ifeq ($(CONFIG_ARCH_SM8150), y)
 		ifdef CONFIG_SND_SOC_SA8155
 			include $(AUDIO_ROOT)/config/sa8155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm8150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm8150autoconf.h
 		endif
 	endif
@@ -110,17 +102,14 @@ ifeq ($(KERNEL_BUILD), 0)
 	ifeq ($(CONFIG_ARCH_SDMSHRIKE), y)
 		ifdef CONFIG_SND_SOC_SA8155
 			include $(AUDIO_ROOT)/config/sa8155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm8150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm8150autoconf.h
 		endif
 	endif
 	ifeq ($(CONFIG_QTI_QUIN_GVM), y)
 		include $(AUDIO_ROOT)/config/gvmauto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/gvmautoconf.h
 	endif
 	ifeq ($(CONFIG_ARCH_SDXLEMUR), y)

+ 4 - 11
soc/Kbuild

@@ -16,22 +16,18 @@ endif
 ifeq ($(CONFIG_SND_SOC_AUTO), y)
 	ifdef CONFIG_SND_SOC_SA8155
 		include $(AUDIO_ROOT)/config/sa8155auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_SA6155
 		include $(AUDIO_ROOT)/config/sa6155auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_GVM
 		include $(AUDIO_ROOT)/config/gvmauto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/gvmautoconf.h
 	endif
 	ifdef CONFIG_SND_SOC_SA7255
 		include $(AUDIO_ROOT)/config/sa7255auto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/sa7255autoconf.h
 	endif
 else
@@ -39,11 +35,9 @@ ifeq ($(KERNEL_BUILD), 0)
 	ifeq ($(CONFIG_ARCH_SM8150), y)
 		ifdef CONFIG_SND_SOC_SA8155
 			include $(AUDIO_ROOT)/config/sa8155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm8150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm8150autoconf.h
 		endif
 	endif
@@ -67,6 +61,10 @@ ifeq ($(KERNEL_BUILD), 0)
 		include $(AUDIO_ROOT)/config/pineappleauto.conf
 		INCS    +=  -include $(AUDIO_ROOT)/config/pineappleautoconf.h
 	endif
+	ifeq ($(BOARD_PLATFORM), volcano)
+		include $(AUDIO_ROOT)/config/volcanoauto.conf
+		INCS    +=  -include $(AUDIO_ROOT)/config/volcanoautoconf.h
+	endif
 	ifeq ($(CONFIG_ARCH_PITTI), y)
 		include $(AUDIO_ROOT)/config/pittiauto.conf
 		INCS    +=  -include $(AUDIO_ROOT)/config/pittiautoconf.h
@@ -92,11 +90,9 @@ ifeq ($(KERNEL_BUILD), 0)
 	ifeq ($(CONFIG_ARCH_SM6150), y)
 		ifdef CONFIG_SND_SOC_SA6155
 			include $(AUDIO_ROOT)/config/sa6155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa6155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm6150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm6150autoconf.h
 		endif
 	endif
@@ -108,11 +104,9 @@ ifeq ($(KERNEL_BUILD), 0)
 	ifeq ($(CONFIG_ARCH_SDMSHRIKE), y)
 		ifdef CONFIG_SND_SOC_SA8155
 			include $(AUDIO_ROOT)/config/sa8155auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sa8155autoconf.h
 		else
 			include $(AUDIO_ROOT)/config/sm8150auto.conf
-			export
 			INCS    +=  -include $(AUDIO_ROOT)/config/sm8150autoconf.h
 		endif
 	endif
@@ -123,7 +117,6 @@ ifeq ($(KERNEL_BUILD), 0)
 	endif
 	ifeq ($(CONFIG_QTI_QUIN_GVM), y)
 		include $(AUDIO_ROOT)/config/gvmauto.conf
-		export
 		INCS    +=  -include $(AUDIO_ROOT)/config/gvmautoconf.h
 	endif
 	ifeq ($(CONFIG_ARCH_SDXLEMUR), y)

部分文件因为文件数量过多而无法显示