static void pxa910_squ_dma_irq(int dma_ch, void *dev_id) { struct snd_pcm_substream *substream = dev_id; struct pxa910_runtime_data *prtd = substream->runtime->private_data; if (SDISR(dma_ch) & 0x1) { snd_pcm_period_elapsed(substream); } else { printk(KERN_ERR "%s: SQU error on channel %d \n", prtd->params->name, dma_ch); } SDISR(dma_ch) = 0; }
static irqreturn_t squ_irq_handler(int irq, void *dev_id) { int i, dint; for (i = 0; i < num_squ_channels; i++) { dint = SDISR(i); if (dint) { struct squ_channel *channel = &squ_channels[i]; if (channel->name && channel->irq_handler) { channel->irq_handler(i, channel->data); SDISR(i)=0; } else { /* * IRQ for an unregistered SQU channel: * let's clear the interrupts and disable it. */ pr_debug("spurious IRQ for SQU channel %d\n", i); SDCR(i) = 0; } } } return IRQ_HANDLED; }