Commit 5516118c authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Takashi Iwai <tiwai@suse.de>

ALSA Core,ALS100 driver,AZT2320 driver,DT019x driver,CS4231 driver
CS4236+ driver,PC98(CS423x) driver,Opti9xx drivers,SB16/AWE driver
Wavefront drivers
use the standard port address, 0 = disable, 1 = auto-probe, others manual.
negative values are accepted as disable, too.
parent 6b8430f4
...@@ -35,7 +35,7 @@ static const char __module_generic_string_##name [] \ ...@@ -35,7 +35,7 @@ static const char __module_generic_string_##name [] \
#define MODULE_DEVICES(val) MODULE_GENERIC_STRING(info_devices, val) #define MODULE_DEVICES(val) MODULE_GENERIC_STRING(info_devices, val)
#define MODULE_PARM_SYNTAX(id, val) MODULE_GENERIC_STRING(info_parm_##id, val) #define MODULE_PARM_SYNTAX(id, val) MODULE_GENERIC_STRING(info_parm_##id, val)
#define SNDRV_AUTO_PORT 0xffff #define SNDRV_AUTO_PORT 1
#define SNDRV_AUTO_IRQ 0xffff #define SNDRV_AUTO_IRQ 0xffff
#define SNDRV_AUTO_DMA 0xffff #define SNDRV_AUTO_DMA 0xffff
#define SNDRV_AUTO_DMA_SIZE (0x7fffffff) #define SNDRV_AUTO_DMA_SIZE (0x7fffffff)
...@@ -58,7 +58,7 @@ static const char __module_generic_string_##name [] \ ...@@ -58,7 +58,7 @@ static const char __module_generic_string_##name [] \
#else #else
#define SNDRV_DEFAULT_ENABLE_ISAPNP SNDRV_DEFAULT_ENABLE #define SNDRV_DEFAULT_ENABLE_ISAPNP SNDRV_DEFAULT_ENABLE
#endif #endif
#define SNDRV_DEFAULT_PORT { SNDRV_AUTO_PORT, [1 ... (SNDRV_CARDS-1)] = -1 } #define SNDRV_DEFAULT_PORT { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_PORT }
#define SNDRV_DEFAULT_IRQ { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_IRQ } #define SNDRV_DEFAULT_IRQ { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_IRQ }
#define SNDRV_DEFAULT_DMA { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA } #define SNDRV_DEFAULT_DMA { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA }
#define SNDRV_DEFAULT_DMA_SIZE { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA_SIZE } #define SNDRV_DEFAULT_DMA_SIZE { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA_SIZE }
......
...@@ -249,7 +249,7 @@ static int __init snd_card_als100_probe(int dev, ...@@ -249,7 +249,7 @@ static int __init snd_card_als100_probe(int dev,
return error; return error;
} }
if (mpu_port[dev] > 0) { if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
if (snd_mpu401_uart_new(card, 0, MPU401_HW_ALS100, if (snd_mpu401_uart_new(card, 0, MPU401_HW_ALS100,
mpu_port[dev], 0, mpu_port[dev], 0,
mpu_irq[dev], SA_INTERRUPT, mpu_irq[dev], SA_INTERRUPT,
...@@ -257,7 +257,7 @@ static int __init snd_card_als100_probe(int dev, ...@@ -257,7 +257,7 @@ static int __init snd_card_als100_probe(int dev,
snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]); snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]);
} }
if (fm_port[dev] > 0) { if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
if (snd_opl3_create(card, if (snd_opl3_create(card,
fm_port[dev], fm_port[dev] + 2, fm_port[dev], fm_port[dev] + 2,
OPL3_HW_AUTO, 0, &opl3) < 0) { OPL3_HW_AUTO, 0, &opl3) < 0) {
......
...@@ -283,7 +283,7 @@ static int __devinit snd_card_azt2320_probe(int dev, ...@@ -283,7 +283,7 @@ static int __devinit snd_card_azt2320_probe(int dev,
return error; return error;
} }
if (mpu_port[dev] > 0) { if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
if (snd_mpu401_uart_new(card, 0, MPU401_HW_AZT2320, if (snd_mpu401_uart_new(card, 0, MPU401_HW_AZT2320,
mpu_port[dev], 0, mpu_port[dev], 0,
mpu_irq[dev], SA_INTERRUPT, mpu_irq[dev], SA_INTERRUPT,
...@@ -291,7 +291,7 @@ static int __devinit snd_card_azt2320_probe(int dev, ...@@ -291,7 +291,7 @@ static int __devinit snd_card_azt2320_probe(int dev,
snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]); snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]);
} }
if (fm_port[dev] > 0) { if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
if (snd_opl3_create(card, if (snd_opl3_create(card,
fm_port[dev], fm_port[dev] + 2, fm_port[dev], fm_port[dev] + 2,
OPL3_HW_AUTO, 0, &opl3) < 0) { OPL3_HW_AUTO, 0, &opl3) < 0) {
......
...@@ -103,8 +103,6 @@ static int __init snd_card_cs4231_probe(int dev) ...@@ -103,8 +103,6 @@ static int __init snd_card_cs4231_probe(int dev)
if (card == NULL) if (card == NULL)
return -ENOMEM; return -ENOMEM;
acard = (struct snd_card_cs4231 *)card->private_data; acard = (struct snd_card_cs4231 *)card->private_data;
if (mpu_port[dev] < 0)
mpu_port[dev] = SNDRV_AUTO_PORT;
if ((err = snd_cs4231_create(card, port[dev], -1, if ((err = snd_cs4231_create(card, port[dev], -1,
irq[dev], irq[dev],
dma1[dev], dma1[dev],
...@@ -128,10 +126,13 @@ static int __init snd_card_cs4231_probe(int dev) ...@@ -128,10 +126,13 @@ static int __init snd_card_cs4231_probe(int dev)
return err; return err;
} }
if (mpu_irq[dev] >= 0 && mpu_irq[dev] != SNDRV_AUTO_IRQ) { if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
if (mpu_irq[dev] == SNDRV_AUTO_IRQ)
mpu_irq[dev] = -1;
if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232, if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232,
mpu_port[dev], 0, mpu_port[dev], 0,
mpu_irq[dev], SA_INTERRUPT, mpu_irq[dev],
mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0,
NULL) < 0) NULL) < 0)
printk(KERN_ERR "cs4231: MPU401 not detected\n"); printk(KERN_ERR "cs4231: MPU401 not detected\n");
} }
......
...@@ -307,7 +307,7 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard, ...@@ -307,7 +307,7 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard,
pnp_init_resource_table(cfg); pnp_init_resource_table(cfg);
if (port[dev] != SNDRV_AUTO_PORT) if (port[dev] != SNDRV_AUTO_PORT)
pnp_resource_change(&cfg->port_resource[0], port[dev], 4); pnp_resource_change(&cfg->port_resource[0], port[dev], 4);
if (fm_port[dev] != SNDRV_AUTO_PORT && fm_port[dev] >= 0) if (fm_port[dev] != SNDRV_AUTO_PORT && fm_port[dev] > 0)
pnp_resource_change(&cfg->port_resource[1], fm_port[dev], 4); pnp_resource_change(&cfg->port_resource[1], fm_port[dev], 4);
if (sb_port[dev] != SNDRV_AUTO_PORT) if (sb_port[dev] != SNDRV_AUTO_PORT)
pnp_resource_change(&cfg->port_resource[2], sb_port[dev], 16); pnp_resource_change(&cfg->port_resource[2], sb_port[dev], 16);
...@@ -327,7 +327,7 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard, ...@@ -327,7 +327,7 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard,
return -EBUSY; return -EBUSY;
} }
port[dev] = pnp_port_start(pdev, 0); port[dev] = pnp_port_start(pdev, 0);
if (fm_port[dev] >= 0) if (fm_port[dev] > 0)
fm_port[dev] = pnp_port_start(pdev, 1); fm_port[dev] = pnp_port_start(pdev, 1);
sb_port[dev] = pnp_port_start(pdev, 2); sb_port[dev] = pnp_port_start(pdev, 2);
irq[dev] = pnp_irq(pdev, 0); irq[dev] = pnp_irq(pdev, 0);
...@@ -338,7 +338,7 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard, ...@@ -338,7 +338,7 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard,
snd_printdd("isapnp WSS: irq=%i, dma1=%i, dma2=%i\n", snd_printdd("isapnp WSS: irq=%i, dma1=%i, dma2=%i\n",
irq[dev], dma1[dev], dma2[dev]); irq[dev], dma1[dev], dma2[dev]);
/* CTRL initialization */ /* CTRL initialization */
if (acard->ctrl && cport[dev] >= 0) { if (acard->ctrl && cport[dev] > 0) {
pdev = acard->ctrl; pdev = acard->ctrl;
pnp_init_resource_table(cfg); pnp_init_resource_table(cfg);
if (cport[dev] != SNDRV_AUTO_PORT) if (cport[dev] != SNDRV_AUTO_PORT)
...@@ -356,12 +356,13 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard, ...@@ -356,12 +356,13 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard,
snd_printdd("isapnp CTRL: control port=0x%lx\n", cport[dev]); snd_printdd("isapnp CTRL: control port=0x%lx\n", cport[dev]);
} }
/* MPU initialization */ /* MPU initialization */
if (acard->mpu && mpu_port[dev] >= 0) { if (acard->mpu && mpu_port[dev] > 0) {
pdev = acard->mpu; pdev = acard->mpu;
pnp_init_resource_table(cfg); pnp_init_resource_table(cfg);
if (mpu_port[dev] != SNDRV_AUTO_PORT) if (mpu_port[dev] != SNDRV_AUTO_PORT)
pnp_resource_change(&cfg->port_resource[0], mpu_port[dev], 2); pnp_resource_change(&cfg->port_resource[0], mpu_port[dev], 2);
if (mpu_irq[dev] != SNDRV_AUTO_IRQ && mpu_irq[dev] >= 0) if (mpu_irq[dev] != SNDRV_AUTO_IRQ && mpu_irq[dev] >= 0 &&
pnp_irq_valid(pdev, 0))
pnp_resource_change(&cfg->irq_resource[0], mpu_irq[dev], 1); pnp_resource_change(&cfg->irq_resource[0], mpu_irq[dev], 1);
err = pnp_manual_config_dev(pdev, cfg, 0); err = pnp_manual_config_dev(pdev, cfg, 0);
if (err < 0) if (err < 0)
...@@ -373,7 +374,8 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard, ...@@ -373,7 +374,8 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard,
mpu_irq[dev] = SNDRV_AUTO_IRQ; mpu_irq[dev] = SNDRV_AUTO_IRQ;
} else { } else {
mpu_port[dev] = pnp_port_start(pdev, 0); mpu_port[dev] = pnp_port_start(pdev, 0);
if (pnp_irq_valid(pdev, 0) && pnp_irq(pdev, 0) >= 0) { if (mpu_irq[dev] >= 0 &&
pnp_irq_valid(pdev, 0) && pnp_irq(pdev, 0) >= 0) {
mpu_irq[dev] = pnp_irq(pdev, 0); mpu_irq[dev] = pnp_irq(pdev, 0);
} else { } else {
mpu_irq[dev] = -1; /* disable interrupt */ mpu_irq[dev] = -1; /* disable interrupt */
...@@ -435,13 +437,7 @@ static int __devinit snd_card_cs423x_probe(int dev, struct pnp_card_link *pcard, ...@@ -435,13 +437,7 @@ static int __devinit snd_card_cs423x_probe(int dev, struct pnp_card_link *pcard,
return -ENXIO; return -ENXIO;
} }
#endif #endif
if (mpu_port[dev] < 0) if (sb_port[dev] > 0 && sb_port[dev] != SNDRV_AUTO_PORT)
mpu_port[dev] = SNDRV_AUTO_PORT;
if (fm_port[dev] < 0)
fm_port[dev] = SNDRV_AUTO_PORT;
if (sb_port[dev] < 0)
sb_port[dev] = SNDRV_AUTO_PORT;
if (sb_port[dev] != SNDRV_AUTO_PORT)
if ((acard->res_sb_port = request_region(sb_port[dev], 16, IDENT " SB")) == NULL) { if ((acard->res_sb_port = request_region(sb_port[dev], 16, IDENT " SB")) == NULL) {
printk(KERN_ERR IDENT ": unable to register SB port at 0x%lx\n", sb_port[dev]); printk(KERN_ERR IDENT ": unable to register SB port at 0x%lx\n", sb_port[dev]);
snd_card_free(card); snd_card_free(card);
...@@ -498,7 +494,7 @@ static int __devinit snd_card_cs423x_probe(int dev, struct pnp_card_link *pcard, ...@@ -498,7 +494,7 @@ static int __devinit snd_card_cs423x_probe(int dev, struct pnp_card_link *pcard,
return err; return err;
} }
if (fm_port[dev] != SNDRV_AUTO_PORT) { if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
if (snd_opl3_create(card, if (snd_opl3_create(card,
fm_port[dev], fm_port[dev] + 2, fm_port[dev], fm_port[dev] + 2,
OPL3_HW_OPL3_CS, 0, &opl3) < 0) { OPL3_HW_OPL3_CS, 0, &opl3) < 0) {
...@@ -511,7 +507,9 @@ static int __devinit snd_card_cs423x_probe(int dev, struct pnp_card_link *pcard, ...@@ -511,7 +507,9 @@ static int __devinit snd_card_cs423x_probe(int dev, struct pnp_card_link *pcard,
} }
} }
if (mpu_port[dev] != SNDRV_AUTO_PORT) { if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
if (mpu_irq[dev] == SNDRV_AUTO_IRQ)
mpu_irq[dev] = -1;
if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232, if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232,
mpu_port[dev], 0, mpu_port[dev], 0,
mpu_irq[dev], mpu_irq[dev],
......
...@@ -327,10 +327,6 @@ static int __init snd_card_pc98_probe(int dev) ...@@ -327,10 +327,6 @@ static int __init snd_card_pc98_probe(int dev)
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
if (card == NULL) if (card == NULL)
return -ENOMEM; return -ENOMEM;
if (mpu_port[dev] < 0 || mpu_irq[dev] < 0)
mpu_port[dev] = SNDRV_AUTO_PORT;
if (fm_port[dev] < 0)
fm_port[dev] = SNDRV_AUTO_PORT;
if ((err = pc98_cs4231_chip_init(dev)) < 0) { if ((err = pc98_cs4231_chip_init(dev)) < 0) {
snd_card_free(card); snd_card_free(card);
...@@ -363,7 +359,7 @@ static int __init snd_card_pc98_probe(int dev) ...@@ -363,7 +359,7 @@ static int __init snd_card_pc98_probe(int dev)
return err; return err;
} }
if (fm_port[dev] != SNDRV_AUTO_PORT) { if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
/* ??? */ /* ??? */
outb(0x00, fm_port[dev] + 6); outb(0x00, fm_port[dev] + 6);
inb(fm_port[dev] + 7); inb(fm_port[dev] + 7);
...@@ -381,7 +377,7 @@ static int __init snd_card_pc98_probe(int dev) ...@@ -381,7 +377,7 @@ static int __init snd_card_pc98_probe(int dev)
} }
} }
if (mpu_port[dev] != SNDRV_AUTO_PORT) { if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
err = pc98_mpu401_init(mpu_irq[dev]); err = pc98_mpu401_init(mpu_irq[dev]);
if (! err) { if (! err) {
err = snd_mpu401_uart_new(card, 0, err = snd_mpu401_uart_new(card, 0,
......
...@@ -235,18 +235,20 @@ static int __devinit snd_card_dt019x_probe(int dev, struct pnp_card_link *pcard, ...@@ -235,18 +235,20 @@ static int __devinit snd_card_dt019x_probe(int dev, struct pnp_card_link *pcard,
return error; return error;
} }
if (mpu_port[dev] > 0) { if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
if (mpu_irq[dev] == SNDRV_AUTO_IRQ)
mpu_irq[dev] = -1;
if (snd_mpu401_uart_new(card, 0, if (snd_mpu401_uart_new(card, 0,
/* MPU401_HW_SB,*/ /* MPU401_HW_SB,*/
MPU401_HW_MPU401, MPU401_HW_MPU401,
mpu_port[dev], 0, mpu_port[dev], 0,
mpu_irq[dev], mpu_irq[dev],
SA_INTERRUPT, mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0,
NULL) < 0) NULL) < 0)
snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx ?\n", mpu_port[dev]); snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx ?\n", mpu_port[dev]);
} }
if (fm_port[dev] > 0) { if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
if (snd_opl3_create(card, if (snd_opl3_create(card,
fm_port[dev], fm_port[dev],
fm_port[dev] + 2, fm_port[dev] + 2,
......
...@@ -604,6 +604,7 @@ static int __devinit snd_opti9xx_configure(opti9xx_t *chip) ...@@ -604,6 +604,7 @@ static int __devinit snd_opti9xx_configure(opti9xx_t *chip)
__skip_resources: __skip_resources:
if (chip->hardware > OPTi9XX_HW_82C928) { if (chip->hardware > OPTi9XX_HW_82C928) {
switch (chip->mpu_port) { switch (chip->mpu_port) {
case 0:
case -1: case -1:
break; break;
case 0x300: case 0x300:
...@@ -644,7 +645,7 @@ static int __devinit snd_opti9xx_configure(opti9xx_t *chip) ...@@ -644,7 +645,7 @@ static int __devinit snd_opti9xx_configure(opti9xx_t *chip)
} }
snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(6), snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(6),
(chip->mpu_port == -1) ? 0x00 : (chip->mpu_port <= 0) ? 0x00 :
0x80 | mpu_port_bits << 5 | mpu_irq_bits << 3, 0x80 | mpu_port_bits << 5 | mpu_irq_bits << 3,
0xf8); 0xf8);
} }
...@@ -2093,7 +2094,7 @@ static int __devinit snd_card_opti9xx_probe(struct pnp_card_link *pcard, ...@@ -2093,7 +2094,7 @@ static int __devinit snd_card_opti9xx_probe(struct pnp_card_link *pcard,
} }
#endif #endif
if (chip->mpu_port <= 0) if (chip->mpu_port <= 0 || chip->mpu_port == SNDRV_AUTO_PORT)
rmidi = NULL; rmidi = NULL;
else else
if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
...@@ -2101,7 +2102,7 @@ static int __devinit snd_card_opti9xx_probe(struct pnp_card_link *pcard, ...@@ -2101,7 +2102,7 @@ static int __devinit snd_card_opti9xx_probe(struct pnp_card_link *pcard,
&rmidi))) &rmidi)))
snd_printk("no MPU-401 device at 0x%lx?\n", chip->mpu_port); snd_printk("no MPU-401 device at 0x%lx?\n", chip->mpu_port);
if (chip->fm_port > 0) { if (chip->fm_port > 0 && chip->fm_port != SNDRV_AUTO_PORT) {
opl3_t *opl3 = NULL; opl3_t *opl3 = NULL;
#ifndef OPTi93X #ifndef OPTi93X
if (chip->hardware == OPTi9XX_HW_82C928 || if (chip->hardware == OPTi9XX_HW_82C928 ||
......
...@@ -465,7 +465,7 @@ static int __init snd_sb16_probe(int dev, ...@@ -465,7 +465,7 @@ static int __init snd_sb16_probe(int dev,
return -ENXIO; return -ENXIO;
} }
if (chip->mpu_port) { if (chip->mpu_port > 0 && chip->mpu_port != SNDRV_AUTO_PORT) {
if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_SB, if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_SB,
chip->mpu_port, 0, chip->mpu_port, 0,
xirq, 0, &chip->rmidi)) < 0) { xirq, 0, &chip->rmidi)) < 0) {
...@@ -475,7 +475,12 @@ static int __init snd_sb16_probe(int dev, ...@@ -475,7 +475,12 @@ static int __init snd_sb16_probe(int dev,
chip->rmidi_callback = snd_mpu401_uart_interrupt; chip->rmidi_callback = snd_mpu401_uart_interrupt;
} }
if (fm_port[dev] > 0) { #ifdef SNDRV_SBAWE_EMU8000
if (awe_port[dev] == SNDRV_AUTO_PORT)
awe_port[dev] = 0; /* disable */
#endif
if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
if (snd_opl3_create(card, fm_port[dev], fm_port[dev] + 2, if (snd_opl3_create(card, fm_port[dev], fm_port[dev] + 2,
OPL3_HW_OPL3, OPL3_HW_OPL3,
fm_port[dev] == port[dev] || fm_port[dev] == 0x388, fm_port[dev] == port[dev] || fm_port[dev] == 0x388,
......
...@@ -418,13 +418,6 @@ snd_wavefront_probe (int dev, struct pnp_card_link *pcard, ...@@ -418,13 +418,6 @@ snd_wavefront_probe (int dev, struct pnp_card_link *pcard,
snd_hwdep_t *fx_processor; snd_hwdep_t *fx_processor;
int hw_dev = 0, midi_dev = 0, err; int hw_dev = 0, midi_dev = 0, err;
if (cs4232_mpu_port[dev] < 0)
cs4232_mpu_port[dev] = SNDRV_AUTO_PORT;
if (fm_port[dev] < 0)
fm_port[dev] = SNDRV_AUTO_PORT;
if (ics2115_port[dev] < 0)
ics2115_port[dev] = SNDRV_AUTO_PORT;
#ifdef CONFIG_PNP #ifdef CONFIG_PNP
if (!isapnp[dev]) { if (!isapnp[dev]) {
#endif #endif
...@@ -490,7 +483,7 @@ snd_wavefront_probe (int dev, struct pnp_card_link *pcard, ...@@ -490,7 +483,7 @@ snd_wavefront_probe (int dev, struct pnp_card_link *pcard,
/* ---------- OPL3 synth --------- */ /* ---------- OPL3 synth --------- */
if (fm_port[dev] != SNDRV_AUTO_PORT) { if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
opl3_t *opl3; opl3_t *opl3;
if ((err = snd_opl3_create(card, if ((err = snd_opl3_create(card,
...@@ -561,7 +554,7 @@ snd_wavefront_probe (int dev, struct pnp_card_link *pcard, ...@@ -561,7 +554,7 @@ snd_wavefront_probe (int dev, struct pnp_card_link *pcard,
/* ------ ICS2115 internal MIDI ------------ */ /* ------ ICS2115 internal MIDI ------------ */
if (ics2115_port[dev] >= 0 && ics2115_port[dev] != SNDRV_AUTO_PORT) { if (ics2115_port[dev] > 0 && ics2115_port[dev] != SNDRV_AUTO_PORT) {
ics2115_internal_rmidi = ics2115_internal_rmidi =
snd_wavefront_new_midi (card, snd_wavefront_new_midi (card,
midi_dev, midi_dev,
...@@ -578,7 +571,7 @@ snd_wavefront_probe (int dev, struct pnp_card_link *pcard, ...@@ -578,7 +571,7 @@ snd_wavefront_probe (int dev, struct pnp_card_link *pcard,
/* ------ ICS2115 external MIDI ------------ */ /* ------ ICS2115 external MIDI ------------ */
if (ics2115_port[dev] >= 0 && ics2115_port[dev] != SNDRV_AUTO_PORT) { if (ics2115_port[dev] > 0 && ics2115_port[dev] != SNDRV_AUTO_PORT) {
ics2115_external_rmidi = ics2115_external_rmidi =
snd_wavefront_new_midi (card, snd_wavefront_new_midi (card,
midi_dev, midi_dev,
...@@ -631,7 +624,7 @@ snd_wavefront_probe (int dev, struct pnp_card_link *pcard, ...@@ -631,7 +624,7 @@ snd_wavefront_probe (int dev, struct pnp_card_link *pcard,
if (dma2[dev] >= 0 && dma2[dev] < 8) if (dma2[dev] >= 0 && dma2[dev] < 8)
sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]); sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]);
if (cs4232_mpu_port[dev] != SNDRV_AUTO_PORT) { if (cs4232_mpu_port[dev] > 0 && cs4232_mpu_port[dev] != SNDRV_AUTO_PORT) {
sprintf (card->longname + strlen (card->longname), sprintf (card->longname + strlen (card->longname),
" MPU-401 0x%lx irq %d", " MPU-401 0x%lx irq %d",
cs4232_mpu_port[dev], cs4232_mpu_port[dev],
......
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