Jump to content
theconnactic

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

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!

Share this post


Link to post
Share on other sites
Advertisement

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!

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

I'm not sure I understand here. You want us to post vanilla DSDTs, or try to patch them and then post?

Share this post


Link to post
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.

Share this post


Link to post
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!

Share this post


Link to post
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!

Share this post


Link to post
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!

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

TheConnactic

 

in your ioreg the Pincofigurations are not loaded,

will never sound this way we have to try to fix it

 

Hi, Mirone! Understand. Can this be fixed in the DSDT? Or must be a binpatch to the HDA?

 

All the best!

Share this post


Link to post
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?

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By MaLd0n
      Nehalem, SandyBridge, IvyBridge, Haswell, Broadwell     Skylake, Kabylake and Coffeelake is here http://www.insanelymac.com/forum/topic/321872-guide-sierra-on-gigabyte-mobos-serie-200-kabylake-dsdt/   First...   ***Update bios to last available version!***   If you need a full patched DSDT...  -Extract tables with F4 key in Clover boot screen! -Run it and send me files! RunMe.app   Installation   --Create a bootable copy of macOS Sierra Check out the link http://www.insanelymac.com/forum/files/file/559-flash-drive-maker/   --Create a bootable copy of macOS HighSierra Check out the link http://diskmakerx.com/   --Install Clover in USB stick https://sourceforge.net/projects/cloverefiboot/files/Installer/   --Replace with my Clover folder CLOVER Install.zip   --Install Sierra/High Sierra and boot into system!   Post Installation --Install Clover and replace with my folder CLOVER Post Install.zip   --Reboot and activate video!   Bingo!   Now you need a fine tune! DSDT time!   --DSDT   Patches -FIX ERRORS AND WARNINGS -HPET -SATA -DMAC -SLPB -DARWIN -LPC -XHCI -PLUGIN TYPE -XXXX to HDEF -HDEF -RTC -IRQs -SBUS -BUS1 -MCHC -ALS0 -SHUTDOWN -LAN -USBX -PMCR -EC -PNLF -HDMI
       
      --Power Management
      - 1 Generation Intel Processors, use Generate P and C States in config.plist
      - 2 and 3 Generations Intel Processors, Generate SSDT with Piker script and drop CpuPm and Cpu0Ist SSDTs
      ssdtPRGen.command.zip
      Credits-https://github.com/Piker-Alpha/ssdtPRGen.sh
      - 4 Generation+ Intel Processors, use PluginType=1 in DSDT, SSDT or Clover config.plist
       
      for check Power, Frequency, Temperature and Utilization, use it
      Install Intel Power Gadget.pkg.zip
       
      --Brightness
      Install .app, select the required permission and reboot. Work in F1 / F2 keys!
      NativeDisplayBrightness.app.zip


      https://github.com/Bensge/NativeDisplayBrightness/releases
      *in some cases .app don't work, check patches in config.plist inside Clover folder Post Install
       
      --Clover
       
      https://sourceforge.net/projects/cloverefiboot/files/Installer/
       
      --AUDIO
       
      Use DSDT + AppleAlc
       
      --install Lan driver by Mieze
        -Atheros http://www.insanelymac.com/forum/files/file/313-atherose2200ethernet/   -Intel http://www.insanelymac.com/forum/files/file/396-intelmausiethernet/   -Realtek http://www.insanelymac.com/forum/files/file/88-realtekrtl8111-binary/   --Links   -FakeSMC https://bitbucket.org/RehabMan/os-x-fakesmc-kozlek   -Audio https://github.com/vit9696/AppleALC http://www.insanelymac.com/forum/topic/314406-voodoohda-289/   -USB https://bitbucket.org/RehabMan/os-x-usb-inject-all/downloads   It's time to Rock   -Credits and thanks to the old and new people in the community who developed patches, kexts and bootloaders!   Apple, Slice, Kabyl, usr-sse2, jadran, Blackosx, dmazar, STLVNUB, pcj, apianti, JrCs, pene, FrodoKenny, skoczy, ycr.ru, Oscar09, xsmile, SoThOr, RehabMan, Download-Fritz, Zenit432, cecekpawon, Intel, Oracle, Chameleon Team, crazybirdy, Mieze, Mirone, Oldnapalm, netkas, Elconiglio, artut-pt, ErmaC, Pavo, Toleda, Master Chief and family, bcc9, The King, PMheart, Sherlocks, Micky1979, vit9696, vandroiy2013, Voodoo Team, Pike R. Alpha, lvs1974, Austere.J, CVad and many, many, many others!   We're all here to have fun and learn from each other!  
    • By MaLd0n
      First... If you need DSDT edits... -Extract tables with F4 key in Clover boot screen! -Run it and send me files! RunMe.app   Installation --Create a bootable copy of El Capitan and Sierra Check out the link http://www.insanelymac.com/forum/files/file/559-flash-drive-maker/   --Create a bootable copy of macOS HighSierra Check out the link http://diskmakerx.com/   --Install Clover in USB stick https://sourceforge.net/projects/cloverefiboot/files/Installer/   --Replace with my Clover folder CLOVER Install.zip   --Install EL Capitan / Sierra / High Sierra and boot into system! for Sierra/High Sierra you need a Processor with SSE4.1 instruction   Post Installation --Install Clover and replace with my folder CLOVER Post Install.zip   --Reboot and activate video!   Bingo! Now you need a fine tune! DSDT Time! -Post your full Clover folder with original tables in Origin folder(Extract with F4 in Clover boot screen) and tell me what your hardware! -Post Ioreg, extract with Ioreg Explorer http://www.insanelymac.com/forum/index.php?app=core&module=attach&section=attach&attach_id=222606 -Run it, post files generate in your desktop http://www.insanelymac.com/forum/index.php?app=core&module=attach&section=attach&attach_id=222609    My DSDT GA P35-DS3 DSDT.MaLd0n LGA775.zip   Patches -FIX ERRORS AND WARNINGS -HPET -SATA -SLPB -DARWIN -LPC -HDEF -RTC -EHCI -UHCI -IRQs -SBUS -BUS1 -MCHC -ALS0 -SHUTDOWN -LAN -EC -PNLF --Native Power Management
       
      Use Clover, check Generate P and C States
       
      --Brightness
      Install .app, select the required permission and reboot. Work in F1 / F2 keys!
      NativeDisplayBrightness.app.zip


      https://github.com/Bensge/NativeDisplayBrightness/releases
      *in some cases .app don't work, check patches in config.plist inside Clover folder Post Install
       
      --AUDIO
       
      Device HDEF + AppleAlc + Lilu
       
      --install Lan driver by Mieze
        -Atheros http://www.insanelymac.com/forum/files/file/313-atherose2200ethernet/   -Intel http://www.insanelymac.com/forum/files/file/396-intelmausiethernet/   -Realtek http://www.insanelymac.com/forum/files/file/88-realtekrtl8111-binary/   --Links   -FakeSMC https://bitbucket.org/RehabMan/os-x-fakesmc-kozlek   -Audio https://github.com/vit9696/AppleALC http://www.insanelymac.com/forum/topic/293863-applehda-patch-requests/   -Credits and thanks to the old and new people in the community who developed patches, kexts and bootloaders!   Slice, Kabyl, usr-sse2, jadran, Blackosx, dmazar, STLVNUB, pcj, apianti, JrCs, pene, FrodoKenny, skoczy, ycr.ru, Oscar09, xsmile, SoThOr, RehabMan, Download-Fritz, Zenit432, cecekpawon, Intel, Apple, Oracle, Chameleon Team, crazybirdy, Mieze, Mirone, Oldnapalm, netkas, Elconiglio, artut-pt, ErmaC, Pavo, Toleda, Master Chief and family, bcc9, The King, PMheart, Sherlocks, Micky1979, vit9696, vandroiy2013, Voodoo Team, Pike R. Alpha, lvs1974, Austere.J, CVad and many, many, many others!   We're all here to have fun and learn from each other!   ENJOY!  
    • By verymilan
      Hi, i recently set up High Sierra on my AMD computer with the help of the amdosx community (i actually used an installer just to confirm that something would work in the first place before i spend hours for nothing, i can and could have downloaded High Sierra the "legal" way).
      However the graphicscard is recognized properly, the 6gig are recognized and i have no artifacts and no screen tearing with the official nvidia webdriver,
      but unfortunally, dark colors have horizontal dark stripes in them and specific bright colors like on left bar of system windows such as settings do flicker like low fps.

      I only used the clover on the flash drive for now and i'd like if it's worth digging deeper of if i should just forget about it as it is a common nvidia problem on macOS.
      Would be amazing to know.
       
      Closer machine infos:
      * High Sierra (misses a recent minor patch as my network is veeeery slow and i got this nvidia issue anyway so i mainly jumped back to linux)
      * AMD fx8350
      * Asus Sabertooth 990fx Ref. 2.0
      * NVIDIA GeForce GTX 1060 6GB
       
    • By clickerpw
      hi guys
      can anybody help me.
      i connect display dell 2418D ( 2560x1440@60) to intel hd530 via hdmi.
      after power off first time boot mac os boot in 2560x1440@40.

       
       
      after this i reboot mac os and boot in 2560x1440@60

       
       
       
       
      also i shoot the video.
      https://youtu.be/Mi6O3-ghRs0
      i tried:
      Lilu.kext , CoreDisplayFixup.kext,Pixel Clock Patch
×