手动补丁AppleHDA.kext解决声卡问题(完成中)
献给喜欢折腾且声卡无法驱动的朋友们。对动手能力要求较强。
附件有些太大,我没法上传,看版主能否修改下我的上传限制。
说明:这种颜色是我的注释
本文基于AppleHDA.kext的10.5.5版本,因为它已经是最新的了。
需要准备的东西:
附件:HexEditor: http://forum.insanelymac.com/style_images/insane2/folder_mime_types/dmg.gif HexEdit_220.dmg ( 525.8K ) 太大,上传不了。
附件:Plist Editor: Property_List_Editor.zip
附件:AppleHDA.kext: http://forum.insanelymac.com/style_images/insane2/folder_mime_types/zip.gif AppleHDA.kext.zip ( 516.61K )太大,上传不了。
PlatformPlugin 和 Controler 插件的通用plist文件
附件:Platform_Controler.zip
你自己的Linux的解码器信息文件
导出方法:
cat /proc/asound/card0/codec#0
(根据实际情况,数字可能有不同)
(听说可以通过Taruga的HDAudio.kext导出,我没试,作者也没试。。。)
开始折腾:
知己知彼才能胜券在握:
AppleHDA 提供哪些解码器呢?参考codecs.rtf
附件:codecs.zip
以下是测试用的音频解码器信息:
Test codec
名字: ALC880
十进制 : 283904128
十六进制: 0x10ec0880
Hexedit 中的顺序(高低字节倒序): 8008EC10
第一步
使用Hexedit编辑AppleHDA的二进制文件(执行文件)
二进制文件在 AppleHDA.kext中 (~/AppleHDA.kext/Contenst/MacOS/AppleHDA)
用HexEdit打开AppleHDA,找到一个与你的解码器最相近的。
最好的方法是从ALSA源代码patch_realtek.c.txt中查找你的声卡信息。
(如果你足够幸运,AppleHDA直接支持你的声卡,你就只需要配置plist文件了。)
作者想替换ALC0262的ID成 ALC880的,
做法是,搜索ALC0262的ID 10EC0262 ,并替换成8008EC10(没提及几个,我搜索到了两个)。
另外:尝试不同的解码器。10ec0880 也支持西格玛解码器(Sigmatel)。所以,不要随便放弃,多尝试(偶的D630声卡的就是Sigmatel的,且网上提供的codec没法用。。。看样子只能手工折腾了。=_=`)。
第二步:
修改完AppleHDA后,就是建立一个可用的PlatformDriver.plist文件。
作者给我们提供了一个通用的模板。
怎么建立 Platform 的说明: http://forum.insanelymac.com/style_images/insane2/folder_mime_types/zip.gif Platform.zip ( 489.86K ) 暂时不上传。
第三步骤:
- Contorler.plist
设置CodecID为你的解码器ID,十进制哦。设置LayoutID为12。
PinConfigDefault 中什么都不填。
(最好能知道你实际的 PinConfigDefault 号码, 可以通过注册表编辑器, 或者从Linux中dump出来 (thx Kabyl and The King on this one).
交换Controler插件中的 Contorler.plist 为 Info.plist
~/AppleHDA.kext/Contenst/PlugIns/AppleHDAController.kext/Contenst/Info.plist
重命名 Controler.plist 为 Info.plist!
http://forum.insanelymac.com/index.php?act=attach&type=post&id=34944
现在,可以充满希望的重启系统并等待声音了。
注:Change in Controler plist are crucial,but U can boot with yourAppleHDA.kext with only this informations in HDAController plist file,but System profiler will not show your inputs.
To change from HEX to DECIMAL use Calculator in Applications.
AndU have to use HDAEneabler(If U have Intel chipset) or EFI string foryour HDA to load, it is better to use HDAEneabler, coz it setsClassMatch HDA value for Controler.plist.
After all this U have a working latest HDAkext for alc880:
http://forum.insanelymac.com/style_images/insane2/folder_mime_types/zip.gif AppleHDA880.zip ( 481.72K )Number of downloads: 525
How to read your codec dump
I will Use a codec dump from user adat6 and try to explane how to find
a pins inside codec dump. And hopefully U will find yours inside your dump
http://forum.insanelymac.com/style_images/insane2/folder_mime_types/txt.gif atad6.txt ( 8.07K )Number of downloads: 562
How to codec dump: http://forum.insanelymac.com/style_images/insane2/folder_mime_types/zip.gif Codecdump.zip ( 4.28K )Number of downloads: 283
How to PinConfig, PinConfigDefault or PinConfigOverRides
U can obtain this PinConfig thru Vista registry explorer.
Click on:
START
RUN
and write: regedit (this will start registry explorer)
Search for PinConfig, and U will get something like this:
http://forum.insanelymac.com/style_images/insane2/folder_mime_types/rtf.gif VistaRegEdit.rtf ( 1.51K )Number of downloads: 445
Then as user idoc said: "strip out the junk!"
f01c2701111d2701 111e2701 411f2701 f01c3701 111d3701 111e3701 411f3701 1f1c4701101d4701 211e4701 021f4701 101c5701 011d5701 131e5701 991f5701f01c6701111d6701 111e6701411f6701 401c8701981d8701 a11e8701021f8701411c9701091d9701 a31e9701991f9701 4e1ca701301da701 811ea701021fa701f01cc701111dc701 111ec701411fc701 2d1cd701951dd701 171ed701401fd701301ce701111de701 451ee701021fe701
then you have to byte flip each double word;
<01271CF001271D11 01271E11 01271F41 01371CF0 01371D11 01371E11 01371F41 01471C1F01471D10 01471E21 01471F02 01571C10 01571D01 01571E13 01571F99 01671D1101671CF0 01671F41 01671E11 01871D98 01871C40 01871F02 01871EA1 01971D0901971C41 01971F99 01971EA3 01A71D30 01A71C4E 01A71F02 01A71E81 01C71D1101C71CF0 01C71F41 01C71E11 01D71D95 01D71C2D 01D71F40 01D71E17 01E71D1101E71C30 01E71F02 01E71E45>
And after U done this go here so The King can tell U what to do with PinConfig:
PinConfig How to; The King aka XyZ:
Next... how to overide your BIOS with HDAVerbs... and get any card to work
Amade this guide for people who cards are not supported by HDA patcherfrom Taruga, like mine card ALC880, this guide could be alternative. Idon't know what cards are working U will have to try on your one.
If U found this guide useful, I am glad.
IfU ask for help, and want to post a codec dump or registry dump fromwindows, please post them in text format as atachment. It is easier forevery one.
Related stuff
AppleHDA collection and knowledge base from The King aka XyZ:
Anemic sound from limini:
[ 本帖最后由 Bambo 于 2008-12-15 19:01 编辑 ] 等待全部翻译完,谢谢~ 实在是看不懂...等我什么字典都不用.把这篇看完.四级就过了.. 很长,不是很明白 这个方法我试过,不过失败了。楼主,这个问题可没有你想象的那样简单哦。 原帖由 lihaoyong 于 2008-12-15 16:43 发表 https://bbs.pcbeta.com/images/common/back.gif
这个方法我试过,不过失败了。楼主,这个问题可没有你想象的那样简单哦。
我步这么认为啊,肯定有哪里没做好。
AppleHDAPatcherv1.20 就是这个原理做的,只是自动化而已。 BAMBO,要不我把笔记本拿到你家,你帮我搞一下,我想我的HDA声卡6PORT关机断电,反正我时不时要去五羊新城的 原帖由 pippo_choi 于 2008-12-15 18:36 发表 https://bbs.pcbeta.com/images/common/back.gif
BAMBO,要不我把笔记本拿到你家,你帮我搞一下,我想我的HDA声卡6PORT关机断电,反正我时不时要去五羊新城的
汗死。。。我还弄了个翻译英文文档的工作,已经忙不开了。。。
而且,我换的D630关机不断电的问题也在继续。。。。
而且,每周要加三天班,其中包括一个周六。。 纯技术文档,虽然看得头晕眼花,还是要顶。 仰慕下,期待实际教学 不知有没有COMPAQ的用户啊~~试过有没有用~CONXEANT的声卡 花了一下午的时间尝试ALC883
结果是可以识别硬件但是不管扬声器还是耳机都没有声音
囧
第一步Patch AppleHDA我做了
前后分别替换了ALC262和ALC888的都不行
第二步弄Controler.plist和Platform.plist
我用了我从Ubuntu下Dump出来的Codec找到了对应的NodeID(基本和insanely mac上差不多)
分别替换了硬件ID的二进制码
然后还从Vista下找到了对应的PinConfigData(一共48x8位也就是12种组合)填到本建议为空的项里
PS.这个地方我尝试了3种组合一个是01....一个是21....一个是全部
第三步替换并重命名然后分别放到AppleHDA.kext下的AppleHDAController.kext和ApplePlatformDriver.kext下的info.plist
同时加入HDAEnabler.kext到Extensions目录下(不加这个硬件都识别不到没有声音图标)
保存修复权限
重启
最后
以上所有努力都以失败而告终
然后上Insanely Mac下了桌面版完美的ALC883也尝试了几种组合均无功而返
我基本确信操作没有错误尤其是关于错位十六进制码的部分
放弃/sad.gif
[ 本帖最后由 HFlyindance 于 2008-12-15 23:39 编辑 ] 等待全部翻译完,谢谢~ 不太懂了 这个教程很早前就在在国外的一个论坛看到过,可是我没成功,认出来的声卡ID不正确,无论我用什么方法取得的CODEC都没用……放弃了,还是老实用那个什么azila什么的驱动好了。
回复 1楼 Bambo 的帖子
还是看不懂呀。回复 1楼 Bambo 的帖子
又要下载,又要下载。 pb90 pb90 pb90 pb90看不懂~~!!太高深了 not sure if it works for my motherboard