Jump to content

Thoughts about AppleHDA patching on AMD hardware (ATI chipsets, nVidia)


theconnactic
 Share

166 posts in this topic

Recommended Posts

After a painful waste of all my last weekend trying to patch AppleHDA for the Via-VT1705 codec of my motherboard, with the help of Mirone, a very experienced person when patching HDA is concerned, we had to gave up: we finally hit a brick wall, where no advancement was being done.

 

The research we made for the patch, yet ending in failure, revealed a important caveat: almost all guides for binary and DSDT patches aiming a full working AppleHDA are meant for Intel chipset motherboards (there are in fact a few resources for nVidia chipsets). We AMD users have been left at the mercy of VoodooHDA development. While VoodooHDA surely works (in fact, i have to use it to finally have onboard audio), this is far far from an optimal solution: there are lots of reports of poor quality sound, noise and system instability.

 

VoodooHDA, if it doesn't enable our HDMI ports out of the box, won't enable it at all, and Intel users on Mountain Lion can always resort to many DSDT edition guides for HDMI fix, even without working onboard audio. That's not possible yet for us AMD users: the overwhelming majority of the DSDT patches available in the scene today doesn't blend well if our motherboards. In ATI chipset-based boards, southbridge and northbridge schemes appear in a completely different manner. With Lion, the situation is even worse: the successful DSDT patch, by itself, is not enough - AppleHDA must be properly recognizing and working with the onboard codec. But then again, many AMD-based boards, specially cheaper ones, use strange codecs, for which no support is provided.

 

We deserve better! So i think it's time to start AppleHDA and DSDT development targeting specifically our needs.

 

My resultant after these days of hard work and research, is attached. It still fails to enable AppleHDA sound and HDMI audio, but at least it loads the kext, and both AppleHDA (HDEF) and HDMI audio (HDAU) appear in IOReg. I made this DSDT replacing the SBAZ@14,2 entry by Toleda's HDEF DSDT patch, but keeping the original address instead of 1B. I added also the basic discrete graphics edit by Toleda, and renamed another SBAZ entry to HDEF. Then Apianti of projectosx cleaned it from warning and remarks. Mirone also made some edited DSDTs, trying to help me to have native audio, but since his DSDTs didn't perform quite well, i decided to attach my own: DSDT.zip

 

Mirone also made various binpatched kexts for my Via-VT1705 codec. Here's some links, if you want to play with them (all credits go straight to him, if some of them succeeds to give audio as is: he worked alone, and working hard, to "boldly go where no man has gone before"): http://cl.ly/1w0n2D3M1Y0A http://www.sendspace.com/file/nh8oc8 http://www.sendspace.com/file/7ji0tz http://www.sendspace.com/file/vvdzfj - his DSDTs are also attached in these links.

 

Tools recommended:

 

- DSDT Editor: http://www.insanelym...ttach_id=110472 (credits to El Coniglio)

- Ubuntu Live USB for CODEC dumps: http://www.ubuntu.co...tick-on-mac-osx

- Hex Fiend or any hex editor of your choice: http://ridiculousfish.com/hexfiend/

- IORegistryExplorer (affectionally called "IOReg"): http://www.osx86.net...ryexplorer.html

- Kext Utility: http://www.osx86.net....8_edition.html (credits to cVaD)

- DPCIManager: http://sourceforge.net/projects/dpcimanager/ (credits to SJ_UnderWater)

- Radeon Bios Decode: http://www.insanelymac.com/forum/index.php?app=core&module=attach&section=attach&attach_id=90340 (credits to bcc9)

 

All tools work in OSX. Let's start? :)

 

Notice that it's not expected that any of this files works at all: they're meant only as starting ground for R&D, and as guidelines for what to try (or not to try). Many thanks to Mirone, Toleda and Apianti.

 

Best regards!

  • Like 6
Link to comment
Share on other sites

Yes, Mirone: thank you very much for posting the link.

 

I tried earlier tonight to follow this guide (very informative and step-by-step, recommend to all): http://www.insanelymac.com/forum/topic/283754-patched-applehdakext-for-codecs-idt-92hd81b1x5-92hd91bxx-and-92hd87b24/

 

The problem is, the crucial step for enabling our codecs is patching the binary of the AppleHDA.kext (inside Contents/MacOS): this is where the guide fall short (i won't say it fails, because its a guide for enabling specific codecs and quite successful for them), because it relies on a script that use a static list of codecs, and so the guide doesn't teach us how to do the binary patch for unusual codecs.

 

There's other ways to patch the binary, like those in this topic http://www.insanelymac.com/forum/topic/280468-applehda-patching-in-mountain-lion/. But again, they rely on a previous knowledge of which natively supported codec has the closest pin configurations of the one that's the target of the patch.

 

I'll take a look on what Andy achieved.

 

Best regards!

Link to comment
Share on other sites

Regarding BinPatch, bcc9 has done an excellent job

we have to try to fix the bin in various codecs and not get stuck in

one only.

My tip is: 97430611 (via vt1705) on top of 8b19d411 (ADI 1984b)

97430611 or (via vt1705) on top of 8419d411 (ADI 1984)

Link to comment
Share on other sites

Clover bootloader removes the need for a patched DSDT on Intel. Maybe it works on AMD too?

 

Try installing the Intel AppleHDA patch for whatever your sound device is, but skip the DSDT and install Clover instead.

Link to comment
Share on other sites

Hi, Mirone!

 

Thank you very much! Once it's done, could explain here in the topic which changes did you make, and why? The idea is that this development benefits and clarifies things for all interested in fix things for the "exotic" AMD-related chipsets. :D

 

Again, thank you very much!

 

All the best!

Link to comment
Share on other sites

Cool! Thank you for posting this! :D

 

Unfortunately, any nVidia card is a no-go for now with AMD CPUs and Mountain Lion, because of a bug in the latest kernels. On my Intel rig, i use the Intel HD4000, alongside two nVidia discrete cards, for HDMI audio.

 

All the best!

Link to comment
Share on other sites

Hi, Mirone! Thank you very much, man! :D

 

Unfortunately it didn't work, and i repaired permissions and restarted my computer twice for the sake of double-checking. The effects i noticed:

 

1) The disappearance of HDEF from IOReg, that being replaced by a generic pci@14,2: Screen Shot 2013-03-21 at 3.53.23 PM.png

 

2) No sound (obviously) but also no audio device reported both in SysPrefs and SysInfo: Screen Shot 2013-03-21 at 3.53.57 PM.png

 

3) AppleHDA extension not loaded: Screen Shot 2013-03-21 at 3.54.46 PM.png

 

Could you please detail which changes did you make in both DSDT and HDA?

 

Thank you again!

 

All the best!

Link to comment
Share on other sites

changes I'm making are in PathMaps

 

Hi, Mirone!

 

I asked because i believe perhaps something in the DSDT you made is not blending well with my hardware. Why i say this? Well, i just tested your second test AppleHDA (by the way, thank you very much for going all the way again into this to help me) and got the same result: no HDEF, only a generic pci@14,2; no sound, no SysPrefs, no SysInfo, no HDMI option - and obviously this time i did what you said and load the kext manually.

 

But when i reboot back again with my own custom DSDT, the one i made during that research in Toleda's topic and it's attached on the first post of this one, see what happens:

 

1) SysInfo reports that the kext is loaded, automatically: Screen Shot 2013-03-22 at 11.34.08 AM.png

 

2) SysInfo reports a Intel High Definition device with Audio ID 12 and also the HDMI audio connected to my display: Screen Shot 2013-03-22 at 11.33.38 AM.png

 

3) Still, it reports more details about HDMI connection: Screen Shot 2013-03-22 at 11.33.31 AM.png

 

4) SysPrefs reports the HDMI device and only the HDMI device, the sound icon is greyed out: Screen Shot 2013-03-22 at 11.36.33 AM.png

 

5) IOReg reports both HDEF Screen Shot 2013-03-22 at 11.40.11 AM.png and HDAU Screen Shot 2013-03-22 at 11.40.37 AM.png

 

But despite all of this, no sound. :wallbash:

 

Is it possible to combine your work with the AppleHDA with my DSDT, which seems (but i may be wrong) closer to work on my hardware? Just in case, here's the resulting IOReg of your latest AppleHDA combined with my DSDT (that one attached on the first post): IOREG.ioreg.zip

 

All the best and thank you very much again.

Link to comment
Share on other sites

Within Applehda there is a folder called plugins,

try loading the kext AppleHDAHardwareconfig manually.

we are on track can bet.

I should calmly analyze your files

this weekend.

Note: This is a Lion Kext maybe that is the reason they are muted

I will correct a Mountain lion and try again.

  • Like 1
Link to comment
Share on other sites

Mirone, i think you should know: good news!

 

I spent a couple of hours trying to solve another issue with my HD5450, black screen upon wake, and in the process of researching about it, i decided to boot with the flags PCIRootUID=0 and GraphicsEnabler=No (which used to have the disadvantage of making the system reports my card as a HD5000 with a generic ATY framebuffer). The result of this? HDMI audio miraculously works with your kext, Lion as it may be! :D That means part of the battle is won! And, if HDMI audio is doable, now i'm absolutely confident internal audio also is. I don't know which of the flags did the trick, and i hope other HD5450 users, on both AMD and Intel rigs, can benefit from this finding (Intel users having the advantage of easier CODECs to patch for AppleHDA should benefit from it immediately).

 

All the best!

 

P.S.: as a side note, sleep and wake also works like a wonder! GraphicsEnabler=No + PCIRootUID=0 (i don't know if the ATI edits from my DSDT really have any role on it) just solved this issue for good.

  • Like 1
Link to comment
Share on other sites

Okay, Thank you! :)

 

Here's the results of the test:

 

I changed the value of the layout ID to 1 and installed the new AppleHDA with KextUtility, then repaired permissions, rebuilt caches and reboot with -f bootflag. When the computer started again, i had no sound, neither internal, nor the HDMI sound i had previously with the Lion AppleHDA/layoutID 12:

 

- looking at SysInfo/Extensions, i realized it wasn't loaded: Screen Shot 2013-03-25 at 1.36.49 PM.png

 

- then i loaded it manually using sudo kextload /System/Library/Extensions/AppleHDA.kext: Screen Shot 2013-03-25 at 1.39.15 PM.png

 

- but no change: no sound, no output is SysPrefs: Screen Shot 2013-03-25 at 1.35.47 PM.png

 

- or in SysInfo: Screen Shot 2013-03-25 at 1.36.08 PM.png

 

- Despite IOReg reporting HDEF@14,2 correctly, with layoutID 1: Screen Shot 2013-03-25 at 1.40.22 PM.png

 

Attached, the IOReg output: IOReg.ioreg.zip

 

All the best!

 

P.S.:

We can inject the values ​​of your graphics card through DSDT.

send me

ioreg and your current dsdt.

 

Here it is, mirone! Thank you: DSDT.aml.zip

Link to comment
Share on other sites

Hi guys I would love to get hdmi audio working on my hd4890. If I upload my dsdt and ioreg, could you try to fix it mirone?

 

Bitcore, the dsdt part you can easily do yourself. First, download DSDT Editor (link in the first post). Then, locate SBAZ in your dsdt and change it and all further calls for it to HDEF (use cmd+f, find-and-replace tool and be sure to replace all calls). Then, you'll need Toleda patches for Mountain Lion HDMI audio: do a quick google search for it. Least but not last, you have to patch your AppleHDA: perhaps this step is where someone might as well help you, if there's no already patched HDA for your CODEC. Then, what worked for me was the combination of patched dsdt + loaded AppleHDA.kext + GraphicsEnabler=No + PCIRootUID=0: don't know if the same recipe would do the trick for you, but let us know! :D

 

All the best!

Link to comment
Share on other sites

 Share

×
×
  • Create New...