snd_printk("SB16 [0x%lx]: unable to set DMA & IRQ (PnP device?)\n", chip->port); snd_printk("SB16 [0x%lx]: wanted: irqreg=0x%x, dmareg=0x%x, mpureg = 0x%x\n", chip->port, realirq, realdma, realmpureg); snd_printk("SB16 [0x%lx]:    got: irqreg=0x%x, dmareg=0x%x, mpureg = 0x%x\n", chip->port, irqreg, dmareg, mpureg); 
snd_printk(KERN_ERR "SB16 [0x%lx]: unable to set DMA & IRQ (PnP device?)\n", chip->port); snd_printk(KERN_ERR "SB16 [0x%lx]: wanted: irqreg=0x%x, dmareg=0x%x, mpureg = 0x%x\n", chip->port, realirq, realdma, realmpureg); snd_printk(KERN_ERR "SB16 [0x%lx]:    got: irqreg=0x%x, dmareg=0x%x, mpureg = 0x%x\n", chip->port, irqreg, dmareg, mpureg); 
int snd_sb16dsp_configure(sb_t * chip){	unsigned long flags;	unsigned char irqreg = 0, dmareg = 0, mpureg;	unsigned char realirq, realdma, realmpureg;	/* note: mpu register should be present only on SB16 Vibra soundcards */	// printk("codec->irq=%i, codec->dma8=%i, codec->dma16=%i\n", chip->irq, chip->dma8, chip->dma16);	spin_lock_irqsave(&chip->mixer_lock, flags);	mpureg = snd_sbmixer_read(chip, SB_DSP4_MPUSETUP) & ~0x06;	spin_unlock_irqrestore(&chip->mixer_lock, flags);	switch (chip->irq) {	case 2:	case 9:		irqreg |= SB_IRQSETUP_IRQ9;		break;	case 5:		irqreg |= SB_IRQSETUP_IRQ5;		break;	case 7:		irqreg |= SB_IRQSETUP_IRQ7;		break;	case 10:		irqreg |= SB_IRQSETUP_IRQ10;		break;	default:		return -EINVAL;	}	if (chip->dma8 >= 0) {		switch (chip->dma8) {		case 0:			dmareg |= SB_DMASETUP_DMA0;			break;		case 1:			dmareg |= SB_DMASETUP_DMA1;			break;		case 3:			dmareg |= SB_DMASETUP_DMA3;			break;		default:			return -EINVAL;		}	}	if (chip->dma16 >= 0 && chip->dma16 != chip->dma8) {		switch (chip->dma16) {		case 5:			dmareg |= SB_DMASETUP_DMA5;			break;		case 6:			dmareg |= SB_DMASETUP_DMA6;			break;		case 7:			dmareg |= SB_DMASETUP_DMA7;			break;		default:			return -EINVAL;		}	}	switch (chip->mpu_port) {	case 0x300:		mpureg |= 0x04;		break;	case 0x330:		mpureg |= 0x00;		break;	default:		mpureg |= 0x02;	/* disable MPU */	}	spin_lock_irqsave(&chip->mixer_lock, flags);	snd_sbmixer_write(chip, SB_DSP4_IRQSETUP, irqreg);	realirq = snd_sbmixer_read(chip, SB_DSP4_IRQSETUP);	snd_sbmixer_write(chip, SB_DSP4_DMASETUP, dmareg);	realdma = snd_sbmixer_read(chip, SB_DSP4_DMASETUP);	snd_sbmixer_write(chip, SB_DSP4_MPUSETUP, mpureg);	realmpureg = snd_sbmixer_read(chip, SB_DSP4_MPUSETUP);	spin_unlock_irqrestore(&chip->mixer_lock, flags);	if ((~realirq) & irqreg || (~realdma) & dmareg) {		snd_printk("SB16 [0x%lx]: unable to set DMA & IRQ (PnP device?)\n", chip->port);		snd_printk("SB16 [0x%lx]: wanted: irqreg=0x%x, dmareg=0x%x, mpureg = 0x%x\n", chip->port, realirq, realdma, realmpureg);		snd_printk("SB16 [0x%lx]:    got: irqreg=0x%x, dmareg=0x%x, mpureg = 0x%x\n", chip->port, irqreg, dmareg, mpureg);		return -ENODEV;	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/99b359ba10a582148c6725f428a33ba5356dd993/sb16_main.c/clean/sound/isa/sb/sb16_main.c