[alsa-devel] Where are dma interrupts handled in ASoC code?
broonie at sirena.org.uk
Fri Nov 21 16:55:43 CET 2008
On Fri, Nov 21, 2008 at 12:24:34PM +0100, John Kacur wrote:
> My scenario is this, the dma controller will be writing to the i2s
> transmission fifo register (called I2SxTXFDAT on my platform - Jade).
> If an overflow occurs an interrupt is generated. Among other tasks my
> interrupt handler will have to clear a status bit in an i2s register.
> I was thinking I need to somehow have my interrupt handler in my pcm
> code, although conceptually it seems like an i2s thing.
> If you have any hints for how I should design / implement this it
> would be appreciated. I read the documentation on-line
> but it doesn't quite seem to match my scenario.
It's really up to you - if it's I2S-specific I'd put it in the I2S
driver but it's better to do something that makes sense for the
hardware. The DMA/I2S split in the driver is there since most platforms
share the DMA controller between multiple front ends so it's helpful for
them to be able to share the code to drive the DMA controller. If
that's not something that happens on your platform it may be sensible to
just use a dummy platform driver and have all the actual code in the I2S
driver, at least for the time being.
More information about the Alsa-devel