Commit 89173bd4 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] emu10k1x - Minor clean up

Modules: EMU10K1/EMU10K2 driver

Minor clean up of the emu10k1x interrupt handler code.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent b9b4bdd9
...@@ -795,9 +795,11 @@ static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id, ...@@ -795,9 +795,11 @@ static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id,
status = inl(chip->port + IPR); status = inl(chip->port + IPR);
if(status) { if (! status)
return IRQ_NONE;
// capture interrupt // capture interrupt
if(status & (IPR_CAP_0_LOOP | IPR_CAP_0_HALF_LOOP)) { if (status & (IPR_CAP_0_LOOP | IPR_CAP_0_HALF_LOOP)) {
emu10k1x_voice_t *pvoice = &chip->capture_voice; emu10k1x_voice_t *pvoice = &chip->capture_voice;
if(pvoice->use) if(pvoice->use)
snd_emu10k1x_pcm_interrupt(chip, pvoice); snd_emu10k1x_pcm_interrupt(chip, pvoice);
...@@ -808,9 +810,9 @@ static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id, ...@@ -808,9 +810,9 @@ static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id,
} }
mask = IPR_CH_0_LOOP|IPR_CH_0_HALF_LOOP; mask = IPR_CH_0_LOOP|IPR_CH_0_HALF_LOOP;
for(i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
if(status & mask) { if (status & mask) {
if(pvoice->use) if (pvoice->use)
snd_emu10k1x_pcm_interrupt(chip, pvoice); snd_emu10k1x_pcm_interrupt(chip, pvoice);
else else
snd_emu10k1x_intr_disable(chip, mask); snd_emu10k1x_intr_disable(chip, mask);
...@@ -827,12 +829,9 @@ static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id, ...@@ -827,12 +829,9 @@ static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id,
} }
// acknowledge the interrupt if necessary // acknowledge the interrupt if necessary
if(status) outl(status, chip->port + IPR);
outl(status, chip->port+IPR);
// snd_printk(KERN_INFO "interrupt %08x\n", status);
}
// snd_printk(KERN_INFO "interrupt %08x\n", status);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment