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

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

Merge "ASoC: wcd_cpe_core: Allow session with no calibration data"

parents fbe01a99 727853d1
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -2191,6 +2191,13 @@ static int wcd_cpe_send_lsm_cal(
		goto unlock_cal_mutex;
	}

	if (lsm_cal->cal_data.size == 0) {
		dev_dbg(core->dev, "%s: No LSM cal to send\n",
			__func__);
		rc = 0;
		goto unlock_cal_mutex;
	}

	inb_msg = kzalloc(sizeof(struct cmi_hdr) + lsm_cal->cal_data.size,
			  GFP_KERNEL);
	if (!inb_msg) {
@@ -3191,6 +3198,13 @@ static int wcd_cpe_send_afe_cal(void *core_handle,
		goto rel_cal_mutex;
	}

	if (afe_cal->cal_data.size == 0) {
		dev_dbg(core->dev, "%s: No AFE cal to send\n",
			__func__);
		rc = 0;
		goto rel_cal_mutex;
	}

	is_obm_msg = (afe_cal->cal_data.size >
		      CMI_INBAND_MESSAGE_SIZE) ? true : false;