Alsa backend is check in make config dialog, and I didn't change my configuration. $ pkg info | grep 'alsa' alsa-lib-1.1.2_2 ALSA compatibility library
Although it shouldn't change ALSA, OSS was added as an option. Can you check if you have media.cubeb.backend in your firefox about:config? If not, firefox is trying to use default driver (I'm not sure which one is that). If that config has value, only that driver will be used. You can set it to "oss" to use FreeBSD native driver.
I have just checked - I have only media.cubeb.logging_level media.cubeb.output_voice_routing media.cubeb.sandbox
Can you test if OSS works for you by creating media.cubeb.backend as string and giving it value oss? The OSS wasn't made default on FreeBSD to keep compatibility, but there might be some bug in the latest patch.
(In reply to Goran Mekić from comment #3) Done - that fixes the problem. Thanks!
(In reply to jakub_lach from comment #4) FWIW, value 'alsa' does not.
(In reply to jakub_lach from comment #5) When alsa-lib is installed but alsa-plugin is *not* then cubeb detects libasound.so then chooses alsa instead of oss. This is correct on Linux where kernel has ALSA drivers but on FreeBSD only emulation via plugins like oss, jack, pulse, sndio is supported. Check what pulled alsa-lib. If nothing, just remove the package.
(In reply to Jan Beich from comment #6) Thanks, $ pkg info -r '*alsa*' alsa-lib-1.1.2_2: ffmpeg-4.3.1_1,1 openjdk8-8.265.01.1 At this point I have no preference between oss and alsa, I'm just happy I have working sound in Firefox again :)
(In reply to Goran Mekić from comment #3) > by creating media.cubeb.backend as string and giving it value oss + WebRTC work fine with this configuration. I'm request to add this information to handbook: https://www.freebsd.org/doc/handbook/desktop-browsers.html or at least in www/firefox*/pkg-message.
(In reply to jakub_lach from comment #7) Rebuild www/firefox after disabling ALSA option, like current default. (In reply to VVD from comment #8) Already in pkg-message: > Microphone selection only works in `oss`, `pulse`, `pulse-rust` backends.
(In reply to Jan Beich from comment #9) Where is "media.cubeb.backend" in this description? I spend a lot of time last half of year to find how to turn on sound in WebRTC application like Discord or Zoom WITHOUT pulseaudio (with pulseaudio installed my system doesn't work properly and I don't need it for something else). All information which I found in internet (forums, email lists, different documentation) said "doesn't work" or "use pulse - it work for me this way only". And nothing about set media.cubeb.backend=oss.
Created attachment 217480 [details] firefox pkg-message This is my suggestion of pkg-message edit.
(In reply to Goran Mekić from comment #11) Can you add words about WebRTC, plz?
(In reply to VVD from comment #10) > Where is "media.cubeb.backend" in this description? A few lines above. New users and binary package users don't need to touch media.cubeb.backend. I did confirm inside pristine jail on 11.3 i386 and 12.1 amd64. Where it gets hairy is when a user has installed jackit or sndio or misconfigured pulseaudio by blindly following advices found on the internet (aimed for Linux). Each of those have their own maintainers while firefox provides a way to explicitly select a specific backend. However, pkg-message refers to about:support for troubleshooting. > And nothing about set media.cubeb.backend=oss. OSS was added in ports r370932 then removed in ports r485458 and re-added in ports r545611. Only the recent implementation supports device enumeration necessary for microphone selection in WebRTC. (In reply to VVD from comment #12) > Can you add words about WebRTC, plz? See "Microphone selection...". WebRTC doesn't require microphone and camera, see data channels.
(In reply to VVD from comment #12) Gladly, but what about WebRTC? I'm not aware of any changes regarding WebRTC.
A commit references this bug: Author: jbeich Date: Mon Aug 24 12:50:00 UTC 2020 New revision: 546073 URL: https://svnweb.freebsd.org/changeset/ports/546073 Log: www/firefox: document probing order for the default audio backend PR: 248847 Changes: head/www/firefox/pkg-message head/www/firefox-esr/pkg-message
A commit references this bug: Author: jbeich Date: Mon Aug 24 12:50:10 UTC 2020 New revision: 546074 URL: https://svnweb.freebsd.org/changeset/ports/546074 Log: www/firefox: document native audio is no longer a missing feature Submitted by: Goran Meki? PR: 248847 Changes: head/www/firefox/pkg-message head/www/firefox-esr/pkg-message
A commit references this bug: Author: jbeich Date: Mon Aug 24 12:52:41 UTC 2020 New revision: 546078 URL: https://svnweb.freebsd.org/changeset/ports/546078 Log: MFH: r546073 www/firefox: document probing order for the default audio backend PR: 248847 Approved by: ports-secteam blanket Changes: _U branches/2020Q3/ branches/2020Q3/www/firefox/pkg-message branches/2020Q3/www/firefox-esr/pkg-message
A commit references this bug: Author: jbeich Date: Mon Aug 24 12:53:33 UTC 2020 New revision: 546079 URL: https://svnweb.freebsd.org/changeset/ports/546079 Log: MFH: r546074 www/firefox: document native audio is no longer a missing feature Submitted by: Goran Meki? PR: 248847 Approved by: ports-secteam blanket Changes: _U branches/2020Q3/ branches/2020Q3/www/firefox/pkg-message branches/2020Q3/www/firefox-esr/pkg-message
A hard to hit corner case. New users would have ALSA=off (current default), existing users with saved ALSA=on (previous default) would have alsa-plugins installed. Users who installed pulseaudio or sndio are not affected. (In reply to VVD from comment #10) > All information which I found in internet pkg-message (ports r533208) was late because I don't have a microphone or a camera. My assumption was: ALSA's "default" (aka "/dev/dsp") is enough as microphone and speakers/headphones are plugged to the same panel. Do all webcams have a builtin microphone, exposed as a separate /dev/dspN? > "doesn't work" or "use pulse - it work for me this way only" https://wiki.freebsd.org/Sound#For_Firefox.2FChrome_video_conferencing:_sndio_integration_for_userspace_programs
(In reply to Goran Mekić from comment #14) > Gladly, but what about WebRTC? I'm not aware of any changes regarding WebRTC. Sound in Discord voice channels (used WebRTC) work for me now. With media.cubeb.backend=oss and doesn't work without media.cubeb.backend. Zoom and other WebRTC application didn't tested yet.
(In reply to Jan Beich from comment #19) > https://wiki.freebsd.org/Sound#For_Firefox.2FChrome_video_conferencing:_sndio_integration_for_userspace_programs How to find this link? My google show a lot of questions without answers. Why this information isn't in handbook or no link from handbook on this page?
(In reply to Jan Beich from comment #13) > WebRTC doesn't require microphone and camera ? Some web application use WebRTC for audio (in/out) - without this option sound doesn't work. But other web application doesn't use WebRTC for audio - youtube, twitch and etc work fine with and without this option.
(In reply to Jan Beich from comment #19) >A hard to hit corner case. New users would have ALSA=off (current default), >existing users with saved ALSA=on (previous default) would have alsa-plugins >installed. Users who installed pulseaudio or sndio are not affected. Somehow I did not have alsa-plugins installed, despite preserved previous defaults. I suspect Firefox could be historically original reason I had ALSA turned on in other ports, though not really needed here. Anyway, I would expect Firefox to pull in all dependencies still. All in all thanks for your prompt explanations and help.
(In reply to VVD from comment #20) > With media.cubeb.backend=oss and doesn't work without media.cubeb.backend. Always check about:support. If it says "pulse-rust" then pulseaudio would be launched on demand by Firefox. "jack" needs to be started manually, "sndio" needs sndiod for proper A/V sync (bug 218188), "alsa" requires alsa-plugins to get oss (or pulse, or jack, etc). Keep it simple and don't install any sound server.
(In reply to Jan Beich from comment #24) Firefox was build with ALSA - option from time before OSS support work again. I have installed both: audio/alsa-lib audio/alsa-plugins > Always check about:support. Without media.cubeb.backend: Звуковая подсистема alsa (Sound system?) WebRTC doesn't work. With media.cubeb.backend=oss: Звуковая подсистема oss WebRTC work fine. > Keep it simple and don't install any sound server. Ofc! I don't need pulse/sndio/jack, but some software mandatory require. OSS support is very good news for me!
(In reply to VVD from comment #25) Forgot: I'll rebuild FF without ALSA and will test default value for media.cubeb.backend (without it).
(In reply to VVD from comment #26) > Forgot: I'll rebuild FF without ALSA and will test default value for media.cubeb.backend (without it). Tested - work as expected: Without media.cubeb.backend: Звуковая подсистема oss WebRTC work fine. But anyway I request to add information about the WebRTC (possible with examples: Discord, Zoom and etc) and description of the media.cubeb.backend in the handbook: https://www.freebsd.org/doc/handbook/desktop-browsers.html Thanks!
(In reply to VVD from comment #27) > I request to add information about the WebRTC Patches welcome! Everyone here is a volunteer. See also bug 246449.