hal: Fix incorrect fluence devices selection for VoIP calls

VoIP calls using audio path are selecting fluence devices
even though fluence is not enabled. This is happening
due to incorrect device selection logic in audio HAL.
Fix this by ensuring fluence device selection only when
the fluence is enabled.

CRs-Fixed: 1080074
Change-Id: I65cd0ca4e30cc8d1db87d81b2d84122164ea548e
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 3551006..3abb904 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -3187,7 +3187,8 @@
         if (out_device & AUDIO_DEVICE_OUT_SPEAKER)
             in_device = AUDIO_DEVICE_IN_BACK_MIC;
         if (adev->active_input) {
-            if (adev->active_input->enable_aec &&
+            if (my_data->fluence_type != FLUENCE_NONE &&
+                    adev->active_input->enable_aec &&
                     adev->active_input->enable_ns) {
                 if (in_device & AUDIO_DEVICE_IN_BACK_MIC) {
                     if (my_data->fluence_in_spkr_mode) {
@@ -3213,7 +3214,8 @@
                     snd_device = SND_DEVICE_IN_HEADSET_MIC_FLUENCE;
                 }
                 platform_set_echo_reference(adev, true, out_device);
-            } else if (adev->active_input->enable_aec) {
+            } else if (my_data->fluence_type != FLUENCE_NONE &&
+                       adev->active_input->enable_aec) {
                 if (in_device & AUDIO_DEVICE_IN_BACK_MIC) {
                     if (my_data->fluence_in_spkr_mode) {
                         if ((my_data->fluence_type & FLUENCE_QUAD_MIC) &&
@@ -3238,7 +3240,8 @@
                     snd_device = SND_DEVICE_IN_HEADSET_MIC_FLUENCE;
                 }
                 platform_set_echo_reference(adev, true, out_device);
-            } else if (adev->active_input->enable_ns) {
+            } else if (my_data->fluence_type != FLUENCE_NONE &&
+                       adev->active_input->enable_ns) {
                 if (in_device & AUDIO_DEVICE_IN_BACK_MIC) {
                     if (my_data->fluence_in_spkr_mode) {
                         if ((my_data->fluence_type & FLUENCE_QUAD_MIC) &&