Date: Fri, 22 May 2020 21:52:28 +0000 From: bugzilla-noreply@freebsd.org To: gecko@FreeBSD.org Subject: maintainer-feedback requested: [Bug 246669] www/firefox: Unable to use microphone with ALSA backend Message-ID: <bug-246669-21738-6o9gy7k67R@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-246669-21738@https.bugs.freebsd.org/bugzilla/> References: <bug-246669-21738@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-gecko mailing = list <gecko@FreeBSD.org> for maintainer-feedback: Bug 246669: www/firefox: Unable to use microphone with ALSA backend https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246669 --- Description --- I am attempting to get the microphone on my webcam to work using ALSA in Firefox 76. It used to work although I do not know when it stopped. If I use ALSA with ffmpeg, the microphone does work, so I suspect it should be something simple that I am missing in Firefox. I am using a new profile, so no addons should be interfering. My asound.conf makes use of the ASYM PCM plugin to combine the input and output from different devices. In my case, speakers for output and microphone from USB webcam. I have also tried Chromium, but I am uncertain if it is using OSS or ALSA for the microphone. The simplest test I found, out of the many I tried, is https://webrtc.github.io/samples/src/content/getusermedia/volume/ Firefox does not register any volume, yet Chromium does. Another test is https://browserleaks.com/webrtc. It shows "Open Sound System" for one of the audio on Chromium, which may mean it is seeing/using ALSA. One odd behavior is that Chromium keeps the audio and video devices open while Firefox stops them after several seconds. /usr/local/etc/asound.conf -------------------------- # # FreeBSD/OSS # # Create slave of the sound card/speakers. pcm_slave.oss4 { pcm.type oss pcm.device /dev/dsp4 pcm.hint.description "Open Sound System" } # Create slave of the webcam microphone. pcm_slave.oss7 { pcm.type oss pcm.device /dev/dsp7 pcm.hint.description "Open Sound System" } # Mix webcam for input and speakers for output. pcm.!sysdefault { type asym capture.pcm { type plug slave oss7 } playback.pcm { type plug slave oss4 } hint { description "Open Sound System" } } pcm.!default pcm.sysdefault # There is no asym for ctl. It would be nice to tie the controllers togeth= er # into a single device like the PCM ASYM plugin does. ctl.oss { type oss # device /dev/mixer7 hint { description "Open Sound System" } } ctl.!sysdefault ctl.oss ctl.!default ctl.sysdefault -------------------------- Notes: - Running firefox-76.0_2,1 built locally within poudriere. - Firefox is using ALSA according to about:support. However, it only shows an input device of "default" but no output device. Firefox is able to output audio, so this is odd. - Firefox is playing audio just fine. - Firefox detects both the video (two blank lines) and microphone when a WebRTC session starts. It calls the microphone "default". - No other backend other than ALSA is installed on the system nor was Firefox compiled with one. - ffmpeg is able to use the microphone with this command: ffmpeg -f alsa -i default test.wav - The webcam mixer mic device is at 100. - Muting the microphone in a WebRTC session in Jitsi Meet (https://meet.jit.si/) or AppRTC (https://appr.tc/) causes the tab to crash rather often with a signal 11. Sometimes it freezes for a moment then crashes but mostly crashes instantly. - FreeBSD 12.1-STABLE r360638. Any suggestions? I may have to try sndio or virtual_oss someday, but I figure this should still work with Firefox. Any logs to gather? I have messed around with MOZ_LOG, NSPR_LOG_MODULES, WEBRTC_TRACE_FILE and some other environment variables, but there is a bit of black magic there. :)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-246669-21738-6o9gy7k67R>