Explorar o código

dsp: Correct the condition check of apm ready.

Correct the condition check of apm ready status during
prm_send_pkt, loop should exit if apm is ready or retry
count exceeds max count.

Change-Id: I0c32731cb3696ef388a0d17d873a8b1485b54805
Signed-off-by: Ritu Sharma <[email protected]>
Ritu Sharma %!s(int64=3) %!d(string=hai) anos
pai
achega
cd090cb9e9
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      dsp/audio_prm.c

+ 2 - 2
dsp/audio_prm.c

@@ -102,9 +102,9 @@ static int prm_gpr_send_pkt(struct gpr_pkt *pkt, wait_queue_head_t *wait)
 			(gpr_get_q6_state() == GPR_SUBSYS_LOADED)) {
 			(gpr_get_q6_state() == GPR_SUBSYS_LOADED)) {
 		pr_info("%s: apm ready check not done\n", __func__);
 		pr_info("%s: apm ready check not done\n", __func__);
 		retry = 0;
 		retry = 0;
-		while (!spf_core_is_apm_ready() || retry < MAX_RETRY_COUNT) {
+		while (!spf_core_is_apm_ready() && retry < MAX_RETRY_COUNT) {
 			msleep(APM_READY_WAIT_DURATION);
 			msleep(APM_READY_WAIT_DURATION);
-			retry++;
+			++retry;
 		}
 		}
 		is_apm_ready_check_done = true;
 		is_apm_ready_check_done = true;
 		pr_info("%s: apm ready check done\n", __func__);
 		pr_info("%s: apm ready check done\n", __func__);