Subject: Re: Advice to people writing audio drivers
To: Charles M. Hannum <email@example.com>
From: Ignatios Souvatzis <firstname.lastname@example.org>
Date: 01/25/1999 21:43:43
On Mon, Aug 10, 1998 at 12:33:22PM -0400, Charles M. Hannum wrote:
> 1) Use the new `trigger' interface, rather than the old init/start
> interface. This is important because I have some future plans for
> cleaning up the audio layer which depend on it. (I've already
> converted the eap, ess, and sbdsp code, and will probably do ad1848
> and am7930 as well. Other people should deal with the other 7
> audio drivers in our tree.)
Will using trigger become mandatory?
I'm hacking at a driver for a board, that contains an AD1848 chip and a
custom 512-byte-+-X deep FIFO, which pretends to the AD1848 being a DMA
chip. (I just set it up for input or output, fill it with a bit over 512 bytes
of silence for the start, 512 bytes triggers the low water mark interupt)
and set the interupt enable bit. The interupt routine writes 512 bytes of
data to the pipe (or disables that interupt bit if no more data available).
So, having separate init_ and start_ routines would be useful.
> 2) I noticed that some drivers (e.g. lmc) only support one output
> mode. It's moderately important that all drivers support 8KHz
> u-law output. There is code to handle emulating this, and many of
> the drivers (e.g. eap, ess, sbdsp) use it -- as well as emulating
> many other modes.
What should 44100-only hardware do?
> 5) Support mmap(2) if possible. (This requires *very* little code in
> the driver. Mainly you just have to write the mmap entry point and
> set AUDIO_PROP_MMAP.)
> I'd actually like to get rid of AUDIO_PROP_MMAP and
> AUDIO_PROP_INDEPENDENT at some point, and simply make these required.
MMAP even for non-DMA drivers?