Subject: Re: Proposal: porting ALSA to NetBSD.
To: Andrew Nesbit <alnesbit@students.cs.mu.OZ.AU>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 03/27/2002 11:51:13
On Thu, 28 Mar 2002, Andrew Nesbit wrote:

> On 27 Mar 2002, Jared D. McNeill wrote:
>
> For sure about the drivers.  But then there's the API.  A big part of
> my idea was to be able to easily port Linux audio apps to NetBSD.
> Developers are moving away from OSS/Free now, and moving to ALSA for
> an audio output driver, and also having support for LADSPA plugins,
> etc.  I think it would be great if we could easily get ports of their
> programs.

Sounds good. As Todd mentioned, look at libossaudio for prior art.

> 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).  If this arrangement were taken, then no ALSA
> code needs to go into the kernel or LKMs: it could all be contained in
> a package.

Yep. :-)

> 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.  I'll have to
> confirm this with the ALSA people though.
>
> So that's for the API... drivers are a different matter though.  I'll
> have a bit more of a think about it.
>
> > It might serve useful to have a /dev/dsp that supports the ALSA ioctls,
> > but that wouldn't require a direct port so much as a compatibility
> > layer.
>
> Could you please tell me a little more?

I think it's that you can fire off OSSaudio ioctls on /dev/dsp, and the
right thing happens.

> > Your efforts would probably be better spent elsewhere -- I can think of
> > a few limitations of our audio subsystem that need fixing :^)
>
> Thanks for the comments.  I'm aware of the sorts of limitations with
> NetBSD's audio subsystem, and I'd be helping fix them anyway if I
> decide to go ahead with the plan I've jsut described.  I need to
> consider this a bit further though ;-)

I'd say that if you want to do this, do it. The way folks become
developers is they pick a favorite card or subsystem, and start playing
with it. :-)

Take care,

Bill