snd_printk("Error! IRQ isn't defined.\n"); 
snd_printk(KERN_ERR "Error! IRQ isn't defined.\n"); 
static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches){	snd_card_t *card;	unsigned long flags;	int irq, dma1, dma2;	static unsigned char irqs[16] =		{0, 0, 1, 3, 0, 2, 0, 4, 0, 1, 0, 5, 6, 0, 0, 7};	static unsigned char dmas[8] =		{6, 1, 0, 2, 0, 3, 4, 5};	snd_assert(gus != NULL, return -EINVAL);	card = gus->card;	snd_assert(card != NULL, return -EINVAL);	gus->mix_cntrl_reg &= 0xf8;	gus->mix_cntrl_reg |= 0x01;	/* disable MIC, LINE IN, enable LINE OUT */	if (gus->codec_flag || gus->ess_flag) {		gus->mix_cntrl_reg &= ~1;	/* enable LINE IN */		gus->mix_cntrl_reg |= 4;	/* enable MIC */	}	dma1 = gus->gf1.dma1;	dma1 = dma1 < 0 ? -dma1 : dma1;	dma1 = dmas[dma1 & 7];	dma2 = gus->gf1.dma2;	dma2 = dma2 < 0 ? -dma2 : dma2;	dma2 = dmas[dma2 & 7];#if 0	printk("dma1 = %i, dma2 = %i\n", gus->gf1.dma1, gus->gf1.dma2);#endif	dma1 |= gus->equal_dma ? 0x40 : (dma2 << 3);	if ((dma1 & 7) == 0 || (dma2 & 7) == 0) {		snd_printk("Error! DMA isn't defined.\n");		return -EINVAL;	}	irq = gus->gf1.irq;	irq = irq < 0 ? -irq : irq;	irq = irqs[irq & 0x0f];	if (irq == 0) {		snd_printk("Error! IRQ isn't defined.\n");		return -EINVAL;	}	irq |= 0x40;#if 0	card->mixer.mix_ctrl_reg |= 0x10;#endif	spin_lock_irqsave(&gus->reg_lock, flags);	outb(5, GUSP(gus, REGCNTRLS));	outb(gus->mix_cntrl_reg, GUSP(gus, MIXCNTRLREG));	outb(0x00, GUSP(gus, IRQDMACNTRLREG));	outb(0, GUSP(gus, REGCNTRLS));	spin_unlock_irqrestore(&gus->reg_lock, flags);	udelay(100);	spin_lock_irqsave(&gus->reg_lock, flags);	outb(0x00 | gus->mix_cntrl_reg, GUSP(gus, MIXCNTRLREG));	outb(dma1, GUSP(gus, IRQDMACNTRLREG));	if (latches) {		outb(0x40 | gus->mix_cntrl_reg, GUSP(gus, MIXCNTRLREG));		outb(irq, GUSP(gus, IRQDMACNTRLREG));	}	spin_unlock_irqrestore(&gus->reg_lock, flags);	udelay(100);	spin_lock_irqsave(&gus->reg_lock, flags);	outb(0x00 | gus->mix_cntrl_reg, GUSP(gus, MIXCNTRLREG));	outb(dma1, GUSP(gus, IRQDMACNTRLREG));	if (latches) {		outb(0x40 | gus->mix_cntrl_reg, GUSP(gus, MIXCNTRLREG));		outb(irq, GUSP(gus, IRQDMACNTRLREG));	}	spin_unlock_irqrestore(&gus->reg_lock, flags);	snd_gf1_delay(gus);	if (latches)		gus->mix_cntrl_reg |= 0x08;	/* enable latches */	else		gus->mix_cntrl_reg &= ~0x08;	/* disable latches */	spin_lock_irqsave(&gus->reg_lock, flags);	outb(gus->mix_cntrl_reg, GUSP(gus, MIXCNTRLREG));	outb(0, GUSP(gus, GF1PAGE));	spin_unlock_irqrestore(&gus->reg_lock, flags);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/99b359ba10a582148c6725f428a33ba5356dd993/gus_main.c/clean/sound/isa/gus/gus_main.c