Closed
Bug 1221580
Opened 10 years ago
Closed 8 years ago
Write a full-duplex sndio cubeb backend
Categories
(Core :: Audio/Video: cubeb, defect, P5)
Core
Audio/Video: cubeb
Tracking
()
RESOLVED
FIXED
mozilla58
| Tracking | Status | |
|---|---|---|
| firefox58 | --- | fixed |
People
(Reporter: padenot, Assigned: padenot)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
No description provided.
Updated•10 years ago
|
Component: Audio/Video: MediaStreamGraph → Audio/Video: cubeb
Updated•9 years ago
|
Rank: 55
Priority: -- → P5
If bug 1385258 drops media.navigator.audio.full_duplex=false support getUserMedia may stop working on OpenBSD.
| Assignee | ||
Comment 2•8 years ago
|
||
There has been a lot of thinking done over the last few days. We're going to take a completely different approach, and I've closed the bug you mention explaining the rationale.
We need to keep the code working for media.navigator.audio.full_duplex=false, because that's what we're using by default on android.
We'll open various bugs about the new effort we're planning, I'll CC you on the relevant ones.
Comment 3•8 years ago
|
||
Work is being done by alex in https://github.com/kinetiknz/cubeb/compare/master...ratchov:sndio_rec - and its to the point where it seems to work - there will be a PR on github probably for integration before it goes to mozilla-central ?
For proper integration i guess we'll have to patch https://dxr.mozilla.org/mozilla-central/source/modules/libpref/init/all.js#552 so that when we're on OpenBSD media.navigator.audio.full_duplex defaults to true, but that goes against the goal of making sndio backend available on other platforms.. (ie freebsd/linux)
I think there were conflicts on linux where pulseaudio was taking priority over sndio even if media.cubeb.backend was set to sndio - is the latter pref supposed to work (ie in https://dxr.mozilla.org/mozilla-central/source/dom/media/CubebUtils.cpp#244) ? i havent tested alex's work yet, its in the pipe :)
Alex also has a patch to allow building sndio backend on linux for bug #1351378, which im going to polish for inclusion.
Comment 4•8 years ago
|
||
https://github.com/kinetiknz/cubeb/pull/376 has the full-duplex implem.
As for the pref, is it better to add a section #elif defined(MOZ_SNDIO) or add it to #elif defined(XP_LINUX) in modules/libpref/init/all.js ?
ie #elif defined(XP_LINUX) || defined(MOZ_SNDIO) (if that's a valid preprocessor macro)
Comment 5•8 years ago
|
||
paul, i suppose your review queue is quite busy, but do you think this could be reviewed so that it lands in 58, including the github merge and then in m-c ?
Flags: needinfo?(padenot)
| Assignee | ||
Comment 6•8 years ago
|
||
(In reply to Landry Breuil (:gaston) from comment #5)
> paul, i suppose your review queue is quite busy, but do you think this could
> be reviewed so that it lands in 58, including the github merge and then in
> m-c ?
Yes. The review for the actual audio code will happen on github.
Flags: needinfo?(padenot)
Comment 7•8 years ago
|
||
I see that you merged the PR in https://github.com/kinetiknz/cubeb/commit/7d00ea6705cf94b46a20b7f3ea6ff6ad8dbeecde (thanks!), should we use this bug to handle the merging to m-c, and the libpref commit switching the full-duplex pref for SNDIO ?
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 10•8 years ago
|
||
Comment on attachment 8925038 [details]
Bug 1221580 - Update libcubeb to revision 7d00ea6705.
This touches only comments and non-tier-1 stuff.
Attachment #8925038 -
Flags: review?(kinetik)
Attachment #8925038 -
Flags: review?(achronop)
Comment 11•8 years ago
|
||
(In reply to Paul Adenot (:padenot) from comment #9)
> Created attachment 8925039 [details]
> Bug 1221580 - Use duplex on BSDs.
>
> Review commit: https://reviewboard.mozilla.org/r/196280/diff/#index_header
> See other reviews: https://reviewboard.mozilla.org/r/196280/
Im not sure this is what you want. This inconditionally enables full-duplex for everyone, not only sndio…
As i said in comment #4, id rather have it conditional to MOZ_SNDIO, be it a new section, or changing the
#elif defined(XP_LINUX)
for
#elif defined(XP_LINUX) || defined(MOZ_SNDIO)
...
| Comment hidden (mozreview-request) |
Comment 13•8 years ago
|
||
Comment on attachment 8925039 [details]
Bug 1221580 - Use duplex when sndio is enabled.
I dont know how to do it in mozreview, but definitely r+ for that part :)
Attachment #8925039 -
Flags: review?(landry) → review+
Comment 14•8 years ago
|
||
Except it should be built-tested first :)
mozbuild.preprocessor.Error: ('/usr/obj/ports/firefox-57.0beta14/firefox-57.0b14/modules/libpref/init/all.js', 542, 'SYNTAX_ERR', 'defined(XP_LINUX || defined(MOZ_SNDIO))')
Comment 15•8 years ago
|
||
Comment on attachment 8925039 [details]
Bug 1221580 - Use duplex when sndio is enabled.
oh dammit copypaste.
Comment 16•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8925038 [details]
Bug 1221580 - Update libcubeb to revision 7d00ea6705.
https://reviewboard.mozilla.org/r/196278/#review201716
Attachment #8925038 -
Flags: review?(kinetik) → review+
Updated•8 years ago
|
Attachment #8925038 -
Flags: review?(achronop) → review+
Comment 17•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8925039 [details]
Bug 1221580 - Use duplex when sndio is enabled.
https://reviewboard.mozilla.org/r/196280/#review203706
Damn you mozreview, land this already :)
| Assignee | ||
Comment 18•8 years ago
|
||
Sorry got side tracked quite hard. Will land this in a few.
Comment 19•8 years ago
|
||
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ab8967c4e3c6
Update libcubeb to revision 7d00ea6705. r=kinetik,achronop
https://hg.mozilla.org/integration/mozilla-inbound/rev/5cc48926ed9b
Use duplex when sndio is enabled. r=gaston
Comment 20•8 years ago
|
||
Woot ! So given the branches status right now, i guess it's targeted at 59 now, or it will be in 58 ? Either way, i'll probably ship it to our users in 57...
Comment 21•8 years ago
|
||
Hmm and i think that what landed in https://hg.mozilla.org/integration/mozilla-inbound/rev/5cc48926ed9b isnt what you wanted, it seems a mixture of the two versions of the patch that was in mozreview.
Comment 22•8 years ago
|
||
MOZ_SNDIO version appears to imply sndio capture delay is as bad as PulseAudio. Is that true?
Comment 23•8 years ago
|
||
(In reply to Jan Beich from comment #22)
> MOZ_SNDIO version appears to imply sndio capture delay is as bad as
> PulseAudio. Is that true?
I have no idea what those numbers mean :)
Comment 24•8 years ago
|
||
(In reply to Jan Beich from comment #22)
> MOZ_SNDIO version appears to imply sndio capture delay is as bad as
> PulseAudio. Is that true?
I don't know PulseAudio capture latency, cubeb_sndio
capture latency is a single block, which is 20ms by
default on OpenBSD. People may configure their machines
to use lower values. On modern (and not too busy) machines
2.5ms is known to work.
| Assignee | ||
Comment 25•8 years ago
|
||
Those number aren't used. We should remove them.
I'll fix my mistake about the patch now.
Comment 26•8 years ago
|
||
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b9dda4555fa5
Followup, don't enable full-duplex on unknown platforms.
Comment 27•8 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ab8967c4e3c6
https://hg.mozilla.org/mozilla-central/rev/5cc48926ed9b
https://hg.mozilla.org/mozilla-central/rev/b9dda4555fa5
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Updated•7 years ago
|
Assignee: nobody → padenot
You need to log in
before you can comment on or make changes to this bug.
Description
•