Bug 246771 - [audio/sndio] rc.d/sndiod flags cause microphone not to work in www/firefox
Summary: [audio/sndio] rc.d/sndiod flags cause microphone not to work in www/firefox
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-27 09:42 UTC by Daniel Ebdrup Jensen
Modified: 2020-07-17 21:09 UTC (History)
3 users (show)

See Also:


Attachments
This patch changes the flags to only be -j off (396 bytes, patch)
2020-05-27 09:42 UTC, Daniel Ebdrup Jensen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Ebdrup Jensen freebsd_committer 2020-05-27 09:42:44 UTC
Created attachment 214905 [details]
This patch changes the flags to only be -j off

With the flags provided for sndiod by this port and sndiod running, a microphone is not picked up in www/firefox.
If the flags are changed to just be "-j off", the microphone works and Firefox (and perhaps other browsers?) can be used for video conferencing out-of-the-box.
Comment 1 Daniel Ebdrup Jensen freebsd_committer 2020-05-27 11:56:30 UTC
I'm not even sure -j off is required, either, since it works without it.
Comment 2 Tobias Kortkamp freebsd_committer 2020-05-30 18:03:07 UTC
The options are there to make multichannel audio work correctly as one would
expect with sndiod in mpv like when using OSS.  I do not see how this would
break recording?  It doesn't for me.

This is with a virtual_oss device that was configured with only 2 mix
channels instead of 8 and not with a "real" device, right?
Comment 3 Daniel Ebdrup Jensen freebsd_committer 2020-05-30 20:53:22 UTC
The test was performed both with the built-in audio card (not the one from the dock) as well as with the composite virtual_oss device I normally use, so I'm not sure it's got anything to do with that.

I've also got vague memories of someone telling me they needed to remove all of the flags but -j off.
Comment 4 Tobias Kortkamp freebsd_committer 2020-05-31 19:23:33 UTC
To me this sounds like something is not right and we should not cover it up.

Can you patch Firefox as in [1,2] and see if the problem goes away for you?
As a quick check without recompiling Firefox try setting
media.getusermedia.channels=1 in about:config first.

[1] https://raw.githubusercontent.com/openbsd/ports/8f6b4efc570ad37f987db02e9540fe90f49ed3b4/www/mozilla-firefox/patches/patch-media_libcubeb_src_cubeb_sndio_c
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1633769
Comment 5 Daniel Ebdrup Jensen freebsd_committer 2020-05-31 20:43:31 UTC
Both with and without the OID suggested, sndiod with the default flags (and -d to avoid it detaching) just returns and endless stream of this:
snd0: rsnd/default: failed to open audio device
snd0: rsnd/default: failed to open audio device
snd0: rsnd/default: failed to open audio device
Et cetera ad nauseum.

I don't see why it's necessary to hardcode the flags in etc/rc.d/sndiod when it works fine without them, though?

Rebuilding Firefox isn't really something that's possible, it takes almost a week. :(