hal: Route playback uc to handset after USB disconnect while voip active

Issue: For Voip + playback uc with usb headset, once the
usb hs is disconnected, voip uc routes to handset. Due to
pause state AHAL receives routing none for playback uc,
due to this AHAL routes playback uc to speaker
internally causing voip call(if handset & speaker shares
same backend) also to switch to speaker for a short time.

Fix: Though playback uc is paused route it to handset rather
than speaker when voip is active thereby avoiding device switch
for voip usecase to speaker. Handled same for voice call uc.

Change-Id: Iad1e84aae1eebe905602a4d36bdeabea43b343c8
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index c6d34c5..58eecd2 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -4961,7 +4961,10 @@
     if (is_usb_out_device_type(&out->device_list) &&
             list_empty(&new_devices) &&
             !audio_extn_usb_connected(NULL)) {
-        reassign_device_list(&new_devices, AUDIO_DEVICE_OUT_SPEAKER, "");
+        if (adev->mode == AUDIO_MODE_IN_CALL || adev->mode == AUDIO_MODE_IN_COMMUNICATION)
+            reassign_device_list(&new_devices, AUDIO_DEVICE_OUT_EARPIECE, "");
+        else
+            reassign_device_list(&new_devices, AUDIO_DEVICE_OUT_SPEAKER, "");
     }
     /* To avoid a2dp to sco overlapping / BT device improper state
      * check with BT lib about a2dp streaming support before routing