if ((pci->device == PCI_DEVICE_ID_DIGI32) || (pci->device == PCI_DEVICE_ID_DIGI32_PRO)) { 
if ((pci->device == PCI_DEVICE_ID_RME_DIGI32) || (pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO)) { 
static int __devinit snd_rme32_create(rme32_t * rme32){	struct pci_dev *pci = rme32->pci;	int err;	rme32->irq = -1;	spin_lock_init(&rme32->lock);	if ((err = pci_enable_device(pci)) < 0)		return err;	if ((err = pci_request_regions(pci, "RME32")) < 0)		return err;	rme32->port = pci_resource_start(rme32->pci, 0);	if (request_irq(pci->irq, snd_rme32_interrupt, SA_INTERRUPT | SA_SHIRQ, "RME32", (void *) rme32)) {		snd_printk("unable to grab IRQ %d\n", pci->irq);		return -EBUSY;	}	rme32->irq = pci->irq;	if ((rme32->iobase = ioremap_nocache(rme32->port, RME32_IO_SIZE)) == 0) {		snd_printk("unable to remap memory region 0x%lx-0x%lx\n",			   rme32->port, rme32->port + RME32_IO_SIZE - 1);		return -ENOMEM;	}	/* read the card's revision number */	pci_read_config_byte(pci, 8, &rme32->rev);	/* set up ALSA pcm device for S/PDIF */	if ((err = snd_pcm_new(rme32->card, "Digi32 IEC958", 0, 1, 1, &rme32->spdif_pcm)) < 0) {		return err;	}	rme32->spdif_pcm->private_data = rme32;	rme32->spdif_pcm->private_free = snd_rme32_free_spdif_pcm;	strcpy(rme32->spdif_pcm->name, "Digi32 IEC958");	if (rme32->fullduplex_mode) {		snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_PLAYBACK,				&snd_rme32_playback_spdif_fd_ops);		snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_CAPTURE,				&snd_rme32_capture_spdif_fd_ops);		snd_pcm_lib_preallocate_pages_for_all(rme32->spdif_pcm, SNDRV_DMA_TYPE_CONTINUOUS,						      snd_dma_continuous_data(GFP_KERNEL),						      0, RME32_MID_BUFFER_SIZE);		rme32->spdif_pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX;	} else {		snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_PLAYBACK,				&snd_rme32_playback_spdif_ops);		snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_CAPTURE,				&snd_rme32_capture_spdif_ops);		rme32->spdif_pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX;	}	/* set up ALSA pcm device for ADAT */	if ((pci->device == PCI_DEVICE_ID_DIGI32) ||	    (pci->device == PCI_DEVICE_ID_DIGI32_PRO)) {		/* ADAT is not available on DIGI32 and DIGI32 Pro */		rme32->adat_pcm = NULL;	}	else {		if ((err = snd_pcm_new(rme32->card, "Digi32 ADAT", 1,				       1, 1, &rme32->adat_pcm)) < 0)		{			return err;		}				rme32->adat_pcm->private_data = rme32;		rme32->adat_pcm->private_free = snd_rme32_free_adat_pcm;		strcpy(rme32->adat_pcm->name, "Digi32 ADAT");		if (rme32->fullduplex_mode) {			snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_PLAYBACK, 					&snd_rme32_playback_adat_fd_ops);			snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_CAPTURE, 					&snd_rme32_capture_adat_fd_ops);			snd_pcm_lib_preallocate_pages_for_all(rme32->adat_pcm, SNDRV_DMA_TYPE_CONTINUOUS,							      snd_dma_continuous_data(GFP_KERNEL),							      0, RME32_MID_BUFFER_SIZE);			rme32->adat_pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX;		} else {			snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_PLAYBACK, 					&snd_rme32_playback_adat_ops);			snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_CAPTURE, 					&snd_rme32_capture_adat_ops);			rme32->adat_pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX;		}	}	rme32->playback_periodsize = 0;	rme32->capture_periodsize = 0;	/* make sure playback/capture is stopped, if by some reason active */	snd_rme32_pcm_stop(rme32, 0);        /* reset DAC */        snd_rme32_reset_dac(rme32);	/* reset buffer pointer */	writel(0, rme32->iobase + RME32_IO_RESET_POS);	/* set default values in registers */	rme32->wcreg = RME32_WCR_SEL |	 /* normal playback */		RME32_WCR_INP_0 | /* input select */		RME32_WCR_MUTE;	 /* muting on */	writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER);	/* init switch interface */	if ((err = snd_rme32_create_switches(rme32->card, rme32)) < 0) {		return err;	}	/* init proc interface */	snd_rme32_proc_init(rme32);	rme32->capture_substream = NULL;	rme32->playback_substream = NULL;	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/8b7fc4214b550fafe595330e28d7c2c72b8b62f6/rme32.c/buggy/sound/pci/rme32.c