Jump to content

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

AppleHDA AMD ATI Chipset nVidia chipset HDMI DSDT Codec Dump VoodooHDA

  • Please log in to reply
165 replies to this topic

#1
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,894 posts
  • Gender:Male
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: Attached File  DSDT.zip   11.67KB   62 downloads

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.n...ts/dpcimanager/ (credits to SJ_UnderWater)
- Radeon Bios Decode: http://www.insanelym...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!

#2
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,614 posts
  • Gender:Male
  • Location:Brazil
Any help is welcome
Analyze the files and we will walk together in this challenge.
Andy has done something here: http://www.insanelym...n-1082-version/
Your help is welcome for us.

#3
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,894 posts
  • Gender:Male
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.insanelym...-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.insanelym...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!

#4
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,614 posts
  • Gender:Male
  • Location:Brazil
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)

#5
SS01

SS01

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 265 posts
  • Gender:Male
  • Location:Ottawa
I'm not sure I understand here. You want us to post vanilla DSDTs, or try to patch them and then post?

#6
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,894 posts
  • Gender:Male
Yes, including (but not limited to) trying to patch your DSDTs and AppleHDA so we can compare results and exchange information. :)

#7
SS01

SS01

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 265 posts
  • Gender:Male
  • Location:Ottawa
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.

#8
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,614 posts
  • Gender:Male
  • Location:Brazil
I will make other changes in kext
and I'll post it for you to test TheConnactic.
I left her to codec_dump
Andy analyze.

#9
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,894 posts
  • Gender:Male
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!

#10
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,614 posts
  • Gender:Male
  • Location:Brazil
Hello TheCoannactic
To know the video card Geforce GT620 (Manufacturer EVGA)
HDMI audio work like a charm in 10.8.3.
Needing only editing the DSDT.Posted ImagePosted Image

#11
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,894 posts
  • Gender:Male
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!

#12
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,614 posts
  • Gender:Male
  • Location:Brazil
hi
TheConnactic
Try this man: http://www.sendspace.com/file/6z0dqz

#13
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,894 posts
  • Gender:Male
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: Attached File  Screen Shot 2013-03-21 at 3.53.23 PM.png   322.56KB   25 downloads

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

3) AppleHDA extension not loaded: Attached File  Screen Shot 2013-03-21 at 3.54.46 PM.png   350.59KB   16 downloads

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

Thank you again!

All the best!

#14
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,614 posts
  • Gender:Male
  • Location:Brazil
Try this if the kext does not load try to load it manually
changes I'm making are in PathMaps
I believe they may be wrong.
http://www.sendspace.com/file/5g7w9j

#15
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,894 posts
  • Gender:Male

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: Attached File  Screen Shot 2013-03-22 at 11.34.08 AM.png   354.2KB   22 downloads

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

3) Still, it reports more details about HDMI connection: Attached File  Screen Shot 2013-03-22 at 11.33.31 AM.png   188.94KB   21 downloads

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

5) IOReg reports both HDEF Attached File  Screen Shot 2013-03-22 at 11.40.11 AM.png   180.29KB   29 downloads and HDAU Attached File  Screen Shot 2013-03-22 at 11.40.37 AM.png   180.38KB   26 downloads

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): Attached File  IOREG.ioreg.zip   499.63KB   3 downloads

All the best and thank you very much again.

#16
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,614 posts
  • Gender:Male
  • Location:Brazil
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.

#17
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,894 posts
  • Gender:Male
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.

#18
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,614 posts
  • Gender:Male
  • Location:Brazil
hi, TheConnactic


t's always good to have good news!
I'm sending in another kext version of Mountain Lion.
test and let me know the results.
We can inject the values ​​of your graphics card through DSDT.
send me
ioreg and your current dsdt.
http://www.sendspace.com/file/naxn1m

P.s: Layout is 1 In patch HDEF.

#19
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,894 posts
  • Gender:Male

P.s: Layout is 1 In patch HDEF.


Hi, Mirone!

Just to be sure, i must change the layoutID in my DSDT HDEF entry to 1, right?

All the best!

#20
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,614 posts
  • Gender:Male
  • Location:Brazil
yes, TheConnactic





Also tagged with one or more of these keywords: AppleHDA, AMD, ATI Chipset, nVidia chipset, HDMI, DSDT, Codec Dump, VoodooHDA


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy