[alsa-devel] Where are dma interrupts handled in ASoC code?
Where are dma overflow interrupts handled? For example I don't see this in sound/soc/s3c24xx-i2s.c
Thanks
On Fri, Nov 21, 2008 at 10:45:46AM +0100, John Kacur wrote:
Where are dma overflow interrupts handled? For example I don't see this in sound/soc/s3c24xx-i2s.c
The s3c24xx ASoC code doesn't interact with the DMA controller directly, it uses the DMA API exported by the arch/arm code to do that.
On Fri, Nov 21, 2008 at 12:01 PM, Mark Brown broonie@sirena.org.uk wrote:
On Fri, Nov 21, 2008 at 10:45:46AM +0100, John Kacur wrote:
Where are dma overflow interrupts handled? For example I don't see this in sound/soc/s3c24xx-i2s.c
The s3c24xx ASoC code doesn't interact with the DMA controller directly, it uses the DMA API exported by the arch/arm code to do that.
Ok, thanks, I found that s3c2410_dma_request registers 3c2410_dma_irq. (in arch/arm/plat-s3c24xx/dma.c) I see other platforms like omap register an interrupt handler in the pcm code when they do a dma request.
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 http://www.kernel.org/pub/linux/kernel/people/tiwai/docs/writing-an-alsa-dri... but it doesn't quite seem to match my scenario.
Thanks
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 http://www.kernel.org/pub/linux/kernel/people/tiwai/docs/writing-an-alsa-dri... 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.
participants (2)
-
John Kacur
-
Mark Brown