]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 4138/1: AACI: multiple channel support for IRQ handling
authorKevin Hilman <khilman@mvista.com>
Wed, 7 Feb 2007 04:41:37 +0000 (05:41 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 18 Feb 2007 10:59:48 +0000 (10:59 +0000)
Add AACI channel support to interrupt handler.
Also, clear underrun interrupt for correct channel.

Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
sound/arm/aaci.c

index 53675cf4de44c1bc4968c3227f45ab46fb573921..b85df793cdceb41f421a8d9597b4d339e2584ac0 100644 (file)
@@ -164,10 +164,11 @@ static inline void aaci_chan_wait_ready(struct aaci_runtime *aacirun)
 /*
  * Interrupt support.
  */
-static void aaci_fifo_irq(struct aaci *aaci, u32 mask)
+static void aaci_fifo_irq(struct aaci *aaci, int channel, u32 mask)
 {
        if (mask & ISR_URINTR) {
-               writel(ICLR_TXUEC1, aaci->base + AACI_INTCLR);
+               dev_dbg(&aaci->dev->dev, "TX underrun on chan %d\n", channel);
+               writel(ICLR_TXUEC1 << channel, aaci->base + AACI_INTCLR);
        }
 
        if (mask & ISR_TXINTR) {
@@ -233,7 +234,7 @@ static irqreturn_t aaci_irq(int irq, void *devid)
                u32 m = mask;
                for (i = 0; i < 4; i++, m >>= 7) {
                        if (m & 0x7f) {
-                               aaci_fifo_irq(aaci, m);
+                               aaci_fifo_irq(aaci, i, m);
                        }
                }
        }