audio: Avoid mute during AFE PROXY Usecase
Silence data is getting written from in_read when voice
call is muted with USB Headset connected. This resulting
in muting Rx path too along with Tx path in this
scenario. USB Voice call scenario, PROXY_IN device is
responsible for reading RX data. So not supposed to be
muted.
Fix is to avoid muting if the current use case is AFE_PROXY
CRs-Fixed: 763152
Change-Id: I1fbd5545f343cbaea865e941214be05791dec14e
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 053c98d..e63f12d 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -2568,7 +2568,8 @@
* Instead of writing zeroes here, we could trust the hardware
* to always provide zeroes when muted.
*/
- if (ret == 0 && voice_get_mic_mute(adev) && !voice_is_in_call_rec_stream(in))
+ if (ret == 0 && voice_get_mic_mute(adev) && !voice_is_in_call_rec_stream(in) &&
+ in->usecase != USECASE_AUDIO_RECORD_AFE_PROXY)
memset(buffer, 0, bytes);
exit: