audio: hal: add customized external smart pa code

add customized external smart pa control code

Change-Id: I667648a98f887bc488827fada6a00f9f987ff513
diff --git a/hal/voice.c b/hal/voice.c
index d2215b6..611d875 100644
--- a/hal/voice.c
+++ b/hal/voice.c
@@ -29,6 +29,7 @@
 #include "voice_extn/voice_extn.h"
 #include "platform.h"
 #include "platform_api.h"
+#include "audio_extn/tfa_98xx.h"
 
 struct pcm_config pcm_config_voice_call = {
     .channels = 1,
@@ -146,6 +147,11 @@
     disable_snd_device(adev, uc_info->out_snd_device);
     disable_snd_device(adev, uc_info->in_snd_device);
 
+    if (audio_extn_tfa_98xx_is_supported() && voice_get_mic_mute(adev)) {
+        voice_set_mic_mute(adev, false);
+        ALOGD("%s: unMute voice Tx", __func__);
+    }
+
     list_remove(&uc_info->list);
     free(uc_info);
 
@@ -211,6 +217,8 @@
     pcm_start(session->pcm_tx);
     pcm_start(session->pcm_rx);
 
+    audio_extn_tfa_98xx_enable_speaker();
+
     /* Enable sidetone only when no calls are already active */
     if (!voice_is_call_state_active(adev))
         voice_set_sidetone(adev, uc_info->out_snd_device, true);
@@ -531,6 +539,7 @@
                   use_case_table[usecase->id]);
             usecase->stream.out = adev->current_call_output;
             select_devices(adev, usecase->id);
+            audio_extn_tfa_98xx_update();
         }
     }
 }