Merge "hal: Move sequence of audio_extn_auto_hal_open_input_stream"
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index eba044b..12c196d 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -9506,6 +9506,12 @@
             goto err_open;
         }
         ALOGV("%s: car_audio_stream 0x%x", __func__, in->car_audio_stream);
+        ret = audio_extn_auto_hal_open_input_stream(in);
+        if (ret) {
+            ALOGE("%s: Failed to open input stream for bus device", __func__);
+            ret = -EINVAL;
+            goto err_open;
+        }
     }
 
     if (in->source == AUDIO_SOURCE_FM_TUNER) {
@@ -9712,14 +9718,6 @@
                 }
             }
         }
-        if (compare_device_type(&in->device_list, AUDIO_DEVICE_IN_BUS)) {
-           ret = audio_extn_auto_hal_open_input_stream(in);
-           if (ret) {
-               ALOGE("%s: Failed to open input stream for bus device", __func__);
-               ret = -EINVAL;
-               goto err_open;
-           }
-        }
     }
     if (audio_extn_ssr_get_stream() != in)
         in->config.channels = channel_count;