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

Issue 11098031: Get PulseAudio implementation working. (Closed)

Created:
8 years, 2 months ago by DaleCurtis
Modified:
8 years, 1 month ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, Chris Rogers
Visibility:
Public.

Description

Get PulseAudio implementation working. - Switches from iterating the PA mainloop to a threaded mainloop which PulseAudio runs on its own. - Fixes several bugs and cleans up the code. Performance is much better than ALSA. I'm able to run audio output at 440 frames smoothly with Pulse whereas ALSA I couldn't get it to run below 1k w/o glitching. Sadly while the jitter is much better too, it's still not as smooth as the 8k buffer we were using previously: http://commondatastorage.googleapis.com/dalecurtis-shared/alsa-vs-pulse.png Which means I still need to look into writing some clock smoothing in order for us to turn on renderer side mixing. Unit tests to come later, mostly just getting it working now. BUG=32757 TEST=media_unittests / manual playback tests. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=168116

Patch Set 1 #

Total comments: 8

Patch Set 2 : Cork. BeginWrite. Cleanup. #

Total comments: 30

Patch Set 3 : Comments. #

Total comments: 22

Patch Set 4 : Fixes. #

Total comments: 6

Patch Set 5 : Comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+344 lines, -331 lines) Patch
M media/audio/audio_io.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M media/audio/pulse/pulse_output.h View 1 2 3 4 3 chunks +34 lines, -68 lines 0 comments Download
M media/audio/pulse/pulse_output.cc View 1 2 3 4 4 chunks +270 lines, -254 lines 0 comments Download
M media/base/audio_bus.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M media/base/audio_bus.cc View 1 2 3 3 chunks +14 lines, -8 lines 0 comments Download
M media/base/audio_bus_unittest.cc View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
DaleCurtis
Oddly, getting it working required deleting more code than adding it :o
8 years, 2 months ago (2012-10-09 23:32:29 UTC) #1
scherkus (not reviewing)
few initial comments cool stuff! please use BUG=32757 https://codereview.chromium.org/11098031/diff/1/media/audio/pulse/pulse_output.cc File media/audio/pulse/pulse_output.cc (right): https://codereview.chromium.org/11098031/diff/1/media/audio/pulse/pulse_output.cc#newcode181 media/audio/pulse/pulse_output.cc:181: while ...
8 years, 2 months ago (2012-10-10 17:56:29 UTC) #2
DaleCurtis
https://codereview.chromium.org/11098031/diff/1/media/audio/pulse/pulse_output.cc File media/audio/pulse/pulse_output.cc (right): https://codereview.chromium.org/11098031/diff/1/media/audio/pulse/pulse_output.cc#newcode181 media/audio/pulse/pulse_output.cc:181: while (context_state_ != PA_CONTEXT_READY) { On 2012/10/10 17:56:29, scherkus ...
8 years, 2 months ago (2012-10-10 18:19:05 UTC) #3
no longer working on chromium
Great work. Dale, I had a CL which did the same thing, but never got ...
8 years, 2 months ago (2012-10-10 21:04:42 UTC) #4
no longer working on chromium
I have been very busy on working on a M23 beta crash today, and will ...
8 years, 2 months ago (2012-10-10 21:05:49 UTC) #5
DaleCurtis
On 2012/10/10 21:05:49, xians1 wrote: > I have been very busy on working on a ...
8 years, 2 months ago (2012-10-10 22:38:55 UTC) #6
DaleCurtis
On 2012/10/10 22:38:55, DaleCurtis wrote: > On 2012/10/10 21:05:49, xians1 wrote: > > I have ...
8 years, 2 months ago (2012-10-11 00:25:17 UTC) #7
no longer working on chromium
On 2012/10/11 00:25:17, DaleCurtis wrote: > On 2012/10/10 22:38:55, DaleCurtis wrote: > > On 2012/10/10 ...
8 years, 2 months ago (2012-10-11 16:05:40 UTC) #8
scherkus (not reviewing)
https://codereview.chromium.org/11098031/diff/12001/media/audio/audio_io.h File media/audio/audio_io.h (right): https://codereview.chromium.org/11098031/diff/12001/media/audio/audio_io.h#newcode94 media/audio/audio_io.h:94: // must always be followed by a call to ...
8 years, 2 months ago (2012-10-11 20:19:31 UTC) #9
DaleCurtis
Comments addressed and tested. Removing the stream flags made the accuracy of the latency information ...
8 years, 2 months ago (2012-10-12 00:09:12 UTC) #10
no longer working on chromium
It looks really nice, great job. http://codereview.chromium.org/11098031/diff/17001/media/audio/pulse/pulse_output.cc File media/audio/pulse/pulse_output.cc (left): http://codereview.chromium.org/11098031/diff/17001/media/audio/pulse/pulse_output.cc#oldcode237 media/audio/pulse/pulse_output.cc:237: PA_STREAM_ADJUST_LATENCY | From ...
8 years, 2 months ago (2012-10-14 19:03:41 UTC) #11
scherkus (not reviewing)
OOC aside from my/xians' comments is there anything else this is waiting on? http://codereview.chromium.org/11098031/diff/17001/media/audio/pulse/pulse_output.cc File ...
8 years, 2 months ago (2012-10-17 22:44:53 UTC) #12
DaleCurtis
Depends on what we want. It's ready to go in as is w/ the current ...
8 years, 2 months ago (2012-10-17 22:53:29 UTC) #13
scherkus (not reviewing)
On 2012/10/17 22:53:29, DaleCurtis wrote: > Depends on what we want. It's ready to go ...
8 years, 2 months ago (2012-10-18 01:32:16 UTC) #14
DaleCurtis
On 2012/10/18 01:32:16, scherkus wrote: > On 2012/10/17 22:53:29, DaleCurtis wrote: > > Depends on ...
8 years, 2 months ago (2012-10-18 01:34:02 UTC) #15
scherkus (not reviewing)
On 2012/10/18 01:34:02, DaleCurtis wrote: > On 2012/10/18 01:32:16, scherkus wrote: > > On 2012/10/17 ...
8 years, 2 months ago (2012-10-18 01:57:37 UTC) #16
no longer working on chromium
On 2012/10/17 22:53:29, DaleCurtis wrote: > Depends on what we want. It's ready to go ...
8 years, 2 months ago (2012-10-18 08:58:37 UTC) #17
DaleCurtis
Hmm, came back to this today and there's lot of clicking :-/ Latency information is ...
8 years, 1 month ago (2012-11-06 01:35:07 UTC) #18
DaleCurtis
Turns out the pops and clicks are from underflow combined with hitting PulseAudio's resampler with ...
8 years, 1 month ago (2012-11-07 02:41:39 UTC) #19
no longer working on chromium
On Wed, Nov 7, 2012 at 3:41 AM, <dalecurtis@chromium.org> wrote: > Turns out the pops ...
8 years, 1 month ago (2012-11-07 15:04:10 UTC) #20
DaleCurtis
Thanks Xians. I think that sounds like a reasonable approach. I think now is a ...
8 years, 1 month ago (2012-11-07 19:10:58 UTC) #21
DaleCurtis
Whoops, didn't finish my thought. We should do that so we don't have to make ...
8 years, 1 month ago (2012-11-07 19:11:37 UTC) #22
DaleCurtis
Guys this should be ready to land now. It's glitchy if opened at the non-hw ...
8 years, 1 month ago (2012-11-09 01:10:52 UTC) #23
DaleCurtis
http://codereview.chromium.org/11098031/diff/35001/media/audio/pulse/pulse_output.cc File media/audio/pulse/pulse_output.cc (right): http://codereview.chromium.org/11098031/diff/35001/media/audio/pulse/pulse_output.cc#newcode262 media/audio/pulse/pulse_output.cc:262: PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE | On 2012/11/09 01:10:52, DaleCurtis wrote: ...
8 years, 1 month ago (2012-11-09 01:18:49 UTC) #24
no longer working on chromium
On 2012/11/09 01:10:52, DaleCurtis wrote: > Guys this should be ready to land now. It's ...
8 years, 1 month ago (2012-11-09 16:06:02 UTC) #25
scherkus (not reviewing)
lgtm w/ nits lets iterate on this when you/we/someone has the time :) http://codereview.chromium.org/11098031/diff/35001/media/audio/pulse/pulse_output.cc File ...
8 years, 1 month ago (2012-11-14 22:31:30 UTC) #26
DaleCurtis
Thanks guys! CQ'ing. https://codereview.chromium.org/11098031/diff/35001/media/audio/pulse/pulse_output.cc File media/audio/pulse/pulse_output.cc (right): https://codereview.chromium.org/11098031/diff/35001/media/audio/pulse/pulse_output.cc#newcode446 media/audio/pulse/pulse_output.cc:446: while (pa_operation_get_state(op) == PA_OPERATION_RUNNING) On 2012/11/14 ...
8 years, 1 month ago (2012-11-14 23:49:43 UTC) #27
commit-bot: I haz the power
8 years, 1 month ago (2012-11-14 23:54:23 UTC) #28

Powered by Google App Engine
This is Rietveld 408576698