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

Commit 0b4ab197 authored by Bhalchandra Gajare's avatar Bhalchandra Gajare Committed by Banajit Goswami
Browse files

ASoC: msm: qdsp6v2: allow zero size calibration for LSM



It is possible that LSM (Listen Stream Manager) could have an usecase
that does not need any audio calibration. In such cases, currently
the driver returns an error and does not allow the usecase setup with
LSM causing the usecase to fail. Fix this by allowing zero size audio
calibration for LSM.

CRs-fixed: 2031503
Change-Id: I42d89792a4fd6a0d6e1908a36720680b63ff0c30
Signed-off-by: default avatarBhalchandra Gajare <gajare@codeaurora.org>
parent 74934756
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1240,14 +1240,12 @@ static int q6lsm_send_cal(struct lsm_client *client,
	mutex_lock(&lsm_common.cal_data[LSM_CAL_IDX]->lock);
	cal_block = cal_utils_get_only_cal_block(
		lsm_common.cal_data[LSM_CAL_IDX]);
	if (cal_block == NULL)
		goto unlock;

	if (cal_block->cal_data.size <= 0) {
	if (!cal_block || cal_block->cal_data.size <= 0) {
		pr_debug("%s: No cal to send!\n", __func__);
		rc = -EINVAL;
		goto unlock;
	}

	if (cal_block->cal_data.size != client->lsm_cal_size) {
		pr_err("%s: Cal size %zd doesn't match lsm cal size %d\n",
			__func__, cal_block->cal_data.size,