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: Karthikeyan Mani <kmani@codeaurora.org>
Este commit está contenido en:
Karthikeyan Mani
2019-03-21 18:00:51 -07:00
padre 527070fcf2
commit 5670cbd6e3
Se han modificado 2 ficheros con 14 adiciones y 1 borrados

Ver fichero

@@ -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));