Date: Mon, 18 Mar 2024 17:49:58 +0100 From: Christos Margiolis <christos@freebsd.org> To: Mark Johnston <markj@freebsd.org> Cc: status-updates@freebsdfoundation.org, freebsd-multimedia@freebsd.org, jrm@freebsd.org, Konstantin Belousov <kostikbel@gmail.com>, Florian Walpen <dev@submerge.ch> Subject: Re: Re: Re: [Development report #7] Audio Stack Improvements Message-ID: <lxmkloyweyut5ajip7bs75zagyhae3yn2ete5f3efoo43367wy@f3ddk4h4jkv4> In-Reply-To: <ZfUGCUBmJwrZoZ4Z@framework.home> References: <cwh2u6nkmwcb2sujgcejwvedv77h6i3hwkgh4j2qtvazwt4om7@fczrhwet2pdd> <ZfQobZH2b49nN8nN@framework.home> <yayczejf65tarwha34r7mjtivi6e2afgdj6iunt7zwsnpv2l3y@64xjpobl26fj> <ZfUGCUBmJwrZoZ4Z@framework.home>
next in thread | previous in thread | raw e-mail | index | archive | help
Mark Johnston wrote: > On Fri, Mar 15, 2024 at 06:00:16PM +0100, Christos Margiolis wrote: > > Applications are meant to open an audio device through /dev/dsp (if > > hw.snd.basename_clone is enabled), or through /dev/dspX, so the vast > > majority of applications should work with no problems. > > > > Applications that open a device through /dev/dspX.[X]X will break with > > this patch. However, opening a device like this is discouraged anyway, > > according to the sound(4) man page (see FILES section): > > To your knowledge, do any popular applications actually do this? A > comment in the man page isn't very important if applications end up > ignoring it. :) I don't really know of an application that does this. Konstantin Belousov wrote: > On Fri, Mar 15, 2024 at 10:38:01PM -0400, Mark Johnston wrote: > > If needed, would it be a lot of work to provide backward compatibility? > Should be rather trivial, to catch the case in the devfs lookup clone > callback and instantiate fake nodes. So, it is indeed trivial to catch it in the lookup loop, but currently /dev/dsp%d.[p|r|vp|vr]%d will have no effect because with this patch you cannot open a specific channel, so what we could do is simply dev_ref() /dev/dsp%d. Florian Walpen wrote: > Is it even possible to open pcm devices through /dev/dspX.Y currently? > I remember that I stumbled upon this when I developed the Jack backend > and it wasn't possible to open /dev/dspX.Y, I had to use /dev/dspX. > Just checked and that still seems to be the case on 14.0-RELEASE. > Unless I missed something, I'd conclude that it's not used in ports > :-) I think you can, but because a specific channel can only be opened exclusively, if say, /dev/dsp0.0 is already opened, an application cannot re-open it, so maybe this is why you're getting errors. Also some IOCTLs seem to not work on VCHANs: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246208 > Non-clone aliases like /dev/dsp_mmap seem to work though, never > actually seen them in use but I think we should preserve them as part > of OSSv4 compatibility. Yeah, we can do this. Christos
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?lxmkloyweyut5ajip7bs75zagyhae3yn2ete5f3efoo43367wy>