snd_printk("unable to remap memory region 0x%lx-0x%lx\n", rme96->port, rme96->port + RME96_IO_SIZE - 1); 
snd_printk(KERN_ERR "unable to remap memory region 0x%lx-0x%lx\n", rme96->port, rme96->port + RME96_IO_SIZE - 1); 
snd_rme96_create(rme96_t *rme96){	struct pci_dev *pci = rme96->pci;	int err;	rme96->irq = -1;	spin_lock_init(&rme96->lock);	if ((err = pci_enable_device(pci)) < 0)		return err;	if ((err = pci_request_regions(pci, "RME96")) < 0)		return err;	rme96->port = pci_resource_start(rme96->pci, 0);	if (request_irq(pci->irq, snd_rme96_interrupt, SA_INTERRUPT|SA_SHIRQ, "RME96", (void *)rme96)) {		snd_printk("unable to grab IRQ %d\n", pci->irq);		return -EBUSY;	}	rme96->irq = pci->irq;	if ((rme96->iobase = ioremap_nocache(rme96->port, RME96_IO_SIZE)) == 0) {		snd_printk("unable to remap memory region 0x%lx-0x%lx\n", rme96->port, rme96->port + RME96_IO_SIZE - 1);		return -ENOMEM;	}	/* read the card's revision number */	pci_read_config_byte(pci, 8, &rme96->rev);			/* set up ALSA pcm device for S/PDIF */	if ((err = snd_pcm_new(rme96->card, "Digi96 IEC958", 0,			       1, 1, &rme96->spdif_pcm)) < 0)	{		return err;	}	rme96->spdif_pcm->private_data = rme96;	rme96->spdif_pcm->private_free = snd_rme96_free_spdif_pcm;	strcpy(rme96->spdif_pcm->name, "Digi96 IEC958");	snd_pcm_set_ops(rme96->spdif_pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_rme96_playback_spdif_ops);	snd_pcm_set_ops(rme96->spdif_pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_rme96_capture_spdif_ops);	rme96->spdif_pcm->info_flags = 0;	/* set up ALSA pcm device for ADAT */	if (pci->device == PCI_DEVICE_ID_RME_DIGI96) {		/* ADAT is not available on the base model */		rme96->adat_pcm = NULL;	} else {		if ((err = snd_pcm_new(rme96->card, "Digi96 ADAT", 1,				       1, 1, &rme96->adat_pcm)) < 0)		{			return err;		}				rme96->adat_pcm->private_data = rme96;		rme96->adat_pcm->private_free = snd_rme96_free_adat_pcm;		strcpy(rme96->adat_pcm->name, "Digi96 ADAT");		snd_pcm_set_ops(rme96->adat_pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_rme96_playback_adat_ops);		snd_pcm_set_ops(rme96->adat_pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_rme96_capture_adat_ops);				rme96->adat_pcm->info_flags = 0;	}	rme96->playback_periodsize = 0;	rme96->capture_periodsize = 0;		/* make sure playback/capture is stopped, if by some reason active */	snd_rme96_playback_stop(rme96);	snd_rme96_capture_stop(rme96);		/* set default values in registers */	rme96->wcreg =		RME96_WCR_FREQ_1 | /* set 44.1 kHz playback */		RME96_WCR_SEL |    /* normal playback */		RME96_WCR_MASTER | /* set to master clock mode */		RME96_WCR_INP_0;   /* set coaxial input */	rme96->areg = RME96_AR_FREQPAD_1; /* set 44.1 kHz analog capture */	writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER);	writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG);		/* reset the ADC */	writel(rme96->areg | RME96_AR_PD2,	       rme96->iobase + RME96_IO_ADDITIONAL_REG);	writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG);		/* reset and enable the DAC (order is important). */	snd_rme96_reset_dac(rme96);	rme96->areg |= RME96_AR_DAC_EN;	writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG);	/* reset playback and record buffer pointers */	writel(0, rme96->iobase + RME96_IO_RESET_PLAY_POS);	writel(0, rme96->iobase + RME96_IO_RESET_REC_POS);	/* reset volume */	rme96->vol[0] = rme96->vol[1] = 0;	if (RME96_HAS_ANALOG_OUT(rme96)) {		snd_rme96_apply_dac_volume(rme96);	}		/* init switch interface */	if ((err = snd_rme96_create_switches(rme96->card, rme96)) < 0) {		return err;	}        /* init proc interface */	snd_rme96_proc_init(rme96);		return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/99b359ba10a582148c6725f428a33ba5356dd993/rme96.c/clean/sound/pci/rme96.c