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

Issue 666242 link

Starred by 1 user

Issue metadata

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

Blocked on:
issue chrome-os-partner:60117

Blocking:
issue 581679



Sign in to add a comment

Ensure audio playback quality is good on headphone

Project Member Reported by cychiang@chromium.org, Nov 17 2016

Issue description

With the updated algorithm of quality measurement, it becomes easy and robust to check delay due to underrun in audio recorded from headphone.

For example, on celes, we found delay due to underrun:

https://wmatrix.googleplex.com/failures/unfiltered?hide_missing=True&tests=audio_AudioBasicHeadphone.quality&days_back=20&builds=R56-8993.0.0&platforms=celes

Channel 0: Detects delay during playing near these time and duration: [(0.0740625, 0.005229166666666646), (0.15406250000000002, 0.005208333333333315)], Channel 0: Detects burst/pop near these time: [0.07393749999999999, 0.079125, 0.15397916666666664, 0.159125], Channel 1: Detects delay during playing near these time and duration: [(0.07408333333333333, 0.005166666666666653), (0.15414583333333334, 0.005145833333333294)], Channel 1: Detects burst/pop near these time: [0.0740625, 0.079125, 0.15414583333333334, 0.15914583333333335]

The error logs the place where delay happens.

I think it is time to examine the test result of audio_AudioBasicHeadphone.quality and makes sure it is green on all boards.

This test uses cras_test_client to play sine wave, with block size 240.
We need to first make sure it passes on all the boards.
After that ,we can proceed to change the block size in Chrome. (with more tests done for chrome)

https://wmatrix.googleplex.com/matrix/unfiltered?tests=audio_AudioBasicHeadphone.quality&days_back=20&hide_missing=True

 
celes_hp.wav
6.5 MB Download
celes_hp_underrun.png
16.2 KB View Download
Blocking: 581679
Blockedon: chrome-os-partner:60117
I checked on elm, there are two kinds of failure:
1. no node is selected instead of headphone.
2. speaker is selected instead of headphone.
In their multimedia_xmlrpc_server.log.after_binding, chrome did not open successfully. That makes the node selection wrong.
Maybe I can add some retry to open chrome.
https://chromium-review.googlesource.com/c/413866/1 reboot DUT when chrome failed to start.
I tested that it works quite well.
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 24 2016

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

commit b3ebbcf7345116fd6b1ceefac8dc6300eca990f4
Author: Cheng-Yi Chiang <cychiang@chromium.org>
Date: Tue Nov 22 09:34:36 2016

audio_AudioBasicHeadphone: Skip board that does not have headphone

ChromeBit does not have headphones.
Skip it on headphone test.

BUG=chromium:666242
TEST=run the test on mickey

Change-Id: I82ad508989ba9cbdb25584027c487ee0bbdd04fc
Reviewed-on: https://chromium-review.googlesource.com/413377
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Kalin Stoyanov <kalin@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/b3ebbcf7345116fd6b1ceefac8dc6300eca990f4/server/site_tests/audio_AudioBasicHeadphone/audio_AudioBasicHeadphone.py
[modify] https://crrev.com/b3ebbcf7345116fd6b1ceefac8dc6300eca990f4/client/cros/chameleon/audio_test_utils.py

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 24 2016

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

commit dec31fd5a2892dca125b1a7e5911cba24d1678f5
Author: Cheng-Yi Chiang <cychiang@chromium.org>
Date: Wed Nov 23 09:19:19 2016

[autotest] facade_resource: Let server be aware result of starting Chrome

Sometimes due to telemetry or other issue, starting Chrome may fail.
We should let autotest server be aware of this.

Add a retry to start Chrome.
If retry fails, return False to start_{default|custom}_chrome XMLRPC
call so server side can handle it.

BUG=chromium:666242
TEST=test with the next CL

Change-Id: I02efbd52f58db4c58a901078ff1843a958fd62a3
Reviewed-on: https://chromium-review.googlesource.com/413865
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/dec31fd5a2892dca125b1a7e5911cba24d1678f5/server/cros/multimedia/browser_facade_adapter.py
[modify] https://crrev.com/dec31fd5a2892dca125b1a7e5911cba24d1678f5/client/cros/multimedia/facade_resource.py
[modify] https://crrev.com/dec31fd5a2892dca125b1a7e5911cba24d1678f5/client/cros/multimedia/browser_facade_native.py

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 24 2016

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

commit e9029a1606cc76efd542b59064c047bfcb5ad188
Author: Cheng-Yi Chiang <cychiang@chromium.org>
Date: Wed Nov 23 09:40:02 2016

[autotest] remote_facade_factory: Reboot DUT when starting Chrome failed

Split connect in RemoteFacadeProxy into connect and _start_chrome.
connect will be used to connect to multimedia XMLRPC server.
_start_chrome will be used to start Chrome.
If DUT fails to start Chrome for the first time, reboot DUT and use
connect method to reconnect to multimedia XMLRPC server after reboot.
Then, try starting Chrome again. If it still fails, raise
error.TestError because all the tests hereafter are not reliable, e.g.
audio node not selected by Chrome.

BUG=chromium:666242
TEST=run audio_AudioBasicHeadphone test on elm
Change-Id: I0c1388d57df9ebe831be81b47a5aca0e7dc1258d
Reviewed-on: https://chromium-review.googlesource.com/413866
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/e9029a1606cc76efd542b59064c047bfcb5ad188/server/cros/multimedia/remote_facade_factory.py

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 24 2016

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

commit ad248a87c20916552933c96067d0eb79e0ae70e3
Author: Cheng-Yi Chiang <cychiang@chromium.org>
Date: Wed Nov 23 10:41:50 2016

[autotest] rpc_server_tracker: Support timeout on the request

Add a subclass of xmlrpclib.ServerProxy that supports timeout on the
request. This makes test fail earlier if a request does not return
forever due to some issue on Cros host.

BUG=chromium:666242
TEST=use with the next CL of multimedia server proxy.

Change-Id: I459b02294914c96135c37586bd8007d3923549c5
Reviewed-on: https://chromium-review.googlesource.com/413867
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/ad248a87c20916552933c96067d0eb79e0ae70e3/server/hosts/rpc_server_tracker.py

Project Member

Comment 9 by bugdroid1@chromium.org, Nov 24 2016

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

commit 85073824810e5762f6e08c7d72690f6af1589f55
Author: Cheng-Yi Chiang <cychiang@chromium.org>
Date: Wed Nov 23 10:44:15 2016

[autotest] multimedia: Set a timeout on the request

If Cros device reboots when autotest server makes a XMLRPC call to
multimedia XMLRPC server, the call will hang for more than 15 minutes.
Set a timeout on the server proxy so it can fail earlier.

BUG=chromium:666242
TEST=run audio_AudioBasicHeadphone test and reboot DUT on purpose when
autotest server makes the call to start Chrome (the call usually takes
30 seconds). See the test fails after 3 minutes instead of 15 minutes.

Change-Id: Ifbbd9ceb4121345859ec381864eb8caf963c406b
Reviewed-on: https://chromium-review.googlesource.com/413868
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/85073824810e5762f6e08c7d72690f6af1589f55/server/cros/multimedia/remote_facade_factory.py
[modify] https://crrev.com/85073824810e5762f6e08c7d72690f6af1589f55/client/cros/constants.py

Sign in to add a comment