New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 725550 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Chameleon: Check capture command failure

Project Member Reported by cychiang@chromium.org, May 23 2017

Issue description

In audio_facade_native, start_recording function does not check whether the recording command failed or not.

So after stop_recording, user will still get a recorded file, but failed at RMS too low later.

This was found in external mic test on celes and cyan, where cras_test_client --capture_file /tmp/c command fails:

https://wmatrix.googleplex.com/testrun/unfiltered?test_ids=486284964

Another example in
https://bugs.chromium.org/p/chromium/issues/detail?id=719812#c5

A possible solution:

When stop_recording function is called, check stderr of the capture subprocess.
If there is something, raise exception.
This will make the true failure reason much more obvious.
 
I found that there is no error message on stderr because CRAS automatically switch to fallback device.

We can check that if recorded file is all 0, then it must be some critical issue.

Status: Started (was: Assigned)
https://chromium-review.googlesource.com/513023 can makes the failure reason more obvious.
We should also copy messages.after_recording and audio_diagnostics.after_recording from DUT back to test server. Raising exception too early is not so helpful for us.
We have messages under sysinfo when sysinfo is not disabled (when running in the lab without using test_that --fast), so that should be good enough.
Project Member

Comment 5 by bugdroid1@chromium.org, May 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/62b1d77d6c9eb14c9786a9cbe3f8a9898e6066a4

commit 62b1d77d6c9eb14c9786a9cbe3f8a9898e6066a4
Author: Cheng-Yi Chiang <cychiang@chromium.org>
Date: Thu May 25 19:25:19 2017

[autotest] audio_facade: Makes failure in recording audio more obvious

When there is something wrong with capture device, CRAS automatically
falls back to using dummy capture device, which captures all zeros.
In autotest, we find this when checking the recorded files and see RMS
is too small.

Now we check whether the recorded files contains all zeros in
audio_facade_native, and raise the exception in audio_facade_adapter so
user can see the failure reason easily.

BUG=chromium:725550
TEST=run audio_AudioBasicExternalMicrophone test on cyan with image
9579.0 and see the error messages of recording.

Change-Id: I6695812f801924f33beeb0aa51a98cc9fc7d9db3
Reviewed-on: https://chromium-review.googlesource.com/513023
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Hsu Wei-Cheng <mojahsu@chromium.org>

[modify] https://crrev.com/62b1d77d6c9eb14c9786a9cbe3f8a9898e6066a4/server/cros/multimedia/audio_facade_adapter.py
[modify] https://crrev.com/62b1d77d6c9eb14c9786a9cbe3f8a9898e6066a4/client/cros/multimedia/audio_facade_native.py

Sign in to add a comment