hal: Fix for Tx Mute issue when a new call accepted while in call
- While in a voice call, if an incoming call is accepted, Tx path
is muted on some specific networks.
- If there is an incoming call, Telephony sets the mode to RINGTONE,
and the condition check in audio HAL leads to voice call tear
down. When the call is accepted, the mode is set back to
IN_CALL and voice call path is re-enabled but the voice drivers
will be operating with default settings as there is no notification
from Modem side in this case. For modem, there is no change
in the call state i.e. just switched from caller 1 to caller2.
- Fix the issue by ensuring that the voice call is teared down
only if mode is set to NORMAL while call is progress.
Change-Id: Iac5c4d2e6852ccda0da2ea13927d2a95bfb6938b
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 1f2cdbb..045f031 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -962,7 +962,7 @@
}
}
- if ((adev->mode != AUDIO_MODE_IN_CALL) && adev->in_call &&
+ if ((adev->mode == AUDIO_MODE_NORMAL) && adev->in_call &&
(out == adev->primary_output)) {
stop_voice_call(adev);
}