audiovideo_CRASFormatConversion - Record mono audio and simplify the test.

There is only 1 channel for the internal microphone. So, there is no need to
record in stereo during the test. What it does is just duplicating the channel
and nothing more.

BUG=None
Test=Run the test on parrot

Change-Id: I03ea43ad0836496980650f3cb0d0dc650d95d87b
Reviewed-on: https://chromium-review.googlesource.com/178394
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Commit-Queue: Owen Lin <owenlin@chromium.org>
Tested-by: Owen Lin <owenlin@chromium.org>
diff --git a/client/cros/audio/cras_utils.py b/client/cros/audio/cras_utils.py
index dd8b263..b73f82a 100644
--- a/client/cros/audio/cras_utils.py
+++ b/client/cros/audio/cras_utils.py
@@ -22,7 +22,8 @@
     """A helper function to execute the capture_cmd."""
     cmd_utils.execute(capture_cmd(*args, **kargs))
 
-def playback_cmd(playback_file, buffer_frames=None, duration=None, rate=44100):
+def playback_cmd(playback_file, buffer_frames=None, duration=None,
+                 rate=44100):
     """Gets a command to playback a file with given settings.
 
     @param playback_file: the name of the file to play. '-' indicates to
@@ -40,7 +41,8 @@
     args += ['--rate', str(rate)]
     return args
 
-def capture_cmd(capture_file, buffer_frames=None, duration=10, rate=44100):
+def capture_cmd(
+        capture_file, buffer_frames=None, duration=10, channels=2, rate=44100):
     """Gets a command to capture the audio into the file with given settings.
 
     @param capture_file: the name of file the audio to be stored in.
@@ -53,6 +55,7 @@
     if buffer_frames is not None:
         args += ['--buffer_frames', str(buffer_frames)]
     args += ['--duration', str(duration)]
+    args += ['--num_channels', str(channels)]
     args += ['--rate', str(rate)]
     return args