Skip to content

Commit

Permalink
[ALSA] opti9xx: adjust OPL3 FM resource value
Browse files Browse the repository at this point in the history
The OPTi ISA-PnP chips advertise their OPL4 base at 0x380 (to 0x3f0) through
pnp and put their on-chip OPL3 at +8. The driver assumes the provided
value is the ALBase (OPL3 address) though and checks for an OPL4 at -8,
which means that simply adding 8 to the pnp provides value works to fix
detection of both OPL3 and OPL4.
Problem spotted on 931 and 933 by Krzysztof Helt and confirmed on 924 and
925 (together all OPTi ISA-PnP chips) by me.
Signed-off-by; Rene Herman <rene.herman@gmail.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Oct 16, 2007
1 parent adf1295 commit 1ea7341
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/isa/opti9xx/opti92x-ad1848.c
Original file line number Diff line number Diff line change
Expand Up @@ -1732,11 +1732,11 @@ static int __devinit snd_card_opti9xx_pnp(struct snd_opti9xx *chip,

#ifdef OPTi93X
port = pnp_port_start(pdev, 0) - 4;
fm_port = pnp_port_start(pdev, 1);
fm_port = pnp_port_start(pdev, 1) + 8;
#else
if (pid->driver_data != 0x0924)
port = pnp_port_start(pdev, 1);
fm_port = pnp_port_start(pdev, 2);
fm_port = pnp_port_start(pdev, 2) + 8;
#endif /* OPTi93X */
irq = pnp_irq(pdev, 0);
dma1 = pnp_dma(pdev, 0);
Expand Down

0 comments on commit 1ea7341

Please sign in to comment.