Merge "dsp: afe: get apr handle before sending apr pkt"

This commit is contained in:
Linux Build Service Account 2019-03-26 21:22:50 -07:00 • committed by Gerrit - the friendly Code Review server
commit 50398b5bbf
2 changed files with 14 additions and 1 deletions

View file

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

View file

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