hal: select HFP devices based on hfp active session

Enabling the HFP devices based on hfp active session.

Bug : 31922459

Change-Id: I64fcbe7d5662f6408cf95afa7a89581bbe421281
Signed-off-by: Yamit Mehta <ymehta@codeaurora.org>
Signed-off-by: Madhuri Athota <mathota@codeaurora.org>
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 5faa2b2..900a7e6 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -1547,7 +1547,7 @@
         goto exit;
     }
 
-    if (mode == AUDIO_MODE_IN_CALL) {
+    if (mode == AUDIO_MODE_IN_CALL || audio_extn_hfp_is_active(adev)) {
         if (devices & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
             devices & AUDIO_DEVICE_OUT_WIRED_HEADSET ||
             devices & AUDIO_DEVICE_OUT_LINE) {