The following document is provided AS-IS without any warranty of any kind.
Permission is granted to distribute this document in any form as long as this
notice remains intact. Permission is also granted, and encouraged, to make
derivative works from this document as long as this notice remains intact.
12/29/1998 Aaron Kuhn (akuhn@usa.net) 

-------------------------------------------------------
Linux, Windows 95, and your Yamaha OPL3-SA2 based card

	You may have seen my previous posting here about my Yamaha-OPL3SA2
soundcard. Well, after having to reconfigure my system again, I realize what
I wrote was total incoherent babble. I've also figured out a thing or two
since
then. So I now present a more structured guide to how I got my soundcard
working.

The important things bout my system you need to know:
Tekram P5T30-B4 motherboard with Award 4.51G BIOS
Yamaha-OPL3SA2 based soundcard (only mention of a company I can begin to
locate is "Juster Multimedia" on the box)
Red Hat Linux 5.1 with 2.0.36 kernel
Windows 95 OSR2

	If your system configurations anything like mine, hopefully this will
help. My problem with my soundcard was that it'd work in Windows 95, but not
in Linux. 

	The first thing you should know about these soundcards in Linux is
they're not going to work as Soundblaster/Soundblaster Pro clones. The cards
use the OPL3-SA2 chip which is basically a smorgasbord of audio technology
slapped onto one chip. Not a smart way to make a card, but it's cheap. To
sucessfully get it working in Linux, the card will have to be setup as a
Windows/Microsoft Sound System Device <- (shudder).  Anyhow, here's the basic
steps to making this happen

In my BIOS under the PNP device configuration, I have set:

PnP OS Installed: No
Resources controlled by: Manual

I'm using the Linux 2.0.36 kernel with the OSSFree 3.8s9 drivers. 

The most important settings on my soundcard are:
220 (SoundBlaster Pro function of the chip, doesn't do a damn thing in Linux)
530 (Windows Sound System - ding ding! This is what we want)
388 (MPU-401 also wanted)
Primary DMA 0
Secondary DMA 1

Now, this is all pretty standard and things, so you ask, why don't I just
compile my kernel with that? Well, the problem is the card's on IRQ 5. The
OSSFree drivers only support IRQ's 7, 9, 10, 11. Solution to this problem?
Windows 95. While I'm sure you can use isapnp to do the same thing I'm about
to descibre below, I had to use Windows.

In the device manager setup for your card, you should make sure the Automatic
Configuraiton box is UNCHECKED! Windows just LOVES to hijack settings, so
we're not going to let it. After unchecking this box, you should be able to
simply double click the Interrupt setting and change it. You may have to
change your card to "Basic Configuration 002" which is what I had to. It
didn't seem to want to let me change anything if I had 000 or 001.

Ok, now that we're all set there, exit out of tbe device manager. 'Would you
like to reboot?" Yep, you want to.

Pay careful attention to the PnP device listing your BIOS spits out, the IRQ
and DMA settings on this list should match what you used in Windows.

If all is good, edit your /etc/isapnp.conf. (Oh yeah, I did mention you need
isapnptools?) Uncomment the correct settings for the first device function on
the card and uncommrnet (ACT Y). The rest of the device functions below the
audio handle the onboard IDE on my card, and a bunch of other stuff that
was thrown on the card which I don't use so I really don't care what they are.

In your kernel config selection (I use menuconfig, so adapt as neccessary my
instructions) you want to goto the sound submenu. The following are checked
for me:

[*] Sound Card support
[*] Generic OPL2/OPL3 FM Synthesizer support
[*] MPU-401 support
[*] Microsoft Sound System support
[*] FM Synthesizer (YM3812/OPL-3) support

Below those, you should see the places to enter the values in for the various
settings. Plug in your MS/WSS interrupt (530 for me) and the IRQ (for me,
9) Your MPU-401 should be set to whatever is applicable for the card (330
here) and the IRQ will be the same as the MS/WSS selection.
Use OSSFree3.9 in kernel

From here you should compile the kernel, install it, and reboot. If your
lucky, you'll have sound. If not, keep trying ... or spend $20 for OSS, it
will save you a lot of hassle.
