Subject: Re: Proposal: porting ALSA to NetBSD.
To: Andrew Nesbit <alnesbit@students.cs.mu.OZ.AU>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-kern
Date: 03/27/2002 12:11:55
On Thu, 28 Mar 2002, Andrew Nesbit wrote:

: Now that I've been thinking about it a bit, I think it should be
: possible to do this by porting or implementing just the ALSA library
: API and having it access the hardware using NetBSD's native interface
: described in audio(4).

This is what NetBSD does for ossaudio.  (Look carefully at libossaudio and
/usr/include/soundcard.h; it's simply a wrapper header and library.)

: I think this might work because well-written ALSA-using programs
: should only be using the ALSA library API (in theory, at least)... and
: not the kernel API or anything low-level like that.

Even if it uses ioctls, those can be intercepted the same way they are for
libossaudio when compiling natively.

Providing this support for binary emulation may be more difficult, but not
necessarily impossible.  (There's a kernel-level emulator for ossaudio
ioctls for Linux binaries, for instance; it just translates the bare
minimum necessary to make Linux's OSS userland support work.)

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/