BBS水木清华站∶精华区

发信人: mephisto (鬼呀!), 信区: Linux 
标  题: 如何玩声卡和网卡。 
发信站: BBS 水木清华站 (Mon Dec  7 01:36:33 1998) 
很对不起, 我的中文敲得太慢。后面全用英文了。 
我看了一下本版大多数文提都是网卡声卡地问题。我总结一下三板斧吧。 
1。确定芯片类型.找出对应地module. grep the source tree if needed. 
e.g.: I can read ESS-1688 on the chip of that card. So 
cd /usr/src/linux/driver/sound 
grep ESS *.c 
grep 1688 *.c 
you will locate the sb.c, so sb.o will respone for it. 
 
2. Try to get the io address and irq for your card. 
Some pci card will have some problem if the BIOS pic setion did not set  
correctly. Watch clearly when it boot, most Pentium board will report 
which irq the card was using. 
The io address is more important than the irq. Most card can auto detect 
the irq if you set the base io addess correctly. You can copy the io from 
windows setting if the card was not a pnp one. Pnp one will have some extra 
work to do with it. There are some pnp package to set the io and irq. 
In TurboLinux it was "turbopnpcfg". 
 
3. Try to install it. 
You did not need to recompile the kernel all the time. By default, Redhat 
and TurboLinux have already set all the thing in module correctly. Just 
go to /lib/modules/2.0.X/... to find your module. If you do all the things 
right and you can't install the module. Recompile the kernel will not help 
you, just make it worse. 
Some useful files and command: 
lsmod       // to watch which modules have been installed. 
ksyms       // to watch which symbles have been exported in module or kernel 
rmmod       // to remove the module. This will fail if you are using this mod 
insmod      // This one will try to install the module 
modprobe    // Also try to install the module 
// The modprobe do more works than insmod. modprobe will try to probe some 
// io address by default. But insmod just works on the io address you give 
// it. And modprobe will try to install other module which was needed by the 
// one you are installing.  
// e.g. : 
"modprobe ne" will auto load "8295.o" ( I am not sure about the name) 
but "insmod ne" will report : (if did not install 8295.o before) 
xxxx symble not found. 
XXXX symble not found. 
  
You will like to use modeprobe than insmod. Sometime modprobe will do 
something overhead and make something wrong, but it seldom happen. 
 
4. How to know you have installed your module correctly. 
Try to cat those files: 
/proc/io*      // If you can find your card list in the file, 
/proc/int*     // your card is very possbile working now. 
for the sound card (ISA): 
/dev/sndstat    // will report the sound device state 
                // did not work for PCI cards. 
 
5. PCI device 
Most pci device donot need to give the io address and irq. The module 
can read this infomation in the PCI configure space. But you can cat 
/proc/pci 
to find your card. It might give some hits which module should you use. 
The pci file know about your card did not mean the kernel can support it. 
 
-- 
约塞连怀疑地摇了摇头,拒绝接受丹比的劝告."当我抬起来时,我看到人们全在设法赚钱.我 
看不见天堂,看不见圣人,也看不见天使.我只看见人们利用每一次正当的冲动和每一场人类 
的悲剧大把大把地捞钱." 
 
※ 修改:·mephisto 於 Dec  7 01:39:33 修改本文·[FROM: ab1-84.bjnet.ed] 
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: ab1-84.bjnet.ed] 

BBS水木清华站∶精华区