static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */
-static int boot_devs;
-module_param_array(index, int, boot_devs, 0444);
+module_param_array(index, int, NULL, 0444);
MODULE_PARM_DESC(index, "Index value for Digigram " CARD_NAME " soundcard.");
-module_param_array(id, charp, boot_devs, 0444);
+module_param_array(id, charp, NULL, 0444);
MODULE_PARM_DESC(id, "ID string for Digigram " CARD_NAME " soundcard.");
-module_param_array(enable, bool, boot_devs, 0444);
+module_param_array(enable, bool, NULL, 0444);
MODULE_PARM_DESC(enable, "Enable Digigram " CARD_NAME " soundcard.");
/*
stream_param.sample_type = ST_INTEGER_24BE;
stream_param.sample_size = 24;
break;
- case SNDRV_PCM_FMTBIT_FLOAT_LE:
+ case SNDRV_PCM_FORMAT_FLOAT_LE:
stream_param.sample_type = ST_FLOATING_POINT_32LE;
stream_param.sample_size = 32;
break;
- case SNDRV_PCM_FMTBIT_FLOAT_BE:
+ case SNDRV_PCM_FORMAT_FLOAT_BE:
stream_param.sample_type = ST_FLOATING_POINT_32BE;
stream_param.sample_size = 32;
break;
return err;
}
- if (idx == 0) {
- /* create a DSP loader only on first cardX*/
- err = snd_mixart_hwdep_new(mgr);
- if (err < 0)
- return err;
- }
-
snd_card_set_dev(card, &mgr->pci->dev);
return 0;
/* release the i/o ports */
for (i = 0; i < 2; i++) {
if (mgr->mem[i].virt)
- iounmap((void *)mgr->mem[i].virt);
+ iounmap(mgr->mem[i].virt);
}
pci_release_regions(mgr->pci);
mgr->bufferinfo.area = NULL;
}
+ pci_disable_device(mgr->pci);
kfree(mgr);
return 0;
}
/* check if we can restrict PCI DMA transfers to 32 bits */
if (pci_set_dma_mask(pci, 0xffffffff) < 0) {
snd_printk(KERN_ERR "architecture does not support 32bit PCI busmaster DMA\n");
+ pci_disable_device(pci);
return -ENXIO;
}
/*
*/
mgr = kcalloc(1, sizeof(*mgr), GFP_KERNEL);
- if (! mgr)
+ if (! mgr) {
+ pci_disable_device(pci);
return -ENOMEM;
+ }
mgr->pci = pci;
mgr->irq = -1;
/* resource assignment */
if ((err = pci_request_regions(pci, CARD_NAME)) < 0) {
kfree(mgr);
+ pci_disable_device(pci);
return err;
}
for (i = 0; i < 2; i++) {
mgr->mem[i].phys = pci_resource_start(pci, i);
- mgr->mem[i].virt = (unsigned long)ioremap_nocache(mgr->mem[i].phys,
- pci_resource_len(pci, i));
+ mgr->mem[i].virt = ioremap_nocache(mgr->mem[i].phys,
+ pci_resource_len(pci, i));
}
if (request_irq(pci->irq, snd_mixart_interrupt, SA_INTERRUPT|SA_SHIRQ, CARD_NAME, (void *)mgr)) {
idx = index[dev];
else
idx = index[dev] + i;
- snprintf(tmpid, sizeof(tmpid), "%s-%d", id[dev], i);
+ snprintf(tmpid, sizeof(tmpid), "%s-%d", id[dev] ? id[dev] : "MIXART", i);
card = snd_card_new(idx, tmpid, THIS_MODULE, 0);
if (! card) {
/* init bufferinfo_array */
memset(mgr->bufferinfo.area, 0, size);
+ /* set up firmware */
+ err = snd_mixart_setup_firmware(mgr);
+ if (err < 0) {
+ snd_mixart_free(mgr);
+ return err;
+ }
+
pci_set_drvdata(pci, mgr);
dev++;
return 0;