hal: Fix Rx/Tx mute during HFP call
Rx/Tx are mute during 2nd HFP client call.
Primay output is closed but handle is not reset during first call
disconnect so output is not opened for 2nd call causing rx/rx mute.
Reset primary output handle during close output stream to fix the issue.
CRs-Fixed: 1111824
Change-Id: Icf54ed0debc96181d5181c7e48b2e9849d88a8f7
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index dc933d3..9d62533 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -4314,6 +4314,9 @@
if (adev->voice_tx_output == out)
adev->voice_tx_output = NULL;
+ if (adev->primary_output == out)
+ adev->primary_output = NULL;
+
pthread_cond_destroy(&out->cond);
pthread_mutex_destroy(&out->lock);
free(stream);