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

Commit 1669307d authored by Karthikeyan Mani's avatar Karthikeyan Mani Committed by Gerrit - the friendly Code Review server
Browse files

dsp: fix RTAC issue in getting afe data



Due to payload checks, AFE get param requests
in RTAC mode fail with timeout errors. Fix
this by moving rtac function before payload checks.

Change-Id: I7a9f467d71184edb2f7ea01275fb1a998324cbe4
Signed-off-by: default avatarKarthikeyan Mani <kmani@codeaurora.org>
parent a6590f8e
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -540,12 +540,6 @@ static int32_t afe_callback(struct apr_client_data *data, void *priv)
		/*
		 * Pass reset events to proxy driver, if cb is registered
		 */
		if (data->payload_size < sizeof(uint32_t)) {
			pr_err("%s: Error: size %d is less than expected\n",
				__func__, data->payload_size);
			return -EINVAL;
		}

		if (this_afe.tx_cb) {
			this_afe.tx_cb(data->opcode, data->token,
					data->payload,
@@ -575,6 +569,10 @@ static int32_t afe_callback(struct apr_client_data *data, void *priv)
			return -EINVAL;
		}

		if (rtac_make_afe_callback(data->payload,
					   data->payload_size))
			return 0;

		if (data->opcode == AFE_PORT_CMDRSP_GET_PARAM_V3)
			param_id_pos = 4;
		else
@@ -592,10 +590,6 @@ static int32_t afe_callback(struct apr_client_data *data, void *priv)
			av_dev_drift_afe_cb_handler(data->opcode, data->payload,
						    data->payload_size);
		} else {
			if (rtac_make_afe_callback(data->payload,
						   data->payload_size))
				return 0;

			if (sp_make_afe_callback(data->opcode, data->payload,
						 data->payload_size))
				return -EINVAL;