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

Issue 714119 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Add audio output logging

Project Member Reported by solenberg@chromium.org, Apr 21 2017

Issue description

Chrome Version: 57
OS: all

For audio input, there are useful log statements (https://cs.chromium.org/chromium/src/media/audio/audio_input_controller.cc?type=cs&q=aic::ondata&sq=package:chromium&l=488). It'd be great to have similar log points for audio output as well, so we can see in client logs what audio streams are opened and whether we get callbacks.
 
The AudioLog puts useful things (parameters, device id) in chrome://media-internals. Would be nice if those could also automatically be added to where MediaStreamManager::SendMessageToNativeLog messages end up. Are enumeration results already logged? Would be nice to make sure those logs include default parameters for all the (input/output) devices.
Labels: OS-All
Status: Assigned (was: Untriaged)
Sorry to make this a list of all the things I want for Christmas, but it would also be nice if Audio(Output|Input)Controller could report if an audio device seems to do the wrong number of callbacks (by e.g. checking # of callbacks every few seconds).
And also, we might want a common prefix for all of our log lines. Rather than "[AIC]", "[AIRH]", et c., use something like "[Chrome Audio]" to make sure we can easily find all of our log lines.
Good point!
Cc: grunell@chromium.org
Owner: ossu@chromium.org
Assigning to Oskar who's looking at output logging.

I think we should have separate bugs for #1, #3, and #4. Those are great ideas! For #4 it's good to keep in mind that we should keep strings as short as possible.

Comment 7 by ossu@chromium.org, May 23 2017

I'm looking at the AudioOutputController and it does, indeed, lack the clever logs like average audio level and possible hardware volume and mute states. 
It does, however, have TRACE_EVENTs for the basic operations (DoCreate, DoPlay, etc.). Do they show up with sufficient context in logs alread, or should I add explicit logging of those as well (as AOC::DoCreate, etc. then, to match the input side)?
The trace events only show up when collecting traces. We probably want logs to MediaStreamManager like for input: https://cs.chromium.org/chromium/src/content/browser/renderer_host/media/audio_input_renderer_host.cc?l=44. Note that it's not possible to access MediaStreamManager directly from AudioOutputController, as AudioOutputController is in media. That's why the input controller has the "OnLog" callback.

Comment 9 by ossu@chromium.org, May 23 2017

Great, thanks! I'll replicate these calls from the input controller as well, then.
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9e1250518374b610d8a23e8b87c44a717a8c919a

commit 9e1250518374b610d8a23e8b87c44a717a8c919a
Author: ossu <ossu@chromium.org>
Date: Thu Jun 01 12:27:29 2017

Added initial set of logging for AudioOutputController.

BUG=chromium:714119
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2900043002
Cr-Commit-Position: refs/heads/master@{#476257}

[modify] https://crrev.com/9e1250518374b610d8a23e8b87c44a717a8c919a/content/browser/renderer_host/media/audio_output_delegate_impl.cc
[modify] https://crrev.com/9e1250518374b610d8a23e8b87c44a717a8c919a/media/audio/audio_output_controller.cc
[modify] https://crrev.com/9e1250518374b610d8a23e8b87c44a717a8c919a/media/audio/audio_output_controller.h
[modify] https://crrev.com/9e1250518374b610d8a23e8b87c44a717a8c919a/media/audio/audio_output_controller_unittest.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Jun 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/05a9ef01217b8c47c69f5d3960d63cfab1c673b0

commit 05a9ef01217b8c47c69f5d3960d63cfab1c673b0
Author: ossu <ossu@chromium.org>
Date: Thu Jun 01 12:35:10 2017

Added logging of average power levels to AudioOutputController.

BUG=chromium:714119
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2902823005
Cr-Commit-Position: refs/heads/master@{#476259}

[modify] https://crrev.com/05a9ef01217b8c47c69f5d3960d63cfab1c673b0/media/audio/audio_output_controller.cc
[modify] https://crrev.com/05a9ef01217b8c47c69f5d3960d63cfab1c673b0/media/audio/audio_output_controller.h

Comment 12 by ossu@chromium.org, Jun 13 2017

Hi!

I'm planning to propose these two changes for cherry-picking into M60 - I believe the added logging would help us track down problems. Wanted to check with you guys (Max, Olga, Henrik) if you see any reason not to. The changes seems safe enough, right?
Not sure if release owners will approve, but I agree it's a safe merge and would be nice to have. Doesn't hurt to ask.
They should be fine.

Comment 15 by ossu@chromium.org, Jun 15 2017

Labels: Merge-Request-60
Requesting to merge the changes in comments #10 and #11 to M60. It's a couple of small changes (logging only) which would help us to triage and track down audio issues. As such, it would be great to have them sooner rather than later.
Project Member

Comment 16 by sheriffbot@chromium.org, Jun 15 2017

Labels: -Merge-Request-60 Hotlist-Merge-Review Merge-Review-60
This bug requires manual review: M60 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: -Blink>Media>Audio Internals>Media>Audio
Labels: -Merge-Review-60 Merge-Approved-60
Logging changes that are quite safe per comment 15. Approving merge to M60. 

Comment 20 by ossu@chromium.org, Jun 19 2017

Thanks, grunell@!

Sign in to add a comment