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

Commit bc36743b authored by Bhalchandra Gajare's avatar Bhalchandra Gajare Committed by Neema Shetty
Browse files

ASoC: wcd_cpe_core: Add LSM topology support



Add LSM topology calibration blocks. Topology is sent to identify the
modules that will be invoked in CPE.

Change-Id: I62c84ca211398d8d0bde1b826286512cd2d38688
Signed-off-by: default avatarBhalchandra Gajare <gajare@codeaurora.org>
parent 00c028ad
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -94,6 +94,8 @@ enum {

	CORE_CUSTOM_TOPOLOGIES_CAL_TYPE,
	ADM_RTAC_AUDVOL_CAL_TYPE,

	ULP_LSM_TOPOLOGY_ID_CAL_TYPE,
	MAX_CAL_TYPES,
};

+10 −0
Original line number Diff line number Diff line
@@ -1436,6 +1436,11 @@ static int wcd_cpe_get_cal_index(int32_t cal_type)
		cal_index = WCD_CPE_LSM_CAL_AFE;
	else if (cal_type == ULP_LSM_CAL_TYPE)
		cal_index = WCD_CPE_LSM_CAL_LSM;
	else if (cal_type == ULP_LSM_TOPOLOGY_ID_CAL_TYPE)
		cal_index = WCD_CPE_LSM_CAL_TOPOLOGY_ID;
	else
		pr_err("%s: invalid cal_type %d\n",
			__func__, cal_type);

	return cal_index;
}
@@ -1517,6 +1522,11 @@ static int wcd_cpe_cal_init(struct wcd_cpe_core *core)
		 {wcd_cpe_alloc_cal, wcd_cpe_dealloc_cal, NULL,
		  wcd_cpe_set_cal, NULL, NULL} },
		 {NULL, NULL, cal_utils_match_buf_num} },

		{{ULP_LSM_TOPOLOGY_ID_CAL_TYPE,
		 {wcd_cpe_alloc_cal, wcd_cpe_dealloc_cal, NULL,
		  wcd_cpe_set_cal, NULL, NULL} },
		 {NULL, NULL, cal_utils_match_buf_num} },
	};

	ret = cal_utils_create_cal_types(WCD_CPE_LSM_CAL_MAX,
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@
enum {
	WCD_CPE_LSM_CAL_AFE = 0,
	WCD_CPE_LSM_CAL_LSM,
	WCD_CPE_LSM_CAL_TOPOLOGY_ID,
	WCD_CPE_LSM_CAL_MAX,
};

+6 −0
Original line number Diff line number Diff line
@@ -107,6 +107,9 @@ size_t get_cal_info_size(int32_t cal_type)
	case LSM_TOPOLOGY_CAL_TYPE:
		size = sizeof(struct audio_cal_info_lsm_top);
		break;
	case ULP_LSM_TOPOLOGY_ID_CAL_TYPE:
		size = sizeof(struct audio_cal_info_lsm_top);
		break;
	case LSM_CAL_TYPE:
		size = sizeof(struct audio_cal_info_lsm);
		break;
@@ -234,6 +237,9 @@ size_t get_user_cal_type_size(int32_t cal_type)
	case LSM_TOPOLOGY_CAL_TYPE:
		size = sizeof(struct audio_cal_type_lsm_top);
		break;
	case ULP_LSM_TOPOLOGY_ID_CAL_TYPE:
		size = sizeof(struct audio_cal_type_lsm_top);
		break;
	case LSM_CAL_TYPE:
		size = sizeof(struct audio_cal_type_lsm);
		break;