hal: Fix device selection at start of the voice call

Voice call setup latency value is exceeding 500 msec. It is due to
primary output selecting handset instead of voice handset causing
the extra delay. Fix this by selecting voice handset when the mode
is set to MODE_IN_CALL.

CRs-Fixed: 855783
Change-Id: Ibfaee75d658bffbcf2e9cdeaa589e0487c214b41
diff --git a/hal/msm8960/platform.c b/hal/msm8960/platform.c
index 50dba2d..5fab099 100644
--- a/hal/msm8960/platform.c
+++ b/hal/msm8960/platform.c
@@ -667,7 +667,7 @@
         goto exit;
     }
 
-    if (voice_is_in_call(adev)) {
+    if (mode == AUDIO_MODE_IN_CALL) {
         if (devices & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
             devices & AUDIO_DEVICE_OUT_WIRED_HEADSET) {
             if (adev->voice.tty_mode == TTY_MODE_FULL)
@@ -759,7 +759,7 @@
 
     ALOGV("%s: enter: out_device(%#x) in_device(%#x)",
           __func__, out_device, in_device);
-    if ((out_device != AUDIO_DEVICE_NONE) && voice_is_in_call(adev)) {
+    if ((out_device != AUDIO_DEVICE_NONE) && (mode == AUDIO_MODE_IN_CALL)) {
         if (adev->voice.tty_mode != TTY_MODE_OFF) {
             if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
                 out_device & AUDIO_DEVICE_OUT_WIRED_HEADSET) {