LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: cobrawgl

解决 IBM Thinkpad600e 声卡问题的一个办法

[复制链接]
发表于 2004-7-29 19:46:20 | 显示全部楼层
最初由 cobrawgl 发表
我用的是默认的内核啊.

这样吧, 你先参考上面那篇 安装 slackware9.1 的文章.


我参考过了,唯一没有做的就是升级BIOS
一定要先升级吗?在哪里可以找到可靠的升级程序呢?
 楼主| 发表于 2004-7-29 20:27:43 | 显示全部楼层
最初由 xuyang 发表
我参考过了,唯一没有做的就是升级BIOS
一定要先升级吗?在哪里可以找到可靠的升级程序呢?


应该不必吧.

我的 FreeBSD 装上之后, 载入声卡的驱动就能有声音, 不知道你的是怎么回事.
发表于 2004-8-1 19:52:38 | 显示全部楼层

Try this

Firstly, sorry for using English 'cos I have no suitable XIM in hand. I am using another laptop with linux system, not my tp600e with freebsd.

IBM TP600E is a good box, needless to say. The sound card is cs4236 which has a problem on freebsd. I searched google and found some hardware expert pointed that out. So I followed their steps and fixed the problem. My system is 4.9 stable, and I think it will work under 5.2.1. (Do you really need a new tech on an old classical laptop? )

Step 1. in /sys/conf/files, find out the line
"dev/sound/pci/csa.c optional pcm pci"
comment it out, i.e., put a "#" before this line.
Then, find out the other line
"dev/sound/pci/csapcm.c optional pcm pci"
change it as:
"dev/sound/pci/csapcm.c optional csa pcm pci"

Step 2. change the kernel configure file, you'd better copy a new file from /sys/i386/conf/GENERIC, such as "/sys/i386/conf/newkernel"
add a new line in the configure file:
"device pcm0 at isa? port 0x52c irq 5 drq 1 flags 0x10"

Step 3. build the new kernel and reboot, you will find the pcm device boot OK message, that means the audio is OK. good luck.

Be care: Using the line of step 3 exactly.
发表于 2004-8-1 22:31:11 | 显示全部楼层

回复: Try this

最初由 hiker 发表
Firstly, sorry for using English 'cos I have no suitable XIM in hand. I am using another laptop with linux system, not my tp600e with freebsd.

IBM TP600E is a good box, needless to say. The sound card is cs4236 which has a problem on freebsd. I searched google and found some hardware expert pointed that out. So I followed their steps and fixed the problem. My system is 4.9 stable, and I think it will work under 5.2.1. (Do you really need a new tech on an old classical laptop? )

Step 1. in /sys/conf/files, find out the line
"dev/sound/pci/csa.c optional pcm pci"
comment it out, i.e., put a "#" before this line.
Then, find out the other line
"dev/sound/pci/csapcm.c optional pcm pci"
change it as:
"dev/sound/pci/csapcm.c optional csa pcm pci"

Step 2. change the kernel configure file, you'd better copy a new file from /sys/i386/conf/GENERIC, such as "/sys/i386/conf/newkernel"
add a new line in the configure file:
"device pcm0 at isa? port 0x52c irq 5 drq 1 flags 0x10"

Step 3. build the new kernel and reboot, you will find the pcm device boot OK message, that means the audio is OK. good luck.

Be care: Using the line of step 3 exactly.


首先非常感谢你!
我在google上也搜索到类似这个方法到帖子,但没有这一步:
"device pcm0 at isa? port 0x52c irq 5 drq 1 flags 0x10"
等有时间再按照你的方法试一下。
发表于 2004-8-4 19:52:20 | 显示全部楼层

That's all right

第三步是最重要的一步了, 否則前面改動的有什麼意義?
我的600e型號是2645-4AU, PII 366, 編譯用了18分鐘左右, 還算不慢.
发表于 2004-8-5 23:17:13 | 显示全部楼层

回复: That's all right

最初由 hiker 发表
第三步是最重要的一步了, 否則前面改動的有什麼意義?
我的600e型號是2645-4AU, PII 366, 編譯用了18分鐘左右, 還算不慢.


dmesg 信息:
pcm0: <CS423x-PCI> on isa0
device_probe_and_attach: pcm0 attach returned 6
unknown: <IBM0071> can't assign resources (port)
unknown: <NP0e03> can't assign resources (port)
unknown: <NP0680> can't assign resources (port)
unknown: <NP0680> can't assign resources (port)


因为我是使用FreeBSD5.2.1的,我把这个个配置
"device pcm0 at isa? port 0x52c irq 5 drq 1 flags 0x10"
翻译为:
hint.cs.0.at="isa"
hint.cs.0.disabled="0"
hint.cs.0.port="0x52c"
hint.cs.0.drq="1"
hint.cs.0.flags="0x10"

不知道这样处理是否有错误呢?
发表于 2004-8-6 14:16:50 | 显示全部楼层

一個好辦法

我用VMware裝的FB4.10, 一直沒有把聲卡搞定. 後?硐露Q心, 排除萬難, 在google上面找了一下, 終於找到了一個100%方法確認聲卡驅動, 裝載聲卡驅動的方法. 合大家分享:

Enabling sound on FreeBSD 5.x[zz]
There are two methods for enabling sound support on FreeBSD 5.x: recompile the kernel to add the sound driver, or use kernel loadable modules.

Regardless of which method you end up using, I recommend that you start with the modules. It will usually take a couple tries to find the correct sound driver and settings, and having to recompile a new kernel and reboot after each change is a royal pain. Much simpler / faster to just load / unload various modules until you find the right combinatoion.

To figure out which sound driver to use:

1. As root, load every single sound driver that FreeBSD supports and let the kernel try to detect your hardware:


# kldload snd_driver


2. Check the contents of the sndstat file to see if the kernel detected your hardware, and which driver it is using:

# cat /dev/sndstat


You should see something similar to:

FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <VIA VT82C686A> at io 0x1000 irq 5 (1p/1r/4v channels duplex default)


This tells you that it is using the NEWPCM architecture, that it is using the pcm sound driver, and that it detected a VIA VT82C686A sound chip.
3. Unload all the sound drivers:

#kldunload snd_driver


4. Load just the pcm sound driver:

# kldload snd_pcm


5. Check the contents of the sndstat file again to see if it identical to the output above. If so, then you have found the driver that needs to be loaded. If not, then you will need to experiment with other drivers until you find the correct one.
6. If the contents are identical, then check which sound modules the kernel loaded:

# kldstat


(I'd list a sample, but I'm not using modules right now as this is a laptop and I won't be chaning the soundcard anytime soon.)


If you want to continue to use the kernel modules, you will need to edit /boot/loader.conf and tell it which modules to load at boot time. To do so, open that file in your favourite text editor and add the following lines:

snd_pcm_load="YES"
snd_via82c686_load="YES"


IOW, put the kernel modules listed by kldstat followed by _load="YES". (For more info on loader.conf, read the man page and the comments in /boot/defaults/loader.conf.)

If you want to compile the sound drivers into your kernel, then you will need to edit the kernel config file and add device pcm. If it's an ISA sound card, you may need to add the sbc device as well.

Unlike FreeBSD 4.x, you don't set the IRQ, DMA, or IO info directly in the kernel config file. This information is stored in a separate text file: /boot/device.hints Read through the options listed in /usr/src/sys/conf/NOTES and add the relevant entries to the device.hints file.

To see which sound drivers the kernel supports try the following:

# ls /modules/snd_*


And the man pages for pcm(4), sbc(4), csa(4), and gus(4) also list the chipsets they support. These man pages also list how to set the IRQ, DMA, IO for ISA-based cards.

The nice thing about FreeBSD 5.x is that it supports the device filesystem (devfs) which will create the needed sound devices for you. If you load the sound modules than look in /dev, you'll see the dsp, audio, snd, and mixer devices appear. If you unload the sound modules, these device nodes disappear. Nifty, eh? And if you compiled the sound drivers into the kernel, these device nodes will appear at boot time.

Hope that helps you get sound working on your FreeBSD system. If you have any questions or comments, please post them here. Thanks.

[Edit: added missing snd_ to pcm driver]

我用上面的方法搞定了主板自帶的AC97聲卡. 很好用的.
发表于 2004-8-6 22:19:04 | 显示全部楼层
从你的dmesg来看,硬件还是没驱动起来。你重新编译内核了吗?好象你只改了配置文件。按照前两步列的步骤,新内核应该认出声卡是CS4236。我的机器启动时在这一项上的信息是:

pcm0:<CS4236> at port 0x52c-0x533, 0xf8c-0xf94, 0xe0e irq 5 drq 1 flags 0xa110 at isa0

5.2.1是否又有什么新变化,不是很清楚。我不懂硬件,对他列的硬件新特性不明白。4.9是稳定版,我装上后感觉还可以,什么U盘啦,USB接口的移动硬盘啦,USB接口的移动光驱,都能用。至于软件,4.9的包似乎和5.2.1的包同样新,XFree86是4.3版的,KDE是3.1.4,没什么太大区别。

建议你还是找个4.9装上好了,许多问题都有答案。也不差哪。
发表于 2004-8-7 11:47:38 | 显示全部楼层
最初由 hiker 发表
从你的dmesg来看,硬件还是没驱动起来。你重新编译内核了吗?好象你只改了配置文件。按照前两步列的步骤,新内核应该认出声卡是CS4236。我的机器启动时在这一项上的信息是:

pcm0:<CS4236> at port 0x52c-0x533, 0xf8c-0xf94, 0xe0e irq 5 drq 1 flags 0xa110 at isa0

5.2.1是否又有什么新变化,不是很清楚。我不懂硬件,对他列的硬件新特性不明白。4.9是稳定版,我装上后感觉还可以,什么U盘啦,USB接口的移动硬盘啦,USB接口的移动光驱,都能用。至于软件,4.9的包似乎和5.2.1的包同样新,XFree86是4.3版的,KDE是3.1.4,没什么太大区别。

建议你还是找个4.9装上好了,许多问题都有答案。也不差哪。


我已经重新编译过内核了。
我用FreeBSD5,也是因为我的IBM和Realtekl网卡在FreeBSD4下不认才用的。
在FreeBSD5中,内核的配置方法有所改变,直接这样写:
"device pcm0 at isa? port 0x52c irq 5 drq 1 flags 0x10"
编译时会报错。所以必须使用新的方式,也就是把参数的改变写到device.hints中。
所以我这样写:

THINKPAD.hints:
-------------------------
hint.cs.0.at="isa"
hint.cs.0.disabled="0"
hint.cs.0.port="0x52c"
hint.cs.0.irq="5"
hint.cs.0.drq="1"
hint.cs.0.flags="0x10"

THINKPAD:
-------------------------
hints           "THINKPAD.hints"
device        pcm

/usr/src/sys/conf/files:
-------------------------
#dev/sound/pci/csa.c        optional pcm pci
#dev/sound/pci/csapcm.c  optional pcm pci
dev/sound/pci/csapcm.c    optional csa pcm pci

然后

make buildkernel KERNCONF=THINKPAD
make installkernel KERNCONF=THINKPAD
reboot

其实从dmesg看,比起以前已经变了一点了,起码有这一句:

pcm0: <CS423x-PCI> on isa0

我猜测是device.hints写错了,可能“hint.cs.0”不是我的声卡。
另外,hiker兄的办法,在FreeBSD4上面是可以的
发表于 2004-8-7 20:50:20 | 显示全部楼层
哦?那不妨試一下hint.pcm.0,?"device pcm..."?砜矗撀暱ㄔO備應該指的是pcm,而不是cs,雖然這款聲卡被稱做cs4236。

如果還不行,那最好找硬件專家問一下,就是在4.x下寫驅動方法的家伙。我印象他好象是freebsd.org組織裡的人,客氣點,一般人家會告訴你方法的。我用的IBM NE2000兼容網卡在4.9下支持沒問題。RealTek 8139也是一塊很普通的網卡。你想用600E做網關?要是真做的話,沒必要驅動聲卡,又不是?碜鲎烂妗
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表