official Linux Flash blog (OSS)

Lee Revell rlrevell at joe-job.com
Sun May 28 20:14:12 BST 2006


On Sun, 2006-05-28 at 18:18 +0100, Paul Sladen wrote:
> On Sun, 28 May 2006, Matthew Garrett wrote:
> > On Sun, May 28, 2006 at 04:34:29PM +0100, Paul Sladen wrote:
> > > it's our job to ensure that whichever interface a programmer
> > > chooses to use (ALSA, gstreamer, esd, OSS) that they all work cooperatively
> > > together, generate nice sound from the speakers and don't prevent other
> > > programs from running (by hogging the sound device).
> > Which is, sadly, pretty much impossible if they're using OSS.
> 
> Only allowing a single connection to '/dev/dsp' is a limitation of the
> current 'alsa-oss' emulation driver and not of the OSS interface.
> 
> For example, the Maestro [multi-channel sound card] native OSS driver allows
> multi-open and assigns each new connection to a pair of separate hardware
> channels, until all of the hardware channels are exhausted.
> 
> The solution to making 'alsa-oss' support multi-open can either be done by
> having the 'snd-pcm-oss' driver talk straight to dmix (internally within the
> kernel), or by reflecting each connection back out to userspace---in the
> same way that opening the '/dev/ptmx' multiplexer assigns and creates a new
> '/dev/pts/*' pseudo-terminal.
> 

It would have to be the second one, as dmix (and all advanced ALSA
functionality) is implemented in userspace.  It was proposed before but
rejected by the kernel guys, I guess the ALSA team will have to try
again.  Sigh... I was really hoping that *5 years* after the ALSA -> OSS
transition, that the apps would have caught up.  It seems like the worst
offenders (Flash, Skype) are working on ALSA support in the latest
versions, and newer games like Doom3 already support ALSA.

> According to the email/thread below, the current state-of-affairs is:
> 
>   OSS-emulation supports multi-open, but only on multi-channel hardware
>   ALSA supports multi-open on stereo hardware (and does software mixing)
> 
> What it needs is the funky combination of the two...  That thread:
> 
>   http://www.ussg.iu.edu/hypermail/linux/kernel/0601.0/0917.html
> 
> The code would be alot quicker for somebody who knows the current ALSA
> drivers to write...; this would seem like a good case for bounting.

It's been discussed lately on alsa-devel, more input is certainly
welcome.  Any proposed solution needs to be run by the kernel buys
before doing much work on it, as I would expect the default reaction to
be "fix the apps".

Lee




More information about the sounder mailing list