Subject: Use of firmload(9) with audio(9): advice sought
To: None <tech-kern@netbsd.org>
From: Ignatios Souvatzis <is@netbsd.org>
List: tech-kern
Date: 01/18/2007 09:19:54
On Wed, Jan 17, 2007 at 07:40:45PM -0500, Arnaud LACOMBE wrote:
> On Wed, Jan 17, 2007 at 08:40:29PM +0100, Ignatios Souvatzis wrote:
> > firmload(9) does not work before the file-system the firmware is on is
> > mounted. It even used to crash the kernel if used before root was mounted,
> > but I discovered and fixed that last weekend.
> > 
> > Using it for audio is no problem - I intend to move an Amiga audio
> > device to using firmload(9) soon.
> > 
> ok, in such case, when should the firmware be uploaded to the device ?
> the first time we open /dev/audio ?

For firmload(9) to work, this would be a convenient place. However, I'm
not sure this fits with the audio(9) model... or at least with all hardware.

The audio(9) interface has a method pointer called "open", that probably
can be used to demand-load firmware. However, at this point, the function
audio_ifattach has been called, and maybe accessed functions to find out
about capabilities - if they access the hardware, the firmware might be
needed. OTOH, open wouldn't work without the audio_ifattach... so this
needs more thought, or input from the designers of our fine audio 
framework. (Well, or some experimenting.)

Regards,
	-is
-- 
seal your e-mail: http://www.gnupg.org/