New issue
Advanced search Search tips

Issue 816823 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

audio_Aplay test not stable

Project Member Reported by hychao@chromium.org, Feb 27 2018

Issue description

Per https://ubercautotest.corp.google.com/afe/#tab_id=view_job&object_id=179583653
This test has been failing on Monroe for a long time.

The cause is that Monroe uses HDMI for internal speaker, so that breaks the test logic looking for sysdefault card.

We will deprecate this audio_Aplay test and replace by equivalent checks from CRAS layer.
 
The original purpose of audio_Aplay catches that:
(1) is system drops a node after suspend/stress
(2) if immediate playback/record after suspend/stress would fail

And the point (2) is not trivial to test from CRAS layer. Because we're using the default silent playback/record device to suppress errors for CRAS clients.

Jimmy reminds me that https://chromium-review.googlesource.com/#/c/chromiumos/third_party/autotest/+/925765/ is doing something similar to check if a stream correctly plays to certain device. And it is parsing the output of cras_test_client --dump_audio/--dump_server

It seems like we don't have good way to dump the CRAS stream <-> device routing info.
For test/debugging use case, existing cras audio/server dumps are just difficult for checking stream routing. We should create a better tool to save time for whoever debug audio routing in future.

Cc: cychiang@chromium.org
 Issue 819511  has been merged into this issue.
Cc: ka...@chromium.org
Labels: Test OS-Chrome
Owner: yuhsuan@chromium.org
1. We want audio_Aplay to cover ALSA only, not CRAS.
2. We need CRAS to select node and apply UCM sequence.
3. We want the test to be specific. Speaker and Headphone should be separated.
4. On some platform, device is only usable when mixer controls are correct.

The solution:
1. Let audio_Aplay test speaker only. Check audio_spec.py, if this DUT does not have speaker. Pass the test.
2. Select active output node to speaker through cras_utils.py.
3. Get device name from GetNodes API. We can get card and device index.
4. Stop CRAS
5. Play through aplay -D hw:X,Y. We should not use sysdefault anymore.
6. Add another control file for headphone. It should depend on audio_loopback_dongle. Apply the same logic for headphone in the test.

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 23

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

commit 51f5023c66fd51cc38c247c4c80d38668b1bd16b
Author: Yu-Hsuan Hsu <yuhsuan@google.com>
Date: Tue Oct 23 20:01:54 2018

[autotest] audio_Aplay: Separate the speaker and headphone test

We want the test to be specific so we separate it. Aplay is for internal
speaker and Aplay.headphone is for headphone. It will skip internal
speaker test if the board does not have it.

BUG=chromium:816823
TEST=run audio_Aplay and audio_Aplay.headphone test on peppy and teemo.

Change-Id: I5da88290214cc28624a06ecde1204f419695551b
Reviewed-on: https://chromium-review.googlesource.com/1290250
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/51f5023c66fd51cc38c247c4c80d38668b1bd16b/client/site_tests/audio_Aplay/control
[modify] https://crrev.com/51f5023c66fd51cc38c247c4c80d38668b1bd16b/client/site_tests/audio_Aplay/audio_Aplay.py
[add] https://crrev.com/51f5023c66fd51cc38c247c4c80d38668b1bd16b/client/site_tests/audio_Aplay/control.headphone

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 27

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

commit 3eb0432b9a1ae977e2688dcfeb71f7e2f1ea3581
Author: Yu-Hsuan Hsu <yuhsuan@google.com>
Date: Sat Oct 27 00:19:13 2018

[autotest] audio_Aplay: Change function of selecting output node

There is a bug in set_selected_output_nodes function. So use
set_single_selected_output_node instead.

BUG=chromium:816823
TEST=run audio_Aplay and audio_Aplay.headphone test on peppy and teemo.

Change-Id: Ieb707d633800a6b2bf0b2b2ace20775112871b37
Reviewed-on: https://chromium-review.googlesource.com/1300837
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/3eb0432b9a1ae977e2688dcfeb71f7e2f1ea3581/client/site_tests/audio_Aplay/audio_Aplay.py

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 23

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

commit 8d39c50cd5d746778f911c2e84d666ea967193ae
Author: Yu-Hsuan Hsu <yuhsuan@google.com>
Date: Fri Nov 23 03:07:59 2018

[autotest] audio_spec - Add list of boards without sound card

Some other devices do not have sound card and make test fail (such as
gale and veyron_rialto). We need to take them into account.

BUG=chromium:816823
TEST=gale and veyron_rialto can pass audio_Aplay test.

Change-Id: I0b3591f872bbb8240c701d52bbfa967419b870ec
Reviewed-on: https://chromium-review.googlesource.com/1347930
Commit-Ready: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/8d39c50cd5d746778f911c2e84d666ea967193ae/client/cros/audio/audio_spec.py

Sign in to add a comment