* [PATCH] [resend] cmi8330: find OPL3 port automatically
@ 2009-07-08 8:04 Ondrej Zary
2009-07-09 7:36 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Ondrej Zary @ 2009-07-08 8:04 UTC (permalink / raw)
To: alsa-devel
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>
--- linux-test/sound/isa/cmi8330.c 2009-07-06 21:18:06.000000000 +0200
+++ linux-2.6.30-pentium/sound/isa/cmi8330.c 2009-07-06 21:45:29.000000000
+0200
@@ -362,7 +362,7 @@
wssport[dev] = pnp_port_start(pdev, 0);
wssdma[dev] = pnp_dma(pdev, 0);
wssirq[dev] = pnp_irq(pdev, 0);
- if (acard->type == CMI8330)
+ if (pnp_port_start(pdev, 1))
fmport[dev] = pnp_port_start(pdev, 1);
/* allocate SB16 resources */
@@ -377,8 +377,13 @@
sbdma8[dev] = pnp_dma(pdev, 0);
sbdma16[dev] = pnp_dma(pdev, 1);
sbirq[dev] = pnp_irq(pdev, 0);
- if (acard->type == CMI8329)
- fmport[dev] = pnp_port_start(pdev, 1);
+ /* On CMI8239, the OPL3 port might be present in SB16 PnP resources */
+ if (fmport[dev] == SNDRV_AUTO_PORT) {
+ if (pnp_port_start(pdev, 1))
+ fmport[dev] = pnp_port_start(pdev, 1);
+ else
+ fmport[dev] = 0x388; /* Or hardwired */
+ }
/* allocate MPU-401 resources */
pdev = acard->mpu;
--
Ondrej Zary
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [resend] cmi8330: find OPL3 port automatically
2009-07-08 8:04 [PATCH] [resend] cmi8330: find OPL3 port automatically Ondrej Zary
@ 2009-07-09 7:36 ` Takashi Iwai
2009-07-09 7:37 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2009-07-09 7:36 UTC (permalink / raw)
To: Ondrej Zary; +Cc: alsa-devel
At Wed, 8 Jul 2009 10:04:29 +0200,
Ondrej Zary wrote:
>
> 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>
This was already merged. Seems either I forgot mail you or my mail
didn't go out (maybe the former :)
thanks,
Takashi
>
> --- linux-test/sound/isa/cmi8330.c 2009-07-06 21:18:06.000000000 +0200
> +++ linux-2.6.30-pentium/sound/isa/cmi8330.c 2009-07-06 21:45:29.000000000
> +0200
> @@ -362,7 +362,7 @@
> wssport[dev] = pnp_port_start(pdev, 0);
> wssdma[dev] = pnp_dma(pdev, 0);
> wssirq[dev] = pnp_irq(pdev, 0);
> - if (acard->type == CMI8330)
> + if (pnp_port_start(pdev, 1))
> fmport[dev] = pnp_port_start(pdev, 1);
>
> /* allocate SB16 resources */
> @@ -377,8 +377,13 @@
> sbdma8[dev] = pnp_dma(pdev, 0);
> sbdma16[dev] = pnp_dma(pdev, 1);
> sbirq[dev] = pnp_irq(pdev, 0);
> - if (acard->type == CMI8329)
> - fmport[dev] = pnp_port_start(pdev, 1);
> + /* On CMI8239, the OPL3 port might be present in SB16 PnP resources */
> + if (fmport[dev] == SNDRV_AUTO_PORT) {
> + if (pnp_port_start(pdev, 1))
> + fmport[dev] = pnp_port_start(pdev, 1);
> + else
> + fmport[dev] = 0x388; /* Or hardwired */
> + }
>
> /* allocate MPU-401 resources */
> pdev = acard->mpu;
>
> --
> Ondrej Zary
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [resend] cmi8330: find OPL3 port automatically
2009-07-09 7:36 ` Takashi Iwai
@ 2009-07-09 7:37 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2009-07-09 7:37 UTC (permalink / raw)
To: Ondrej Zary; +Cc: alsa-devel
At Thu, 09 Jul 2009 09:36:28 +0200,
I wrote:
>
> At Wed, 8 Jul 2009 10:04:29 +0200,
> Ondrej Zary wrote:
> >
> > 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>
>
> This was already merged. Seems either I forgot mail you or my mail
> didn't go out (maybe the former :)
BTW, if you create a patch via GIT, please base on the sound git tree
below.
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
The patches specific to cmi8330 are found in topic/cmi8330 branch.
thanks,
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-09 7:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-08 8:04 [PATCH] [resend] cmi8330: find OPL3 port automatically Ondrej Zary
2009-07-09 7:36 ` Takashi Iwai
2009-07-09 7:37 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.