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.
Bug: 10733490
Change-Id: I2f205bb055807bb8d25f81e2907f78cd98bb77ad
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index c89d88e..c5e44aa 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1220,7 +1220,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);
}