diff options
author | Karthik Reddy Katta <a_katta@codeaurora.org> | 2016-06-17 16:51:33 +0530 |
---|---|---|
committer | Kyle Yan <kyan@codeaurora.org> | 2016-06-23 13:56:25 -0700 |
commit | 3eec500686cb1a52bacfbaf7cac392ecd2d7cbab (patch) | |
tree | 08046bd35bbf9e64a3a1a65e31a9bb574a03cfe1 /sound | |
parent | 1c93c19d4d41b53e90afd31298195a2a5e1b6b83 (diff) |
ASoC: msm: qdsp6v2: Fix timeout error in ADM_CMD_SET_PP_PARAMS_V5
Timeout error is observed while waiting for
ADM_CMD_SET_PP_PARAMS_V5 command's response.
Fix the condition logic in wait_event_timeout()
to match the value set in adm_callback() when
response to ADM_CMD_SET_PP_PARAMS_V5 is received.
CRs-Fixed: 1030674
Change-Id: I711c860dc3de479eec0d22369d19615aef572ea1
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/msm/qdsp6v2/q6adm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/msm/qdsp6v2/q6adm.c b/sound/soc/msm/qdsp6v2/q6adm.c index 1866b9e328d9..ffa78af72544 100644 --- a/sound/soc/msm/qdsp6v2/q6adm.c +++ b/sound/soc/msm/qdsp6v2/q6adm.c @@ -4032,7 +4032,7 @@ int adm_set_sound_focus(int port_id, int copp_idx, soundfocus_params.soundfocus_data.reserved = 0; - atomic_set(&this_adm.copp.stat[port_idx][copp_idx], 0); + atomic_set(&this_adm.copp.stat[port_idx][copp_idx], -1); ret = apr_send_pkt(this_adm.apr, (uint32_t *)&soundfocus_params); if (ret < 0) { pr_err("%s: Set params failed\n", __func__); @@ -4042,7 +4042,7 @@ int adm_set_sound_focus(int port_id, int copp_idx, } /* Wait for the callback */ ret = wait_event_timeout(this_adm.copp.wait[port_idx][copp_idx], - atomic_read(&this_adm.copp.stat[port_idx][copp_idx]), + atomic_read(&this_adm.copp.stat[port_idx][copp_idx]) >= 0, msecs_to_jiffies(TIMEOUT_MS)); if (!ret) { pr_err("%s: Set params timed out\n", __func__); |