autotest: cras_utils: Fix pylint error
BUG=None
TEST=run_pylint client/cros/audio/
Change-Id: I067c53080b397a1ae4292d75a182d3e9c782f0a3
Reviewed-on: https://chromium-review.googlesource.com/273460
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
diff --git a/client/cros/audio/cras_utils.py b/client/cros/audio/cras_utils.py
index bd1c3d5..5034b38 100644
--- a/client/cros/audio/cras_utils.py
+++ b/client/cros/audio/cras_utils.py
@@ -12,12 +12,22 @@
_CRAS_TEST_CLIENT = '/usr/bin/cras_test_client'
def playback(*args, **kargs):
- """A helper function to execute the playback_cmd."""
+ """A helper function to execute the playback_cmd.
+
+ @param args: args passed to playback_cmd.
+ @param kargs: kargs passed to playback_cmd.
+
+ """
cmd_utils.execute(playback_cmd(*args, **kargs))
def capture(*args, **kargs):
- """A helper function to execute the capture_cmd."""
+ """A helper function to execute the capture_cmd.
+
+ @param args: args passed to capture_cmd.
+ @param kargs: kargs passed to capture_cmd.
+
+ """
cmd_utils.execute(capture_cmd(*args, **kargs))
@@ -29,8 +39,11 @@
playback raw audio from the stdin.
@param block_size: the number of frames per callback(dictates latency).
@param duration: seconds to playback
+ @param channels: number of channels.
@param rate: the sampling rate
+ @returns: The command args put in a list of strings.
+
"""
args = [_CRAS_TEST_CLIENT]
args += ['--playback_file', playback_file]
@@ -52,8 +65,11 @@
@param duration: seconds to record. If it is None, duration is not set,
and command will keep capturing audio until it is
terminated.
+ @param channels: number of channels.
@param rate: the sampling rate.
+ @returns: The command args put in a list of strings.
+
"""
args = [_CRAS_TEST_CLIENT]
args += ['--capture_file', capture_file]
@@ -67,7 +83,13 @@
def loopback(*args, **kargs):
- """A helper function to execute loopback_cmd."""
+ """A helper function to execute loopback_cmd.
+
+ @param args: args passed to loopback_cmd.
+ @param kargs: kargs passed to loopback_cmd.
+
+ """
+
cmd_utils.execute(loopback_cmd(*args, **kargs))
@@ -79,6 +101,8 @@
@param duration: seconds to record.
@param rate: the sampling rate.
+ @returns: The command args put in a list of strings.
+
"""
args = [_CRAS_TEST_CLIENT]
args += ['--loopback_file', output_file]