projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-mmc
[powerpc.git]
/
sound
/
pci
/
au88x0
/
au88x0.c
diff --git
a/sound/pci/au88x0/au88x0.c
b/sound/pci/au88x0/au88x0.c
index
d965609
..
8a3b118
100644
(file)
--- a/
sound/pci/au88x0/au88x0.c
+++ b/
sound/pci/au88x0/au88x0.c
@@
-20,6
+20,7
@@
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/moduleparam.h>
+#include <linux/dma-mapping.h>
#include <sound/initval.h>
// module parameters (see "Module Parameters")
#include <sound/initval.h>
// module parameters (see "Module Parameters")
@@
-118,7
+119,7
@@
static void __devinit snd_vortex_workaround(struct pci_dev *vortex, int fix)
// component-destructor
// (see "Management of Cards and Components")
// component-destructor
// (see "Management of Cards and Components")
-static int snd_vortex_dev_free(s
nd_device_t *
device)
+static int snd_vortex_dev_free(s
truct snd_device *
device)
{
vortex_t *vortex = device->device_data;
{
vortex_t *vortex = device->device_data;
@@
-137,11
+138,11
@@
static int snd_vortex_dev_free(snd_device_t * device)
// chip-specific constructor
// (see "Management of Cards and Components")
static int __devinit
// chip-specific constructor
// (see "Management of Cards and Components")
static int __devinit
-snd_vortex_create(s
nd_card_t *
card, struct pci_dev *pci, vortex_t ** rchip)
+snd_vortex_create(s
truct snd_card *
card, struct pci_dev *pci, vortex_t ** rchip)
{
vortex_t *chip;
int err;
{
vortex_t *chip;
int err;
- static s
nd_device_ops_t
ops = {
+ static s
truct snd_device_ops
ops = {
.dev_free = snd_vortex_dev_free,
};
.dev_free = snd_vortex_dev_free,
};
@@
-150,15
+151,18
@@
snd_vortex_create(snd_card_t * card, struct pci_dev *pci, vortex_t ** rchip)
// check PCI availability (DMA).
if ((err = pci_enable_device(pci)) < 0)
return err;
// check PCI availability (DMA).
if ((err = pci_enable_device(pci)) < 0)
return err;
- if (!pci_dma_supported(pci, VORTEX_DMA_MASK)) {
+ if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 ||
+ pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) {
printk(KERN_ERR "error to set DMA mask\n");
printk(KERN_ERR "error to set DMA mask\n");
+ pci_disable_device(pci);
return -ENXIO;
}
return -ENXIO;
}
- pci_set_dma_mask(pci, VORTEX_DMA_MASK);
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
- if (chip == NULL)
+ if (chip == NULL) {
+ pci_disable_device(pci);
return -ENOMEM;
return -ENOMEM;
+ }
chip->card = card;
chip->card = card;
@@
-208,6
+212,8
@@
snd_vortex_create(snd_card_t * card, struct pci_dev *pci, vortex_t ** rchip)
goto alloc_out;
}
goto alloc_out;
}
+ snd_card_set_dev(card, &pci->dev);
+
*rchip = chip;
return 0;
*rchip = chip;
return 0;
@@
-233,7
+239,7
@@
static int __devinit
snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
{
static int dev;
snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
{
static int dev;
- s
nd_card_t
*card;
+ s
truct snd_card
*card;
vortex_t *chip;
int err;
vortex_t *chip;
int err;
@@
-255,6
+261,13
@@
snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
return err;
}
snd_vortex_workaround(pci, pcifix[dev]);
return err;
}
snd_vortex_workaround(pci, pcifix[dev]);
+
+ // Card details needed in snd_vortex_midi
+ strcpy(card->driver, CARD_NAME_SHORT);
+ sprintf(card->shortname, "Aureal Vortex %s", CARD_NAME_SHORT);
+ sprintf(card->longname, "%s at 0x%lx irq %i",
+ card->shortname, chip->io, chip->irq);
+
// (4) Alloc components.
// ADB pcm.
if ((err = snd_vortex_new_pcm(chip, VORTEX_PCM_ADB, NR_ADB)) < 0) {
// (4) Alloc components.
// ADB pcm.
if ((err = snd_vortex_new_pcm(chip, VORTEX_PCM_ADB, NR_ADB)) < 0) {
@@
-317,11
+330,6
@@
snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
#endif
// (5)
#endif
// (5)
- strcpy(card->driver, CARD_NAME_SHORT);
- strcpy(card->shortname, CARD_NAME_SHORT);
- sprintf(card->longname, "%s at 0x%lx irq %i",
- card->shortname, chip->io, chip->irq);
-
if ((err = pci_read_config_word(pci, PCI_DEVICE_ID,
&(chip->device))) < 0) {
snd_card_free(card);
if ((err = pci_read_config_word(pci, PCI_DEVICE_ID,
&(chip->device))) < 0) {
snd_card_free(card);