[autotest] Select USB explicitly after suspend

Some  DUTs will detect MIC again after suspend so MIC will become the main
input node. The test is for testing recording after suspend so it should check
and select the node explicitly.

BUG=chromium:839262
TEST=test_that --fast --debug --args="chameleon_host=CH_IP" DUT_IP
      audio_AudioBasicUSBRecord.suspend

Change-Id: I46a86f1f860cd0bdc1d1c5472941da9c2b72964d
Previous-Reviewed-on: https://chromium-review.googlesource.com/1043673
(cherry picked from commit 31e4b277a08024de9766097443ef288364d9a089)
Reviewed-on: https://chromium-review.googlesource.com/1056938
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
diff --git a/server/site_tests/audio_AudioBasicUSBRecord/audio_AudioBasicUSBRecord.py b/server/site_tests/audio_AudioBasicUSBRecord/audio_AudioBasicUSBRecord.py
index 6f8fdf2..a598e51 100644
--- a/server/site_tests/audio_AudioBasicUSBRecord/audio_AudioBasicUSBRecord.py
+++ b/server/site_tests/audio_AudioBasicUSBRecord/audio_AudioBasicUSBRecord.py
@@ -67,9 +67,18 @@
                 utils.poll_for_condition(condition=factory.ready,
                                          timeout=self.RPC_RECONNECT_TIMEOUT,
                                          desc='multimedia server reconnect')
+
+                audio_test_utils.dump_cros_audio_logs(
+                        host, audio_facade, self.resultsdir, 'after_suspend')
+
+                audio_test_utils.check_and_set_chrome_active_node_types(
+                        audio_facade, None, 'USB')
+
+                audio_test_utils.dump_cros_audio_logs(
+                        host, audio_facade, self.resultsdir, 'after_select')
+
                 audio_test_utils.check_audio_nodes(audio_facade,
                                                    (None, ['USB']))
-
             # Starts playing from Chameleon (which waits for Cros device),
             # waits for some time, and then starts recording from Cros device.
             logging.info('Start playing %s on Chameleon device',