From owner-freebsd-ports@freebsd.org Sun Jan 29 02:10:13 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7267CC2C6E for ; Sun, 29 Jan 2017 02:10:13 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 914771D6E; Sun, 29 Jan 2017 02:10:13 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id E3F5B14DD; Sun, 29 Jan 2017 02:10:12 +0000 (UTC) To: freebsd-ports@freebsd.org, jmc-freebsd2@milibyte.co.uk Subject: Re: Firefox and sndio In-Reply-To: <20170128214036.746d8767@curlew> Message-Id: <20170129021012.E3F5B14DD@freefall.freebsd.org> Date: Sun, 29 Jan 2017 02:10:12 +0000 (UTC) From: jbeich@freebsd.org (Jan Beich) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 02:10:13 -0000 Mike Clarke writes: > On Sat, 28 Jan 2017 14:58:51 +0000 > Grzegorz Junka wrote: > >> On 28/01/2017 11:37, Tobias Kortkamp wrote: >> > On Sat, Jan 28, 2017, at 11:23, Grzegorz Junka wrote: >> >> Audio in Firefox seems to be working fine when ALSA is enabled. But when >> >> ALSA is disabled and only SNDIO is enabled there is no sound. In either >> >> case I had PULSEAUDIO disabled. What's the expected configuration for >> >> this to work? >> > Is sndiod running? If not: >> > >> > sysrc sndiod_enable=YES >> > service sndiod start >> > >> >> Thanks Tobias. That helped. Out of interest. Is there any reason why I >> should prefer either SNDIO, PUlSEAUDIO or ALSA? > > This currently creates a problem for those of us using Firefox from > packages because the default build has SNDIO turned off. > > $ pkg info firefox [...] > ALSA : on [...] > PULSEAUDIO : on [...] > SNDIO : off Only backends that support lazy bindings are enabled by default i.e., try PULSEAUDIO, if N/A fallback to ALSA, if N/A fallback to native OSS. SNDIO has lower priority than ALSA in libcubeb but higher in WebRTC and cannot fallback to native OSS as well. SNDIO currently doesn't work inside jail and neither sndiod nor Firefox support Capsicum sandboxing, so falling back to ALSA (or OSS) is important. As Firefox lacks a preference to force a specific audio backend if many are available we're stuck juggling dlopen(3) priorities e.g., SNDIO can be tried before PULSEAUDIO but after JACK, then ALSA, then OSS.