hal: Fix for no audio recorded during voice downlink record with mic muted
If mic is muted, the recording buffer is reset,
then there is no audio recorded during voice downlink recording.
Don't reset the buffer if voice call is active.
Change-Id: I59d0543febcccf4a70dfbe713e0921e7bb9f2092
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index aa7e6a6..e9c3b56 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1763,7 +1763,7 @@
* Instead of writing zeroes here, we could trust the hardware
* to always provide zeroes when muted.
*/
- if (ret == 0 && voice_get_mic_mute(adev))
+ if (ret == 0 && voice_get_mic_mute(adev) && !voice_is_in_call(adev))
memset(buffer, 0, bytes);
exit: