aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2009-07-06 16:08:04 -0400
committerTakashi Iwai <tiwai@suse.de>2009-07-07 02:02:57 -0400
commit0b959167237208bc1a811e30bf866cd29bff1652 (patch)
treea1729a339eb56d6506dad8a3ab3c1996068756d3 /sound/isa
parent69eb88825a7a562ee3564bdae20c35b0238307b0 (diff)
ALSA: cmi8330: find OPL3 port automatically
My CMI8329 had OPL3 port specified in SB16 resources. But now I found out that it was my modification of the card's PnP EEPROM a couple of years ago (can be done using C9SETROM.EXE utility). I did it because the OPL3 port was completely missing from PnP data. It seems to be hardwired to 0x388 on CMI8329. Find OPL3 port automatically by searching in WSS and SB16 resources. If not found, assume that it's hardwired to 0x388. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa')
-rw-r--r--sound/isa/cmi8330.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index 33e63faf6aa1..f7acb8dac185 100644
--- a/sound/isa/cmi8330.c
+++ b/sound/isa/cmi8330.c
@@ -362,7 +362,7 @@ static int __devinit snd_cmi8330_pnp(int dev, struct snd_cmi8330 *acard,
362 wssport[dev] = pnp_port_start(pdev, 0); 362 wssport[dev] = pnp_port_start(pdev, 0);
363 wssdma[dev] = pnp_dma(pdev, 0); 363 wssdma[dev] = pnp_dma(pdev, 0);
364 wssirq[dev] = pnp_irq(pdev, 0); 364 wssirq[dev] = pnp_irq(pdev, 0);
365 if (acard->type == CMI8330) 365 if (pnp_port_start(pdev, 1))
366 fmport[dev] = pnp_port_start(pdev, 1); 366 fmport[dev] = pnp_port_start(pdev, 1);
367 367
368 /* allocate SB16 resources */ 368 /* allocate SB16 resources */
@@ -377,8 +377,13 @@ static int __devinit snd_cmi8330_pnp(int dev, struct snd_cmi8330 *acard,
377 sbdma8[dev] = pnp_dma(pdev, 0); 377 sbdma8[dev] = pnp_dma(pdev, 0);
378 sbdma16[dev] = pnp_dma(pdev, 1); 378 sbdma16[dev] = pnp_dma(pdev, 1);
379 sbirq[dev] = pnp_irq(pdev, 0); 379 sbirq[dev] = pnp_irq(pdev, 0);
380 if (acard->type == CMI8329) 380 /* On CMI8239, the OPL3 port might be present in SB16 PnP resources */
381 fmport[dev] = pnp_port_start(pdev, 1); 381 if (fmport[dev] == SNDRV_AUTO_PORT) {
382 if (pnp_port_start(pdev, 1))
383 fmport[dev] = pnp_port_start(pdev, 1);
384 else
385 fmport[dev] = 0x388; /* Or hardwired */
386 }
382 387
383 /* allocate MPU-401 resources */ 388 /* allocate MPU-401 resources */
384 pdev = acard->mpu; 389 pdev = acard->mpu;