|
@@ -33,6 +33,7 @@
|
|
#include <linux/init.h>
|
|
#include <linux/init.h>
|
|
#include <linux/interrupt.h>
|
|
#include <linux/interrupt.h>
|
|
#include <linux/pci.h>
|
|
#include <linux/pci.h>
|
|
|
|
+#include <linux/dma-mapping.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/moduleparam.h>
|
|
#include <linux/moduleparam.h>
|
|
#include <sound/core.h>
|
|
#include <sound/core.h>
|
|
@@ -893,24 +894,24 @@ static int __devinit snd_emu10k1x_create(struct snd_card *card,
|
|
static struct snd_device_ops ops = {
|
|
static struct snd_device_ops ops = {
|
|
.dev_free = snd_emu10k1x_dev_free,
|
|
.dev_free = snd_emu10k1x_dev_free,
|
|
};
|
|
};
|
|
-
|
|
|
|
|
|
+
|
|
*rchip = NULL;
|
|
*rchip = NULL;
|
|
-
|
|
|
|
|
|
+
|
|
if ((err = pci_enable_device(pci)) < 0)
|
|
if ((err = pci_enable_device(pci)) < 0)
|
|
return err;
|
|
return err;
|
|
- if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
|
|
|
|
- pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
|
|
|
|
|
|
+ if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
|
|
|
|
+ pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
|
|
snd_printk(KERN_ERR "error to set 28bit mask DMA\n");
|
|
snd_printk(KERN_ERR "error to set 28bit mask DMA\n");
|
|
pci_disable_device(pci);
|
|
pci_disable_device(pci);
|
|
return -ENXIO;
|
|
return -ENXIO;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
|
|
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
|
|
if (chip == NULL) {
|
|
if (chip == NULL) {
|
|
pci_disable_device(pci);
|
|
pci_disable_device(pci);
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
chip->card = card;
|
|
chip->card = card;
|
|
chip->pci = pci;
|
|
chip->pci = pci;
|
|
chip->irq = -1;
|
|
chip->irq = -1;
|