audio: Add start_recording and stop_recording API to multimedia server

Add start_recording and stop_recording API to audio_facade_native.
These API enable test to capture audio on Cros device through multimedia
XMLRPC server.

BUG=chromium:437678
TEST=not used yet

Change-Id: Ic0a40dc13904124777360283dc25f3bfd67af9fb
Reviewed-on: https://chromium-review.googlesource.com/240211
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
diff --git a/client/cros/audio/cras_utils.py b/client/cros/audio/cras_utils.py
index 9bc9cee..33ca9b9 100644
--- a/client/cros/audio/cras_utils.py
+++ b/client/cros/audio/cras_utils.py
@@ -47,14 +47,17 @@
 
     @param capture_file: the name of file the audio to be stored in.
     @param block_size: the number of frames per callback(dictates latency).
-    @param duration: seconds to record.
+    @param duration: seconds to record. If it is None, duration is not set,
+                     and command will keep capturing audio until it is
+                     terminated.
     @param rate: the sampling rate.
     """
     args = [_CRAS_TEST_CLIENT]
     args += ['--capture_file', capture_file]
     if block_size is not None:
         args += ['--block_size', str(block_size)]
-    args += ['--duration', str(duration)]
+    if duration is not None:
+        args += ['--duration', str(duration)]
     args += ['--num_channels', str(channels)]
     args += ['--rate', str(rate)]
     return args