Re: Sound in 2.1.128 - why oops?

Scott Murray (scottm@interlog.com)
Tue, 24 Nov 1998 02:29:35 -0500 (EST)


On Mon, 23 Nov 1998, Brian Schau wrote:

> I'm playing around trying to get my Yamaha OPL3-SA3 soundcard to work.
> As I have no documentation to this card, I am just trying some 'random'
> values (ie. values NOT used by other cards in the system).

As the paster-together of the OPL3-SA2/3/x driver, I think I can help!

[snip]

> cryo:/home/bsc # modprobe opl3sa2 io=0x388 mss_io=0x340 mpu_io=0x330
> irq=12 dma=0 dma2=1
>
> (the values are far off .... :)

No kidding. 0x388 is what the OPL3 FM module usually gets/wants, and
irq=12 is guaranteed to not work, as the underlying ad1848 driver only
works on 7, 9, 10, or 11.

> To verify that if some/all the ioports have been claimed I do:
>
> cryo:/home/bsc # cat /proc/ioports
> Segmentation fault
> cryo:/home/bsc #
>
> ... and get this in my logfiles:

[snip]
I have seen this problem once or twice before, and suspect something in the
guts of the /proc/ioports mechanism, but that's way out of my depth. For my
purposes, I've found that if yoy don't screw around with weird port settings
too much, it doesn't happen! :) I can pretty much guarantee that it's not
really the fault of the opl3sa2 module, as the messages indicate that the
check region of the control i/o port window failed, and it returns a -ENODEV
from the init_module call in this case without doing anything.

> So what's up? What's the proper way to load this card?

I'm hoping to finish up a patch in the next day or two that gets the mixer
stuff all working, and was planning on sticking something in the
Documentation/sound directory, but until then, here is a relevant excerpt from
my isapnp.conf:

(CONFIGURE YMH0800/-1 (LD 0

# Instead of (IO 0 (BASE 0x0220)), disable SB:
(IO 0 (BASE 0x0000))
(IO 1 (BASE 0x0530))
(IO 2 (BASE 0x0388))
(IO 3 (BASE 0x0330))
(IO 4 (BASE 0x0370))
(INT 0 (IRQ 7 (MODE +E)))
(DMA 0 (CHANNEL 0))
(DMA 1 (CHANNEL 3))

If you don't have isapnptools set up, poke around on the LDP, I think there
is a PnP-HOWTO of some kind; email me if you want my complete isapnp.conf to
look at. Again, one of the big keys is to set the irq to be one of 7, 9, 10,
or 11. Since the opl3sa2 modules just attaches to the ad1848 (MSS) module,
which is limited to these irqs, then we have to suffer the same limitation.
I've seen a bug where using an irq other than these (e.g. 5 in my case)
triggers a bug in the ad1848 module that pooches the whole module stack up
somehow. That one's on my to-fix list, as it's a nasty trap which requires
a reboot to fix.

Assuming you've got isapnp all happy, then you should be able to something
like the following (which matches up with the isapnp configuration above):

insmod mpu401
insmod ad1848
insmod opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=7 dma=0 dma2=3
insmod opl3 io=0x388

Note that the opl3sa2 module's io argument is for it's own control port,
which handles the card's master mixer, bass, treble, etc. That's all it
currently takes to get an OPL3-SAx card working on my system, if you have
any other problems, email me.

Scott

--
=============================================================================
Scott Murray                                       email: scottm@interlog.com
http://www.interlog.com/~scottm                     ICQ#: 10602428
-----------------------------------------------------------------------------
     "Good, bad ... I'm the guy with the gun." - Ash, "Army of Darkness"

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/