Add annotations for RMS tests.
TEST=Run related test on LINK
BUG=None
Change-Id: I1fe4358b7dc58e497e0b8ebe015dc8993dd22811
Reviewed-on: https://chromium-review.googlesource.com/179763
Reviewed-by: Owen Lin <owenlin@chromium.org>
Commit-Queue: Owen Lin <owenlin@chromium.org>
Tested-by: Owen Lin <owenlin@chromium.org>
diff --git a/client/cros/audio/alsa_utils.py b/client/cros/audio/alsa_utils.py
index d169d3a..9281ca7 100644
--- a/client/cros/audio/alsa_utils.py
+++ b/client/cros/audio/alsa_utils.py
@@ -9,6 +9,7 @@
ARECORD_PATH='/usr/bin/arecord'
APLAY_PATH='/usr/bin/aplay'
+AMIXER_PATH='/usr/bin/amixer'
def _get_format_args(channels, bits, rate):
args = ['-c', str(channels)]
@@ -109,3 +110,9 @@
# If there is only one soundcard, return it, else return not found (None)
return 0 if id == 1 else None
+
+def dump_control_contents(device=None):
+ if device is None:
+ device = 'hw:%d' % get_default_soundcard_id()
+ args = [AMIXER_PATH, '-D', device, 'contents']
+ return cmd_utils.execute(args, stdout=subprocess.PIPE)