Commit 7ee5c239 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

D:2003/08/14 12:05:38
A:Takashi Iwai <tiwai@suse.de>
F:drivers/opl3/opl3_lib.c:1.17->1.18 
F:isa/gus/gusclassic.c:1.10->1.11 
F:isa/gus/gusextreme.c:1.10->1.11 
F:isa/gus/gusmax.c:1.11->1.12 
F:pci/azt3328.c:1.2->1.3 
F:pci/cs4281.c:1.43->1.44 
F:pci/ens1370.c:1.47->1.48 
F:pci/es1938.c:1.26->1.27 
F:pci/es1968.c:1.51->1.52 
F:pci/sonicvibes.c:1.25->1.26 
F:pci/via82xx.c:1.45->1.46 
F:pci/cs46xx/cs46xx_lib.c:1.62->1.63 
F:pci/ice1712/ice1712.c:1.32->1.33 
F:pci/ice1712/ice1724.c:1.14->1.15 
F:pci/trident/trident_main.c:1.45->1.46 
F:pci/ymfpci/ymfpci_main.c:1.40->1.41 
F:sparc/amd7930.c:1.6->1.7 
F:sparc/cs4231.c:1.8->1.9 
L:fixed the wrong order of object destruction:
L:  a released object is referred after the *_free() call.
parent 46b5bce9
......@@ -440,9 +440,9 @@ int snd_opl3_create(snd_card_t * card,
default:
opl3->command = &snd_opl2_command;
if ((err = snd_opl3_detect(opl3)) < 0) {
snd_opl3_free(opl3);
snd_printd("OPL2/3 chip not detected at 0x%lx/0x%lx\n",
opl3->l_port, opl3->r_port);
snd_opl3_free(opl3);
return err;
}
/* detect routine returns correct hardware type */
......
......@@ -189,8 +189,8 @@ static int __init snd_gusclassic_probe(int dev)
return err;
}
if (gus->max_flag || gus->ess_flag) {
snd_card_free(card);
snd_printdd("GUS Classic or ACE soundcard was not detected at 0x%lx\n", gus->gf1.port);
snd_card_free(card);
return -ENODEV;
}
if ((err = snd_gf1_new_mixer(gus)) < 0) {
......
......@@ -284,8 +284,8 @@ static int __init snd_gusextreme_probe(int dev)
return err;
}
if (!gus->ess_flag) {
snd_card_free(card);
snd_printdd("GUS Extreme soundcard was not detected at 0x%lx\n", gus->gf1.port);
snd_card_free(card);
return -ENODEV;
}
if ((err = snd_es1688_pcm(es1688, 0, NULL)) < 0) {
......
......@@ -293,8 +293,8 @@ static int __init snd_gusmax_probe(int dev)
return err;
}
if (!gus->max_flag) {
snd_card_free(card);
printk(KERN_ERR "GUS MAX soundcard was not detected at 0x%lx\n", gus->gf1.port);
snd_card_free(card);
return -ENODEV;
}
......
......@@ -1347,38 +1347,38 @@ static int __devinit snd_azf3328_create(snd_card_t * card,
chip->codec_port = pci_resource_start(pci, 0);
if ((chip->res_codec_port = request_region(chip->codec_port, 0x80, "Aztech AZF3328 I/O")) == NULL) {
snd_azf3328_free(chip);
snd_printk("unable to grab I/O port at 0x%lx-0x%lx\n", chip->codec_port, chip->codec_port + 0x80 - 1);
snd_azf3328_free(chip);
return -EBUSY;
}
chip->io2_port = pci_resource_start(pci, 1);
if ((chip->res_io2_port = request_region(chip->io2_port, 0x08, "Aztech AZF3328 I/O 2")) == NULL) {
snd_azf3328_free(chip);
snd_printk("unable to grab I/O 2 port at 0x%lx-0x%lx\n", chip->io2_port, chip->io2_port + 0x08 - 1);
snd_azf3328_free(chip);
return -EBUSY;
}
chip->mpu_port = pci_resource_start(pci, 2);
if ((chip->res_mpu_port = request_region(chip->mpu_port, 0x04, "Aztech AZF3328 MPU401")) == NULL) {
snd_azf3328_free(chip);
snd_printk("unable to grab MPU401 port at 0x%lx-0x%lx\n", chip->mpu_port, chip->mpu_port + 0x04 - 1);
snd_azf3328_free(chip);
return -EBUSY;
}
chip->synth_port = pci_resource_start(pci, 3);
if ((chip->res_synth_port = request_region(chip->synth_port, 0x08, "Aztech AZF3328 OPL3")) == NULL) {
snd_azf3328_free(chip);
snd_printk("unable to grab OPL3 port at 0x%lx-0x%lx\n", chip->synth_port, chip->synth_port + 0x08 - 1);
snd_azf3328_free(chip);
return -EBUSY;
}
chip->mixer_port = pci_resource_start(pci, 4);
if ((chip->res_mixer_port = request_region(chip->mixer_port, 0x40, "Aztech AZF3328 Mixer")) == NULL) {
snd_azf3328_free(chip);
snd_printk("unable to grab mixer port at 0x%lx-0x%lx\n", chip->mixer_port, chip->mixer_port + 0x40 - 1);
snd_azf3328_free(chip);
return -EBUSY;
}
if (request_irq(pci->irq, snd_azf3328_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip)) {
snd_azf3328_free(chip);
snd_printk("unable to grab IRQ %d\n", pci->irq);
snd_azf3328_free(chip);
return -EBUSY;
}
chip->irq = pci->irq;
......@@ -1499,8 +1499,8 @@ static int __devinit snd_azf3328_probe(struct pci_dev *pci,
if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_MPU401,
chip->mpu_port, 1, pci->irq, 0,
&chip->rmidi)) < 0) {
snd_card_free(card);
snd_printk("azf3328: no MPU-401 device at 0x%lx?\n", chip->mpu_port);
snd_card_free(card);
return err;
}
......
......@@ -1439,18 +1439,18 @@ static int __devinit snd_cs4281_create(snd_card_t * card,
chip->dual_codec = dual_codec;
if ((chip->ba0_res = request_mem_region(chip->ba0_addr, CS4281_BA0_SIZE, "CS4281 BA0")) == NULL) {
snd_cs4281_free(chip);
snd_printk(KERN_ERR "unable to grab memory region 0x%lx-0x%lx\n", chip->ba0_addr, chip->ba0_addr + CS4281_BA0_SIZE - 1);
snd_cs4281_free(chip);
return -ENOMEM;
}
if ((chip->ba1_res = request_mem_region(chip->ba1_addr, CS4281_BA1_SIZE, "CS4281 BA1")) == NULL) {
snd_cs4281_free(chip);
snd_printk(KERN_ERR "unable to grab memory region 0x%lx-0x%lx\n", chip->ba1_addr, chip->ba1_addr + CS4281_BA1_SIZE - 1);
snd_cs4281_free(chip);
return -ENOMEM;
}
if (request_irq(pci->irq, snd_cs4281_interrupt, SA_INTERRUPT|SA_SHIRQ, "CS4281", (void *)chip)) {
snd_cs4281_free(chip);
snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
snd_cs4281_free(chip);
return -ENOMEM;
}
chip->irq = pci->irq;
......
......@@ -3887,8 +3887,8 @@ int __devinit snd_cs46xx_create(snd_card_t * card,
chip->ba1_addr = pci_resource_start(pci, 1);
if (chip->ba0_addr == 0 || chip->ba0_addr == (unsigned long)~0 ||
chip->ba1_addr == 0 || chip->ba1_addr == (unsigned long)~0) {
snd_cs46xx_free(chip);
snd_printk("wrong address(es) - ba0 = 0x%lx, ba1 = 0x%lx\n", chip->ba0_addr, chip->ba1_addr);
snd_cs46xx_free(chip);
return -ENOMEM;
}
......
......@@ -1902,20 +1902,20 @@ static int __devinit snd_ensoniq_create(snd_card_t * card,
ensoniq->irq = -1;
ensoniq->port = pci_resource_start(pci, 0);
if ((ensoniq->res_port = request_region(ensoniq->port, 0x40, "Ensoniq AudioPCI")) == NULL) {
snd_ensoniq_free(ensoniq);
snd_printk("unable to grab ports 0x%lx-0x%lx\n", ensoniq->port, ensoniq->port + 0x40 - 1);
snd_ensoniq_free(ensoniq);
return -EBUSY;
}
if (request_irq(pci->irq, snd_audiopci_interrupt, SA_INTERRUPT|SA_SHIRQ, "Ensoniq AudioPCI", (void *)ensoniq)) {
snd_ensoniq_free(ensoniq);
snd_printk("unable to grab IRQ %d\n", pci->irq);
snd_ensoniq_free(ensoniq);
return -EBUSY;
}
ensoniq->irq = pci->irq;
#ifdef CHIP1370
if ((ensoniq->bugbuf = snd_malloc_pci_pages(pci, 16, &ensoniq->bugbuf_addr)) == NULL) {
snd_ensoniq_free(ensoniq);
snd_printk("unable to allocate space for phantom area - bugbuf\n");
snd_ensoniq_free(ensoniq);
return -EBUSY;
}
#endif
......
......@@ -1413,37 +1413,37 @@ static int __devinit snd_es1938_create(snd_card_t * card,
chip->pci = pci;
chip->io_port = pci_resource_start(pci, 0);
if ((chip->res_io_port = request_region(chip->io_port, 8, "ESS Solo-1")) == NULL) {
snd_es1938_free(chip);
snd_printk("unable to grab region 0x%lx-0x%lx\n", chip->io_port, chip->io_port + 8 - 1);
snd_es1938_free(chip);
return -EBUSY;
}
chip->sb_port = pci_resource_start(pci, 1);
if ((chip->res_sb_port = request_region(chip->sb_port, 0x10, "ESS Solo-1 SB")) == NULL) {
snd_es1938_free(chip);
snd_printk("unable to grab SB region 0x%lx-0x%lx\n", chip->sb_port, chip->sb_port + 0x10 - 1);
snd_es1938_free(chip);
return -EBUSY;
}
chip->vc_port = pci_resource_start(pci, 2);
if ((chip->res_vc_port = request_region(chip->vc_port, 0x10, "ESS Solo-1 VC (DMA)")) == NULL) {
snd_es1938_free(chip);
snd_printk("unable to grab VC (DMA) region 0x%lx-0x%lx\n", chip->vc_port, chip->vc_port + 0x10 - 1);
snd_es1938_free(chip);
return -EBUSY;
}
chip->mpu_port = pci_resource_start(pci, 3);
if ((chip->res_mpu_port = request_region(chip->mpu_port, 4, "ESS Solo-1 MIDI")) == NULL) {
snd_es1938_free(chip);
snd_printk("unable to grab MIDI region 0x%lx-0x%lx\n", chip->mpu_port, chip->mpu_port + 4 - 1);
snd_es1938_free(chip);
return -EBUSY;
}
chip->game_port = pci_resource_start(pci, 4);
if ((chip->res_game_port = request_region(chip->game_port, 4, "ESS Solo-1 GAME")) == NULL) {
snd_es1938_free(chip);
snd_printk("unable to grab GAME region 0x%lx-0x%lx\n", chip->game_port, chip->game_port + 4 - 1);
snd_es1938_free(chip);
return -EBUSY;
}
if (request_irq(pci->irq, snd_es1938_interrupt, SA_INTERRUPT|SA_SHIRQ, "ES1938", (void *)chip)) {
snd_es1938_free(chip);
snd_printk("unable to grab IRQ %d\n", pci->irq);
snd_es1938_free(chip);
return -EBUSY;
}
chip->irq = pci->irq;
......
......@@ -2551,14 +2551,14 @@ static int __devinit snd_es1968_create(snd_card_t * card,
chip->io_port = pci_resource_start(pci, 0);
if ((chip->res_io_port = request_region(chip->io_port, 0x100, "ESS Maestro")) == NULL) {
snd_es1968_free(chip);
snd_printk("unable to grab region 0x%lx-0x%lx\n", chip->io_port, chip->io_port + 0x100 - 1);
snd_es1968_free(chip);
return -EBUSY;
}
if (request_irq(pci->irq, snd_es1968_interrupt, SA_INTERRUPT|SA_SHIRQ,
"ESS Maestro", (void*)chip)) {
snd_es1968_free(chip);
snd_printk("unable to grab IRQ %d\n", pci->irq);
snd_es1968_free(chip);
return -EBUSY;
}
chip->irq = pci->irq;
......
......@@ -2387,28 +2387,28 @@ static int __devinit snd_ice1712_create(snd_card_t * card,
synchronize_irq(pci->irq);
if ((ice->res_port = request_region(ice->port, 32, "ICE1712 - Controller")) == NULL) {
snd_ice1712_free(ice);
snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->port, ice->port + 32 - 1);
snd_ice1712_free(ice);
return -EIO;
}
if ((ice->res_ddma_port = request_region(ice->ddma_port, 16, "ICE1712 - DDMA")) == NULL) {
snd_ice1712_free(ice);
snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->ddma_port, ice->ddma_port + 16 - 1);
snd_ice1712_free(ice);
return -EIO;
}
if ((ice->res_dmapath_port = request_region(ice->dmapath_port, 16, "ICE1712 - DMA path")) == NULL) {
snd_ice1712_free(ice);
snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->dmapath_port, ice->dmapath_port + 16 - 1);
snd_ice1712_free(ice);
return -EIO;
}
if ((ice->res_profi_port = request_region(ice->profi_port, 64, "ICE1712 - Professional")) == NULL) {
snd_ice1712_free(ice);
snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->profi_port, ice->profi_port + 16 - 1);
snd_ice1712_free(ice);
return -EIO;
}
if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1712", (void *) ice)) {
snd_ice1712_free(ice);
snd_printk("unable to grab IRQ %d\n", pci->irq);
snd_ice1712_free(ice);
return -EIO;
}
......
......@@ -1796,20 +1796,20 @@ static int __devinit snd_vt1724_create(snd_card_t * card,
synchronize_irq(pci->irq);
if ((ice->res_port = request_region(ice->port, 32, "ICE1724 - Controller")) == NULL) {
snd_vt1724_free(ice);
snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->port, ice->port + 32 - 1);
snd_vt1724_free(ice);
return -EIO;
}
if ((ice->res_profi_port = request_region(ice->profi_port, 128, "ICE1724 - Professional")) == NULL) {
snd_vt1724_free(ice);
snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->profi_port, ice->profi_port + 16 - 1);
snd_vt1724_free(ice);
return -EIO;
}
if (request_irq(pci->irq, snd_vt1724_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1724", (void *) ice)) {
snd_vt1724_free(ice);
snd_printk("unable to grab IRQ %d\n", pci->irq);
snd_vt1724_free(ice);
return -EIO;
}
......
......@@ -1264,32 +1264,32 @@ static int __devinit snd_sonicvibes_create(snd_card_t * card,
sonic->irq = -1;
sonic->sb_port = pci_resource_start(pci, 0);
if ((sonic->res_sb_port = request_region(sonic->sb_port, 0x10, "S3 SonicVibes SB")) == NULL) {
snd_sonicvibes_free(sonic);
snd_printk("unable to grab SB port at 0x%lx-0x%lx\n", sonic->sb_port, sonic->sb_port + 0x10 - 1);
snd_sonicvibes_free(sonic);
return -EBUSY;
}
sonic->enh_port = pci_resource_start(pci, 1);
if ((sonic->res_enh_port = request_region(sonic->enh_port, 0x10, "S3 SonicVibes Enhanced")) == NULL) {
snd_sonicvibes_free(sonic);
snd_printk("unable to grab PCM port at 0x%lx-0x%lx\n", sonic->enh_port, sonic->enh_port + 0x10 - 1);
snd_sonicvibes_free(sonic);
return -EBUSY;
}
sonic->synth_port = pci_resource_start(pci, 2);
if ((sonic->res_synth_port = request_region(sonic->synth_port, 4, "S3 SonicVibes Synth")) == NULL) {
snd_sonicvibes_free(sonic);
snd_printk("unable to grab synth port at 0x%lx-0x%lx\n", sonic->synth_port, sonic->synth_port + 4 - 1);
snd_sonicvibes_free(sonic);
return -EBUSY;
}
sonic->midi_port = pci_resource_start(pci, 3);
if ((sonic->res_midi_port = request_region(sonic->midi_port, 4, "S3 SonicVibes Midi")) == NULL) {
snd_sonicvibes_free(sonic);
snd_printk("unable to grab MIDI port at 0x%lx-0x%lx\n", sonic->midi_port, sonic->midi_port + 4 - 1);
snd_sonicvibes_free(sonic);
return -EBUSY;
}
sonic->game_port = pci_resource_start(pci, 4);
if (request_irq(pci->irq, snd_sonicvibes_interrupt, SA_INTERRUPT|SA_SHIRQ, "S3 SonicVibes", (void *)sonic)) {
snd_magic_kfree(sonic);
snd_printk("unable to grab IRQ %d\n", pci->irq);
snd_sonicvibes_free(sonic);
return -EBUSY;
}
sonic->irq = pci->irq;
......
......@@ -3538,13 +3538,13 @@ int __devinit snd_trident_create(snd_card_t * card,
trident->port = pci_resource_start(pci, 0);
if ((trident->res_port = request_region(trident->port, 0x100, "Trident Audio")) == NULL) {
snd_trident_free(trident);
snd_printk("unable to grab I/O region 0x%lx-0x%lx\n", trident->port, trident->port + 0x100 - 1);
snd_trident_free(trident);
return -EBUSY;
}
if (request_irq(pci->irq, snd_trident_interrupt, SA_INTERRUPT|SA_SHIRQ, "Trident Audio", (void *) trident)) {
snd_trident_free(trident);
snd_printk("unable to grab IRQ %d\n", pci->irq);
snd_trident_free(trident);
return -EBUSY;
}
trident->irq = pci->irq;
......
......@@ -1897,14 +1897,14 @@ static int __devinit snd_via82xx_create(snd_card_t * card,
chip->port = pci_resource_start(pci, 0);
if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) {
snd_via82xx_free(chip);
snd_printk("unable to grab ports 0x%lx-0x%lx\n", chip->port, chip->port + 256 - 1);
snd_via82xx_free(chip);
return -EBUSY;
}
if (request_irq(pci->irq, snd_via82xx_interrupt, SA_INTERRUPT|SA_SHIRQ,
card->driver, (void *)chip)) {
snd_via82xx_free(chip);
snd_printk("unable to grab IRQ %d\n", pci->irq);
snd_via82xx_free(chip);
return -EBUSY;
}
chip->irq = pci->irq;
......
......@@ -2288,13 +2288,13 @@ int __devinit snd_ymfpci_create(snd_card_t * card,
pci_set_master(pci);
if ((chip->res_reg_area = request_mem_region(chip->reg_area_phys, 0x8000, "YMFPCI")) == NULL) {
snd_ymfpci_free(chip);
snd_printk("unable to grab memory region 0x%lx-0x%lx\n", chip->reg_area_phys, chip->reg_area_phys + 0x8000 - 1);
snd_ymfpci_free(chip);
return -EBUSY;
}
if (request_irq(pci->irq, snd_ymfpci_interrupt, SA_INTERRUPT|SA_SHIRQ, "YMFPCI", (void *) chip)) {
snd_ymfpci_free(chip);
snd_printk("unable to grab IRQ %d\n", pci->irq);
snd_ymfpci_free(chip);
return -EBUSY;
}
chip->irq = pci->irq;
......
......@@ -992,10 +992,10 @@ static int __init snd_amd7930_create(snd_card_t *card,
if (request_irq(irq_prop->pri, snd_amd7930_interrupt,
SA_INTERRUPT | SA_SHIRQ, "amd7930", amd)) {
snd_amd7930_free(amd);
snd_printk("amd7930-%d: Unable to grab IRQ %s\n",
dev,
__irq_itoa(irq_prop->pri));
snd_amd7930_free(amd);
return -EBUSY;
}
amd->irq = irq_prop->pri;
......
......@@ -1994,10 +1994,10 @@ static int __init snd_cs4231_sbus_create(snd_card_t *card,
if (request_irq(sdev->irqs[0], snd_cs4231_sbus_interrupt,
SA_SHIRQ, "cs4231", chip)) {
snd_cs4231_sbus_free(chip);
snd_printk("cs4231-%d: Unable to grab SBUS IRQ %s\n",
dev,
__irq_itoa(sdev->irqs[0]));
snd_cs4231_sbus_free(chip);
return -EBUSY;
}
chip->irq[0] = sdev->irqs[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment