Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15943
b: refs/heads/master
c: 89173bd
h: refs/heads/master
i:
  15941: a7e9b4d
  15939: 86f83a8
  15935: fadc8cf
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jan 3, 2006
1 parent e30d2d7 commit 83b43d6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b9b4bdd9f1c98388f13591608d574650a9873717
refs/heads/master: 89173bd41439bc6304e3e20f742e52266208ccad
65 changes: 32 additions & 33 deletions trunk/sound/pci/emu10k1/emu10k1x.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,44 +795,43 @@ static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id,

status = inl(chip->port + IPR);

if(status) {
// capture interrupt
if(status & (IPR_CAP_0_LOOP | IPR_CAP_0_HALF_LOOP)) {
emu10k1x_voice_t *pvoice = &chip->capture_voice;
if(pvoice->use)
snd_emu10k1x_pcm_interrupt(chip, pvoice);
else
snd_emu10k1x_intr_disable(chip,
INTE_CAP_0_LOOP |
INTE_CAP_0_HALF_LOOP);
}

mask = IPR_CH_0_LOOP|IPR_CH_0_HALF_LOOP;
for(i = 0; i < 3; i++) {
if(status & mask) {
if(pvoice->use)
snd_emu10k1x_pcm_interrupt(chip, pvoice);
else
snd_emu10k1x_intr_disable(chip, mask);
}
pvoice++;
mask <<= 1;
}
if (! status)
return IRQ_NONE;

// capture interrupt
if (status & (IPR_CAP_0_LOOP | IPR_CAP_0_HALF_LOOP)) {
emu10k1x_voice_t *pvoice = &chip->capture_voice;
if(pvoice->use)
snd_emu10k1x_pcm_interrupt(chip, pvoice);
else
snd_emu10k1x_intr_disable(chip,
INTE_CAP_0_LOOP |
INTE_CAP_0_HALF_LOOP);
}

if (status & (IPR_MIDITRANSBUFEMPTY|IPR_MIDIRECVBUFEMPTY)) {
if (chip->midi.interrupt)
chip->midi.interrupt(chip, status);
else
snd_emu10k1x_intr_disable(chip, INTE_MIDITXENABLE|INTE_MIDIRXENABLE);
mask = IPR_CH_0_LOOP|IPR_CH_0_HALF_LOOP;
for (i = 0; i < 3; i++) {
if (status & mask) {
if (pvoice->use)
snd_emu10k1x_pcm_interrupt(chip, pvoice);
else
snd_emu10k1x_intr_disable(chip, mask);
}
pvoice++;
mask <<= 1;
}

// acknowledge the interrupt if necessary
if(status)
outl(status, chip->port+IPR);

// snd_printk(KERN_INFO "interrupt %08x\n", status);
if (status & (IPR_MIDITRANSBUFEMPTY|IPR_MIDIRECVBUFEMPTY)) {
if (chip->midi.interrupt)
chip->midi.interrupt(chip, status);
else
snd_emu10k1x_intr_disable(chip, INTE_MIDITXENABLE|INTE_MIDIRXENABLE);
}

// acknowledge the interrupt if necessary
outl(status, chip->port + IPR);

// snd_printk(KERN_INFO "interrupt %08x\n", status);
return IRQ_HANDLED;
}

Expand Down

0 comments on commit 83b43d6

Please sign in to comment.