hal: call select_devices only based on usb card state

With concurrent capture usecases, once the priority
audio source usecase goes to standby the pre-existing
usecase fallbacks to its previous platform input device
causing it to re-enable the device control path. However,
during this process there are chances that the USB-hs is
removed. Hence, to avoid this call select_devices only
based on active USB card state.

Change-Id: Idfa94a64cc076c5501209082fafb4f75aea740bc
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 96c007d..2f707f7 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -3235,8 +3235,14 @@
 
     if (priority_in == in) {
         priority_in = get_priority_input(adev);
-        if (priority_in)
-            select_devices(adev, priority_in->usecase);
+        if (priority_in) {
+            if (is_usb_in_device_type(&priority_in->device_list)) {
+                if (audio_extn_usb_connected(NULL))
+                    select_devices(adev, priority_in->usecase);
+            } else {
+                select_devices(adev, priority_in->usecase);
+            }
+        }
     }
 
     enable_gcov();