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

Issue 747541 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Use new SL_ANDROID_KEY_PERFORMANCE_MODE keys for saving power on Android N MR1+

Project Member Reported by dalecur...@chromium.org, Jul 21 2017

Issue description

Per the Android audio team we can now specify the type of audio we are playing via OpenSLES to receive more power efficient audio!
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 28 2017

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

commit 2fef49bc869c92b6ade718ac3ba07168b417ae02
Author: Dale Curtis <dalecurtis@chromium.org>
Date: Fri Jul 28 02:29:57 2017

Enable power saving audio for LATENCY_PLAYBACK on Android.

Per the Android audio team's recommendation, enables
SL_ANDROID_PERFORMANCE_POWER_SAVING when playing back
audio which is tagged as AudioLatency::LATENCY_PLAYBACK.

BUG= 731860 , 747541 
TEST=audio playback works as normal.

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
Change-Id: Ie877e9ffe7e164f955905463f8175b2480a4a611
Reviewed-on: https://chromium-review.googlesource.com/581668
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Tommi <tommi@chromium.org>
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490215}
[modify] https://crrev.com/2fef49bc869c92b6ade718ac3ba07168b417ae02/media/audio/android/audio_manager_android.cc
[modify] https://crrev.com/2fef49bc869c92b6ade718ac3ba07168b417ae02/media/audio/android/audio_manager_android.h
[modify] https://crrev.com/2fef49bc869c92b6ade718ac3ba07168b417ae02/media/audio/android/opensles_output.cc
[modify] https://crrev.com/2fef49bc869c92b6ade718ac3ba07168b417ae02/media/audio/android/opensles_output.h
[modify] https://crrev.com/2fef49bc869c92b6ade718ac3ba07168b417ae02/media/audio/audio_manager_base.cc
[modify] https://crrev.com/2fef49bc869c92b6ade718ac3ba07168b417ae02/media/renderers/audio_renderer_impl.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Aug 3 2017

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

commit 732ddfe0c3ff211936187e80879a6cef82cdb70b
Author: Dale Curtis <dalecurtis@chromium.org>
Date: Thu Aug 03 17:51:11 2017

Expand no resampling support to Android; cleanup code.

Per discussions with the Android team they recommend we skip resampling
when using low power audio. This CL expands the workaround we already
have in place for ChromeOS into a more maintable state by introducing
AudioLatency::IsResamplingPassthroughSupported(). This method returns
true on ChromeOS and on Android when the right criteria are met.

There are several changes to the buffering size logic, but none should
result in any actual changes to the buffering size outside of the new
pass-through case. The pass-through case will prefer the larger of the
hardware buffer size or ~20ms to avoid issues with massive bluetooth
output buffers.

As part of this change I've cleaned up the logic in the mixer manager
for determining when to allow passthrough.

Per a battor run done by liberato@ this is a ~34% power reduction (!),
with a basic mp3 playback going from 0.265W to 0.175W.

BUG= 731860 , 747541 
TEST=verified resampling is not invoked for basic playback.

Change-Id: Ia885f41bc50d6fe36934587d34ae646d1ef89364
Reviewed-on: https://chromium-review.googlesource.com/590737
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491784}
[modify] https://crrev.com/732ddfe0c3ff211936187e80879a6cef82cdb70b/content/renderer/media/audio_renderer_mixer_manager.cc
[modify] https://crrev.com/732ddfe0c3ff211936187e80879a6cef82cdb70b/content/renderer/media/audio_renderer_mixer_manager_unittest.cc
[modify] https://crrev.com/732ddfe0c3ff211936187e80879a6cef82cdb70b/media/base/audio_latency.cc
[modify] https://crrev.com/732ddfe0c3ff211936187e80879a6cef82cdb70b/media/base/audio_latency.h
[modify] https://crrev.com/732ddfe0c3ff211936187e80879a6cef82cdb70b/media/renderers/audio_renderer_impl.cc

Status: Fixed (was: Assigned)

Comment 4 by olka@chromium.org, Aug 9 2017

Cc: henrika@chromium.org

Sign in to add a comment