Linux 版 (精华区)
发信人: kevin (小鬼), 信区: cnlinux
标 题: Opti931 Mini HOWTO
发信站: 哈工大紫丁香 (Tue Jun 15 19:00:58 1999), 转信
发信人: reden (鱼 ~ 憧憬着风花雪月), 信区: Linux
发信站: BBS 水木清华站 (Fri Sep 18 01:00:50 1998) WWW-POST
Note: Better View in WWW
OPTi931 Mini-HOWTO
Last Updated: May 23, 1998
Preface:
After buying a cheap $14.99 (Labled "ExpertColor Multimedia" on the box)
sound card from Fry's Electronics, I couldn't for
the life of me get sound to work in Linux. I searched through DejaNews and
joined the linux-sound mailing list, but all I could
find were people attempting to set it up, and for the most part, being
unsuccessful or only partly successful. I finally got it to
work with the help of a few others.
Here are the steps I took to get the OPTi931 working under Linux.
1. Easy Way Out:
If you're just looking for an easy way out, just go out and buy the driver
from Open Sound System driver from 4Front
Technologies. Make sure sound is disabled in your kernel, run their program
and voila! You have sound! This is super easy but
costs $20 if you plan on using it for any amount of time. Personally, I'd
rather hack it and get it working the right way (and for
free!) If you were only willing to spend $10-20 on an Opti931 sound card,
you're obviously too cheap to get a decent sound
card or buy the $20 driver, so read on and learn how to set the card up
properly. ;-)
2. Configuring/Compiling the Kernel:
These directions apply only to kernel versions 2.0.X. I have recently
upgraded to the latest development kernels, and the
installation routine there is slightly different. Refer to my OPTi931 on
2.1.X page to set it up there.
Compile sound as a module. I prefer to use xconfig when configuring. Here's
the options needed. I'm using kernel 2.0.33 with
OSS Free sound drivers. The current drivers in 2.0.33 is apparently almost 2
years old! Grab the latest sound drivers from the
OSS Free Homepage. I also have the OSS sound drivers available.
M Sound card support
Y Generic OPL2/OPL3 FM synthesizer support
Y MPU-401 support (NOT for SB16)
Y Microsoft Sound System support
Y FM synthesizer (YM3812/OPL-3) support
330 I/O base for MPU401 Check from manual of the card
5 MPU401 IRQ Check from manual of the card
530 MSS/WSS I/O base 530, 604, E80 or F40
7 MSS/WSS IRQ 7, 9, 10 or 11
0 MSS/WSS DMA 0, 1 or 3
1 MSS/WSS second DMA (if possible) 0, 1 or 3
I recommend that you use the same settings as me. Change the configuration of
your other cards if necessary. You'll find out
why later. Then do you standard make dep; make clean; make zlilo if
necessary. If you didn't have sound compiled in your
kernel you don't need to do this, and you just need to do a make modules;
make modules_install.
Update:I have learned how to setup the Opti under different IO ports and
IRQs. So you can now use any settings you wish.
3. ISAPNPTOOLS:
Next step is to download and run isapnp. Grab the latest version here. Then
go to their website and read about it. I also have
version 1.14 available on my server. Basically, the documentation tells you
to run these two commands after compiling and
installing the source.
> pnpdump > isapnp.conf
You need to then modify the isapnp.conf file to reflect the configuration
used when making your modules. The most inportant
thing to change is to add this line to your config file.
(CSN 1 (LD 0 (REG 2 (POKE 4))))
This line turns off PnP control of the card, so that we can configure it.
Take a look at my isapnp.conf if you're confused and
need a little guidance. When you're done, put it in /etc dir.
Now run
> isapnp /etc/isapnp.conf
and you'll get some confirmation. I get
Board 1 has Identity 74 ff ff ff ff 31 09 14 3e: OPT0931 Serial No
4294967295 [checksum 74]
4. Writing the configuration to the OPTi931
We're almost there! We need to compile and run this little program. Here's
the source code and binary. Thank Donald M
Burns for this nifty little program. Visit his OPTi931 homepage for some
information on the Opti931 and his program.
Basically, this program writes the OPTi931 configuration. Here's the command
line to set the OPTi931 to the settings
described earlier (MSS io-530, irq-7, dma-0, MPU-401 io-330, irq-5):
To compile the source, use any compiler (I used gcc) and compile it like
this:
> gcc -o OPTi83C931 OPTi83C931.c
and then run it.
> OPTi82C931 0 0x07 1 0x07 3 0x09 4 0x14 5 0x3E 6 0x92
Here's the output from this program:
MCR0 <- 07 MCR1 <- 07 MCR3 <- 09 MCR4 <- 14 MCR5 <- 3E MCR6 <- 92
Update: I just learned how to setup different I/O ports, IRQs and DMAs.
Here's how it works. Notice how the command line
args to the OPTi82C931 program come in pairs. For instance "0x07 1" sends
0x07 to MCR 1. In this case 0x07 corresponds
to WSS I/O 0x530. Here's a table of the corresponding values. I still don't
know what the first MCR 0, 4, and 5 do, so just
set them to the values that I use for now. Don't forget to recompile your
sound module with the appropriate values!
MCR 1 (WSS I/O)
I/O args
0x530 0x07
0xE80 0x17
0xF40 0x27
0x640 0x37
MCR 3 (WSS IRQ/DMA)
IRQ/DMA args
5/0 0x29
5/1 0x2A
5/3 0x2B
7/0 0x09
7/1 0x0A
7/3 0x0B
9/0 0x11
9/1 0x12
9/3 0x13
10/0 0x19
10/1 0x1A
10/3 0x1B
11/0 0x21
11/1 0x22
11/3 0x23
MCR 6 (MPU401 I/O/IRQ)
I/O/IRQ args
300/5 0xF2
300/7 0xFA
300/9 0xE2
300/10 0xEA
310/5 0xD2
310/7 0xDA
310/9 0xC2
310/10 0xCA
320/5 0xB2
320/7 0xBA
320/9 0xA2
320/10 0xAA
330/5 0x92
330/7 0x9A
330/9 0x82
330/10 0x8A
5. Load the sound module
Finally, load the sound modules by typing 'insmod sound' and you should have
sound! View /dev/sndstat with 'cat /dev/sndstat'
and verify that you have actually successfully loaded the sound drivers. You
should get something similar to this.
OSS/Free3.8s5-971223 (Fri Jan 9 11:39:17 PST 1998 root,
Linux dt063n0d 2.0.33 #2 Sat Jan 3 00:13:35 PST 1998 i586 unknown)
Load type: Driver loaded as a module.
Kernel: Linux dt063n0d 2.0.33 #2 Sat Jan 3 00:13:35 PST 1998 i586
Config options: 0
Installed drivers:
Type 10: MS Sound System
Type 27: Compaq Deskpro XL
Type 1: OPL-2/OPL-3 FM
Type 5: Roland MPU-401
Card config:
MS Sound System at 0x530 irq 7 drq 0,1
Roland MPU-401 at 0x330 irq 5 drq 0
OPL-2/OPL-3 FM at 0x388 drq 0
Audio devices:
0: MSS audio codec (82C930) (DUPLEX)
Synth devices:
0: Yamaha OPL-3
Midi devices:
0: MPU-401 0.0 Midi interface #1
Timers:
0: System clock
Mixers:
0: MSS audio codec (82C930)
Most importantly, you should see a device under each device. If not,
something's gone wrong! Unfortunately, it's tough to get it
half-way right, it's usually only all or nothing! Also note that I'm using
the OSS Free sound drivers. I'm just about positive that
these aren't required, but it was one of the things I tried in my search to
get the OPTi931 working! They are included in the
latest 2.1.XX kernels. However, if you can't get the OPTi931 working without
them, you can find them at the OSS Free
homepage Don't forget to email me so I can make the necessary mods to this
page!
Well, I hope this has helped. If you have problems, you can try asking me,
but I may not be of any help. The linux-sound
mailing list (send mail to majordomo@vger.rutgers.edu to subscribe) is a
great resource where I found much of the information
necessary to write this page.
David Rees
http://oto.dyn.ml.org/~drees
--
白马带著她一步步的回到中原。白马已经老了,只能慢慢的走,
但终是能回到中原的。江南有杨柳、桃花,有燕子、金鱼……
汉人中有的是英俊勇武的少年,倜傥潇洒的少年……但这个美
丽的姑娘就像古高昌国人那样固执:
「那都是很好很好的,可是我偏不喜欢。」
--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: bbsroxette.bbs@bbs.n]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:206.955毫秒