Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Issue 235723003: Use larger buffer sizes for lower power on Linux. (Closed)

Created:
6 years, 8 months ago by DaleCurtis
Modified:
6 years, 8 months ago
CC:
chromium-reviews, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, miu+watch_chromium.org
Visibility:
Public.

Description

Use larger buffer sizes for lower power on Linux. HTML5 playback on Linux ALSA, Pulse, and ChromeOS will now use a buffer size of 1024+ for media playback. On my Z620 this takes pulseaudio daemon CPU usage from a solid 3-4% down to 1%. Likely there are savings in the Chrome process as well, but those are harder to measure against process noise. I suspect we'll see greater savings on Chromebooks. BUG=362261 TEST=Audio sounds the same always. CPU usage down. NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=264443

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fix compile errors. #

Patch Set 3 : Remove DCHECk. #

Patch Set 4 : Define maximum buffer size. #

Patch Set 5 : Fix test on other platforms. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -11 lines) Patch
M content/renderer/media/audio_renderer_mixer_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/audio/cras/audio_manager_cras.cc View 1 2 3 3 chunks +8 lines, -4 lines 0 comments Download
M media/audio/pulse/audio_manager_pulse.cc View 1 2 3 3 chunks +8 lines, -3 lines 0 comments Download
M media/base/audio_hardware_config.h View 1 chunk +4 lines, -0 lines 0 comments Download
M media/base/audio_hardware_config.cc View 1 2 2 chunks +50 lines, -2 lines 0 comments Download
M media/base/audio_hardware_config_unittest.cc View 1 2 3 4 2 chunks +33 lines, -0 lines 0 comments Download
M media/filters/audio_renderer_impl.cc View 1 chunk +8 lines, -1 line 0 comments Download

Messages

Total messages: 26 (0 generated)
DaleCurtis
6 years, 8 months ago (2014-04-11 20:16:04 UTC) #1
dgreid
lgtm, The only issue from chromeos might be when a low-latency stream is started while ...
6 years, 8 months ago (2014-04-11 21:17:34 UTC) #2
DaleCurtis
Given the existing code, Flash would have already had that problem, so I guess the ...
6 years, 8 months ago (2014-04-11 21:41:13 UTC) #3
dgreid
On 2014/04/11 21:41:13, DaleCurtis wrote: > Given the existing code, Flash would have already had ...
6 years, 8 months ago (2014-04-11 21:43:13 UTC) #4
henrika (OOO until Aug 14)
Drive-by comment. https://codereview.chromium.org/235723003/diff/1/media/base/audio_hardware_config.cc File media/base/audio_hardware_config.cc (right): https://codereview.chromium.org/235723003/diff/1/media/base/audio_hardware_config.cc#newcode115 media/base/audio_hardware_config.cc:115: // values are unused. OSX may have ...
6 years, 8 months ago (2014-04-14 08:03:23 UTC) #5
no longer working on chromium
https://codereview.chromium.org/235723003/diff/1/media/base/audio_hardware_config.cc File media/base/audio_hardware_config.cc (right): https://codereview.chromium.org/235723003/diff/1/media/base/audio_hardware_config.cc#newcode104 media/base/audio_hardware_config.cc:104: // to 20 ms worth of samples. For a ...
6 years, 8 months ago (2014-04-14 08:51:50 UTC) #6
DaleCurtis
https://codereview.chromium.org/235723003/diff/1/media/base/audio_hardware_config.cc File media/base/audio_hardware_config.cc (right): https://codereview.chromium.org/235723003/diff/1/media/base/audio_hardware_config.cc#newcode104 media/base/audio_hardware_config.cc:104: // to 20 ms worth of samples. For a ...
6 years, 8 months ago (2014-04-14 18:08:18 UTC) #7
DaleCurtis
xians, henrika: Please review. https://codereview.chromium.org/235723003/diff/1/media/filters/audio_renderer_impl.cc File media/filters/audio_renderer_impl.cc (right): https://codereview.chromium.org/235723003/diff/1/media/filters/audio_renderer_impl.cc#newcode281 media/filters/audio_renderer_impl.cc:281: const AudioParameters& hw_params = hardware_config_->GetOutputConfig(); ...
6 years, 8 months ago (2014-04-16 00:39:46 UTC) #8
no longer working on chromium
lgtm
6 years, 8 months ago (2014-04-16 08:26:08 UTC) #9
henrika (OOO until Aug 14)
LGTM. Nice work Dale.
6 years, 8 months ago (2014-04-16 08:40:15 UTC) #10
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 8 months ago (2014-04-16 18:18:22 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/235723003/20001
6 years, 8 months ago (2014-04-16 18:19:02 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-16 18:26:08 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_clang_dbg
6 years, 8 months ago (2014-04-16 18:26:08 UTC) #14
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 8 months ago (2014-04-16 22:19:22 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/235723003/40001
6 years, 8 months ago (2014-04-16 22:19:58 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-16 23:30:18 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel tryserver.chromium on linux_chromium_rel
6 years, 8 months ago (2014-04-16 23:30:18 UTC) #18
DaleCurtis
Hmm, pepper was requesting crazy 32k buffer sizes, so I've added a maxmium buffer size ...
6 years, 8 months ago (2014-04-17 01:06:51 UTC) #19
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 8 months ago (2014-04-17 01:06:58 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/235723003/60001
6 years, 8 months ago (2014-04-17 01:07:17 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-17 02:41:06 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_rel
6 years, 8 months ago (2014-04-17 02:41:07 UTC) #23
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 8 months ago (2014-04-17 06:03:40 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/235723003/80001
6 years, 8 months ago (2014-04-17 06:04:09 UTC) #25
commit-bot: I haz the power
6 years, 8 months ago (2014-04-17 06:06:50 UTC) #26
Message was sent while issue was closed.
Change committed as 264443

Powered by Google App Engine
This is Rietveld 408576698