I've done audio on a handful of operating systems
and all I ever want to do with the card is set it up
to play X kHz 16-bit little-endian PCM stereo and
then control the volume. The rest can be done from
user space. This is exactly what Plan 9's audio
driver already does, and I wish the others were so
simple.
The original post commented that only supporting
PCM was too simplistic, but I argue it's exactly right.
The simplicity is definitely attractive in its own right,
and I'll consider it. However, the devices do provide hardware
support for other formats which do require some work to convert.
mu-law and a-law come to mind.. the conversion isnt very
computationally expensive, but the hardware will do it free..
Yah, this format doesnt come up that often.. perhaps its not
worth the effort, but then again the ability to switch a device's
encoding isnt very much work either... About as hard as
changing the sampling rate or turning stereo on and off...
If you want a different device file into which you
can write mp3 and other sound file formats, great:
do it in user space, translating into the native hardware
format.
I agree wrt. "mp3". I'm considering the possibility of supporting
alaw, ulaw, pcm8, pcm16 in big/little and signed/unsigned formats,
and adpcm, using the hardware features...
Russ
Tim Newsham
http://www.thenewsh.com/~newsham/