Re: Kernel OSS vs ALSA

Michael Poole (poole@graviton.subatomic.org)
14 Oct 1999 10:15:20 -0400


Thomas Sailer <sailer@ife.ee.ethz.ch> writes:

> > * simultaneous multiple streams, with mixing as needed
>
> User space IMO

Bad idea IMO. For highly interactive applications (eg games, but also more
serious applications of VR) you don't want to take (a minimum of) a full
context switch before the sound card even has a prayer of seeing a new
audio sample. It's just not reasonable to restrict access to the audio hw
to one process (telephony while playing MP3s is a good place you want two
or more processes using the audio hw at once), and if you want to mix that
in userspace you're going to need a separate daemon process to do that.

While things like esd are very well and good for their particular target
(specifically, infrequent audio output that doesn't need to be synchronized
terribly closely to other events), I wouldn't want to be stuck playing a
DVD or MPEG file and having the sound go through that much indirection
(to use yet another example of concurrent hw access, if esd or the like
is running at the time).

There will be complications, of course, if the hardware does not natively
support multiple streams and the user tries to use them -- worst-case, a
daemon could be running and the kernel would call back into it. I suspect
best-case would be a stub inside the concurrent-audio applications that
redirected audio reads and writes directly to the mixing daemon (this
would fit nicely inside the ALSA library).

-- Michael

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/