msm: audio: qdsp5v2: Handle the VOICE_START event
Handle VOICE START event when voice state is in voice change
Consider the following case
B calls A (A accept the call), voice state in voice acquire
C calls A (A accept and B in hold) in this scenario following series
Of events issue to voice driver
VOICE_END (this event issues a device change command to modem, in turn
Modem changes the voice state from voice acquire to voice change)
VOICE_START (this event is not changing the voice state from voice change
To voice acquire as a result mismatch in the voice state maintained by
Voice proxy driver)
This patch change the voice state from voice change to voice acquire
When VOICE_START event received and voice state is in voice change
CRs-Fixed: 295375
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
diff --git a/arch/arm/mach-msm/qdsp5v2/voice.c b/arch/arm/mach-msm/qdsp5v2/voice.c
index c4560ed..026acb3 100644
--- a/arch/arm/mach-msm/qdsp5v2/voice.c
+++ b/arch/arm/mach-msm/qdsp5v2/voice.c
@@ -113,6 +113,10 @@
MM_DBG("dev_state into ready\n");
wake_up(&v->dev_wait);
}
+ if (v->voc_state == VOICE_CHANGE) {
+ MM_DBG("voc_state is in VOICE_CHANGE\n");
+ v->voc_state = VOICE_ACQUIRE;
+ }
}
break;
case AUDDEV_EVT_DEV_CHG_VOICE: