Allow building against sndio on more than just OpenBSD
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox55 wontfix, firefox100 fixed)
People
(Reporter: jbeich, Assigned: sna)
References
Details
Attachments
(3 files, 1 obsolete file)
(deleted),
text/x-review-board-request
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
text/x-phabricator-request
|
Details |
Comment hidden (mozreview-request) |
Comment hidden (obsolete) |
Comment hidden (mozreview-request) |
Comment 5•8 years ago
|
||
Comment 6•8 years ago
|
||
mozreview-review |
Comment 7•8 years ago
|
||
Comment 8•7 years ago
|
||
Comment 10•7 years ago
|
||
Updated•7 years ago
|
Comment hidden (mozreview-request) |
Reporter | ||
Comment 12•7 years ago
|
||
Comment 13•7 years ago
|
||
mozreview-review |
Updated•6 years ago
|
Reporter | ||
Comment 14•6 years ago
|
||
(In reply to Jan Beich from comment #9)
- sndio doesn't play well with other backends under media/webrtc/
Obsolete after bug 1397793.
- alsa, jack, pulseaudio haven't been converted to moz.configure yet
Obsolete after bug 1452509.
Comment 15•4 years ago
|
||
What's the current status of this patch? I'd also like to build firefox on Linux with sndio.
It sounds to me like --enable-audio-backends is a separate cleanup that should be tracked in its own bug.
Comment 16•3 years ago
|
||
Jan, maybe it's time to merge this or a variation of this? As you say, things should work, I have reports of downstream using this patch (or a variation) and folks say it works well. Quoting and breaking down a message of yours above:
Creating --enable-audio-backends is not so simple. The current state is a mess:
- alsa[1] and sndio lack lazy bindings (e.g., to enable by default downstream)
Those are not enabled by default by us, and it seems to work for Alsa for a few downstream users at least. Not sure if sndio is different here?
- sndio doesn't play well with other backends under media/webrtc/
We're not using this anymore in any circumstances.
- alsa, jack, pulseaudio haven't been converted to moz.configure yet
Done
- alsa and jack have broken full_duplex in libcubeb
Folks using this tell me it works currently (we've received patches since then).
- jack lacks a backend under media/webrtc/
Not needed.
- jack and pulseaudio code hasn't been tested on Android, OS X or Windows
This is not working today, is it? I reckon it would be rather cool to have jack working on Windows though so it could be used as with ASIO later in the chain to have amazing performance. This doesn't need to be done here, but I can help someone who would like to have it working probably. We can make configure fail in those cases.
- Android, OS X or Windows backends are unusable on (free)desktop Unix
This is fine, we can make configure fail in those cases as well. It's improbable that we'd ever implement a compatible API for those.
So really what's needed is a bit of code that splits the list of backeds requested for inclusion, and then have another bit of code that checks and decides based on (1) the presence of a header file for backends that are not usable lazily (2) a few hard-coded rules ("OpenSL on Windows -> failure", etc.). I can probably do something like that on the side (based on your patch), we're in the process of doing quite a few cleanups on cubeb anyways (with the switch to rust for tier-1 backends, we have two backends for the same audio stack, for example).
Assignee | ||
Comment 17•3 years ago
|
||
I took a shot at this.
I added --enable-audio-backends and the logic which should trigger a failure when selecting incompatible backends for certain targets. For example, if wasapi is selected on anything other than WINNT it errors out.
I also added the logic for allowing sndio to be built on more platforms than just OpenBSD.
I have not tested the other configurations due to lack of means (no OS X or Android).
Comment 18•3 years ago
|
||
Nordin, please use phabricator to propose patches.
please see:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Assignee | ||
Comment 19•3 years ago
|
||
This addresses the original intent of the bug report which asks for allowing
sndio to be built on more than just OpenBSD. In addition of modifying the
existing --enable-sndio to support this request, the option
--enable-audio-backends was added which takes a list of possible backends to
support per discussion in the bug report.
For example specifying --enable-audio-backends=alsa,jack,pulseaudio,sndio
allows for runtime selection of those four cubeb backends. If all four backends
are available the user can specify media.cubeb.backend
in about:config
to
force a specific backend.
Updated•3 years ago
|
Assignee | ||
Comment 20•3 years ago
|
||
Depends on D141450
Updated•3 years ago
|
Updated•3 years ago
|
Comment 21•3 years ago
|
||
Comment 22•3 years ago
|
||
Backed out for causing multiple failures.
Comment 23•3 years ago
|
||
Going to pass this to Nordin, looks like we need to tweak Windows defaults :)
Assignee | ||
Comment 24•3 years ago
|
||
I updated the commit to fix what the logs indicated.
I addressed cubeb_resampler.cpp
being added redundantly when two different backends which depend on it were enabled in media/libcubeb/src/moz.build
which caused failures when building for Android. For the py3 failures it seems that was caused by having the help=
text missing {Enable|Disable}
due to a non-constant default. I added that and it should be good now. Finally, the logic which checks if the platform supports the backend selected was fixed. Hopefully this addresses everything.
I cannot build or test for Windows but I suspect it should be good. I am waiting for the Linux build to finish compiling currently but it passed the configure phase fine so far. Thank you for reviewing.
Comment 25•3 years ago
|
||
Comment 26•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•