 if (chip->midi.dev_id && (status & (chip->midi.ipr_tx|chip->midi.ipr_rx))) { if (chip->midi.interrupt) chip->midi.interrupt(&chip->midi, status); else chip->midi.interrupt_disable(&chip->midi, chip->midi.tx_enable | chip->midi.rx_enable); }  
static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id,					  struct pt_regs *regs){	unsigned int status;	ca0106_t *chip = dev_id;	int i;	int mask;        unsigned int stat76;	ca0106_channel_t *pchannel;	spin_lock(&chip->emu_lock);	status = inl(chip->port + IPR);	// call updater, unlock before it	spin_unlock(&chip->emu_lock);  	if (! status)		return IRQ_NONE;        stat76 = snd_ca0106_ptr_read(chip, EXTENDED_INT, 0);	//snd_printk("interrupt status = 0x%08x, stat76=0x%08x\n", status, stat76);	//snd_printk("ptr=0x%08x\n",snd_ca0106_ptr_read(chip, PLAYBACK_POINTER, 0));        mask = 0x11; /* 0x1 for one half, 0x10 for the other half period. */	for(i = 0; i < 4; i++) {		pchannel = &(chip->playback_channels[i]);		if(stat76 & mask) {/* FIXME: Select the correct substream for period elapsed */			if(pchannel->use) {                          snd_pcm_period_elapsed(pchannel->epcm->substream);	                //printk(KERN_INFO "interrupt [%d] used\n", i);                        }		}	        //printk(KERN_INFO "channel=%p\n",pchannel);	        //printk(KERN_INFO "interrupt stat76[%d] = %08x, use=%d, channel=%d\n", i, stat76, pchannel->use, pchannel->number);		mask <<= 1;	}        mask = 0x110000; /* 0x1 for one half, 0x10 for the other half period. */	for(i = 0; i < 4; i++) {		pchannel = &(chip->capture_channels[i]);		if(stat76 & mask) {/* FIXME: Select the correct substream for period elapsed */			if(pchannel->use) {                          snd_pcm_period_elapsed(pchannel->epcm->substream);	                //printk(KERN_INFO "interrupt [%d] used\n", i);                        }		}	        //printk(KERN_INFO "channel=%p\n",pchannel);	        //printk(KERN_INFO "interrupt stat76[%d] = %08x, use=%d, channel=%d\n", i, stat76, pchannel->use, pchannel->number);		mask <<= 1;	}        snd_ca0106_ptr_write(chip, EXTENDED_INT, 0, stat76);	spin_lock(&chip->emu_lock);	// acknowledge the interrupt if necessary	outl(status, chip->port+IPR);	spin_unlock(&chip->emu_lock);	return IRQ_HANDLED;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/8a5afd29dc16a9e687f63195cb635ecd611482d0/ca0106_main.c/clean/sound/pci/ca0106/ca0106_main.c