Re: [linux-audio-dev] Realtime

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Realtime
From: David Olofson (david_AT_gardena.net)
Date: Sat Jul 08 2000 - 08:47:44 EEST


On Wed, 28 Jun 2000, rob wrote:
[...]
> it seems like most of the things one would like to be real time
> are the hardware devices. i believe this would require them to
> be written specifically to be useful in the rt modules. is there any way
> around this?

Yes. If you can have the standard driver set the DMA up and start the
card, all you need is hooking you code to the soundcard's IRQ, so
that you can do your stuff in sync with the hardware. The IRQ in
itself is all communication with the hardware you need when you're up
running.

mmap() from user space can take care of the first part; it's -
already supported by most drivers. I think it would be possible to
just attach the RTL ISR in parallel with the already installed sound
driver ISR. You may have to allow the driver's ISR to run before you
start eating CPU time with your RTL ISR or thread, as some hardware
might be confused if the IRQ response is too slow. (Some cards may
not require that the ISR does anything at all when running the DMA in
loop mode, but don't rely on that!)

If the IRQ rate is too low for the required latency, you can set up a
PLL style arrangement with an ISR and a periodic RTL thread runing at
some sufficient period, phase locked to the IRQs.

The only practical limitation occurs with cards that use PCI
busmaster DMA, and that's a hardware restriction; PCI cards usually
burst some 32-128 bytes at a time, and there's no way you can get
around that, unless the card allows running with the DMA disabled and
feeding data directly from the CPU. (Hmmm... Like you could do with
virtually all chips on the Commodore Amiga. Horizontal reuse of
hardware sprite channels and that kind of stuff. Good old days. :-)

//David

.- M u C o S --------------------------------. .- David Olofson ------.
| A Free/Open Multimedia | | Audio Hacker |
| Plugin and Integration Standard | | Linux Advocate |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
.- A u d i a l i t y ------------------------. | Singer |
| Rock Solid Low Latency Signal Processing | | Songwriter |
`---> http://www.angelfire.com/or/audiality -' `-> david_AT_linuxdj.com -'


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sat Jul 08 2000 - 12:06:32 EEST