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

Commit 5670cbd6 authored by Karthikeyan Mani's avatar Karthikeyan Mani
Browse files

dsp: afe: get apr handle before sending apr pkt



Make sure to get apr handle before sending a packet
so that it does not end up with no handle to send
the apr packet.

Change-Id: Iaaebee3ddc6c83896e4cb9dc8149d310fc7d67f1
Signed-off-by: default avatarKarthikeyan Mani <kmani@codeaurora.org>
parent 527070fc
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -8827,6 +8827,12 @@ int afe_vote_lpass_core_hw(uint32_t hw_block_id, char *client_name,
		return -EINVAL;
	}

	ret = afe_q6_interface_prepare();
	if(ret) {
		pr_err("%s: Q6 interface prepare failed %d\n", __func__, ret);
		return ret;
	}

	mutex_lock(&this_afe.afe_cmd_lock);

	memset(cmd_ptr, 0, sizeof(hw_vote_cfg));
@@ -8902,6 +8908,12 @@ int afe_unvote_lpass_core_hw(uint32_t hw_block_id, uint32_t client_handle)
						&hw_vote_cfg;
	int ret = 0;

	ret = afe_q6_interface_prepare();
	if(ret) {
		pr_err("%s: Q6 interface prepare failed %d\n", __func__, ret);
		return ret;
	}

	mutex_lock(&this_afe.afe_cmd_lock);

	memset(cmd_ptr, 0, sizeof(hw_vote_cfg));
+2 −1
Original line number Diff line number Diff line
@@ -364,7 +364,8 @@ int apr_send_pkt(void *handle, uint32_t *buf)
	unsigned long flags;

	if (!handle || !buf) {
		pr_err("APR: Wrong parameters\n");
		pr_err("APR: Wrong parameters for %s\n",
				!handle ? "handle" : "buf");
		return -EINVAL;
	}
	if (svc->need_reset) {