From owner-freebsd-ports-bugs@freebsd.org Fri May 22 21:52:30 2020 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7AB42DDFC4 for ; Fri, 22 May 2020 21:52:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49TKwG4t2Lz3gnH for ; Fri, 22 May 2020 21:52:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 9AD502DE349; Fri, 22 May 2020 21:52:30 +0000 (UTC) Delivered-To: ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99A752DDF60 for ; Fri, 22 May 2020 21:52:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49TKwG2qWFz3y0y for ; Fri, 22 May 2020 21:52:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B9FF253BE for ; Fri, 22 May 2020 21:52:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 04MLqTjd044614 for ; Fri, 22 May 2020 21:52:29 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 04MLqTQl044608 for ports-bugs@FreeBSD.org; Fri, 22 May 2020 21:52:29 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 246669] www/firefox: Unable to use microphone with ALSA backend Date: Fri, 22 May 2020 21:52:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: scf@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: gecko@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2020 21:52:30 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246669 Bug ID: 246669 Summary: www/firefox: Unable to use microphone with ALSA backend Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: gecko@FreeBSD.org Reporter: scf@FreeBSD.org Assignee: gecko@FreeBSD.org Flags: maintainer-feedback?(gecko@FreeBSD.org) 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. :) --=20 You are receiving this mail because: You are the assignee for the bug.=