Subject: audio driver changes
To: None <tech-kern@NetBSD.ORG>
From: Mike Long <mike.long@analog.com>
List: tech-kern
Date: 07/15/1996 19:50:32
I have updated the audio driver (/sys/dev/audio.c) so that it can now
attach more than one device. In order to do this, I had to make two
changes to the hardware interface (/sys/dev/audio_if.h). They are:
1) The hardware open function in struct audio_hw_if changes from
int (*open)__P((dev_t, int));
to
int (*open)__P((void *, dev_t, int));
The additional pointer is the hardware handle which was passed to
audio_hardware_attach() during autoconfig. This change eliminates some
bogus hardware open functions (e.g. sbopen(), wssopen()) that try
to compare /dev/audio's minor number to their own unit number.
2) The audio_hardware_detach() function changes from
extern int audio_hardware_detach __P((struct audio_hw_if *));
to
extern int audio_hardware_detach __P((void *));
The argument must be the same as the hardware handle originally passed
to audio_hardware_attach() as its second argument. This change is
needed so that audio_hardware_detach() can distinguish between
multiple instances of identical hardware, e.g. sb0 and sb1.
My questions are:
1) Does anyone have any problem with these changes?
2) Should I send-pr my changes now, or wait until after 1.2 is
released?
3) Should I update non-isa audio drivers, or should I leave that to
those who can actually test the changes?
4) Is anyone in particular actively maintaining the GUS driver? I
noticed a few...problems...with it while I was updating the
others. Ditto for the PSS driver, but I'm probably stuck with that
one. :-) SB and WSS both work.
I await your comments.
--
Mike Long <mike.long@analog.com> <URL:http://www.shore.net/~mikel>
VLSI Design Engineer finger mikel@shore.net for PGP public key
Analog Devices, CPD Division CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA (eq (opinion 'ADI) (opinion 'mike)) -> nil