No announcement yet.

[GUIDE] Gigabyte GA-Z77-D3H Rev 1.0 | VIA VT2021 Audio Working on OS X 10.8.2!

  • Filter
  • Time
  • Show
Clear All
new posts

  • [GUIDE] Gigabyte GA-Z77-D3H Rev 1.0 | VIA VT2021 Audio Working on OS X 10.8.2!

    Hey everyone,

    I had a pretty rough ride enabling sound on this motherboard, as it has a not-so-supported codec: VIA VT2021. However, with the help of experts on IRC and a little research, I got it working! For the sake of simplicity for other users out there with the same motherboard and codec, I'm posting this guide to offer a step-by-step process so you guys don't pull your hair out. :p Please make sure you have a basic knowledge of the following, as we'll be doing a lot in these areas:

    • Installing kexts
    • Patching DSDT

    People traditionally patch the kexts first, but for safety, we'll do the DSDT first. So, with that said, download the DSDT Editor so you can extract/edit your DSDT. I recommend copying the whole DSDT Editor folder to /Applications/Utilities (or /Applications) instead of just the application so you'll have access to all the patches on-disk, as opposed to downloading them individually.

    Alright, now that the editor's installed, go to File > Extract DSDT. For new users, don't panic at the sudden appearance of tons and tons of code that you may or may not understand. :D We'll only be editing a small section of this, so hang in there! ;) Alright, in the left column, scan the list until you see "Device HDEF" (it should in the "folder" Scope _SP.PCI0); click it.

    METHOD 1:
    Now, you should be looking at a piece of code that should match this. That's your audio device, which is what we'll be patching. Based on the code from here, you would highlight the entire code up to the last bracket (From "Device (HDEF)" to the bracket above "Device (SAT0)") and replace it with this. It may look like you didn't do much, but trust me, it means the world. :) After you've done that, press F5. It should have:

    • 1 Error
    • 4 Warnings
    • 12 Remarks
    • 111 Optimazations

    That error can be fixed with the DTGP patch, which, if you kept the entire DSDT Editor folder, should be in /Patches/DTGP.txt. To apply:

    1. Close the error window.
    2. Go to Patch > Open... (or Command + P)
    3. Go to the Patches folder and open DTGP.txt.
    4. In the window that should open, click "Apply".

    When the patch has been applied, press F5 again. The "error" window should pop up again, but this time should say "0 Errors". With this done, you can now save the DSDT by going to IASL > Save AML as... (make sure to name it exactly "dsdt.aml" (without qutoation marks) and move to /Extra!)

    METHOD 2:
    Included with the AppleHDA.kext below is a DSDT patch that I had problems compiling before, but got to work after applying some of the steps from Method 1. So, I'll include how to do it as "Method 2". :D

    With this method, your finished Device (HDEF) would look something like this:

    Device (HDEF)
                Name (_ADR, 0x001B0000)
                OperationRegion (HDAR, PCI_Config, 0x4C, 0x10)
                Field (HDAR, WordAcc, NoLock, Preserve)
                    DCKA,   1, 
                    Offset (0x01), 
                    DCKM,   1, 
                        ,   6, 
                    DCKS,   1, 
                    Offset (0x08), 
                        ,   15, 
                    PMES,   1
                Method (_PRW, 0, NotSerialized)
                    Return (Package (0x02)
                Method (_DSM, 4, NotSerialized)
                    Store (Package (0x04)
                            Buffer (0x04)
                                 0x0C, 0x00, 0x00, 0x00
                            Buffer (0x30)
                                /* 0000 */   0x10, 0x40, 0x11, 0x01, 0xF0, 0x00, 0x00, 0x40,
                                /* 0008 */   0xF0, 0x00, 0x00, 0x40, 0xF0, 0x00, 0x00, 0x40,
                                /* 0010 */   0xF0, 0x00, 0x00, 0x40, 0xF0, 0x00, 0x00, 0x40,
                                /* 0018 */   0x50, 0x30, 0x81, 0x01, 0x60, 0x90, 0xA1, 0x90,
                                /* 0020 */   0xF0, 0x00, 0x00, 0x40, 0x20, 0x21, 0x45, 0x07,
                                /* 0028 */   0xF0, 0x00, 0x00, 0x40, 0xF0, 0x00, 0x00, 0x40
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)

    Simply follow the steps in Method 1, except you would replace the original code with the code above!

    Now that the DSDT's done, download the patched AppleHDA.kext from here. If you're installing with Kext Utility, it will automatically backup the existing AppleHDA.kext; otherwise, back it up in case anything goes wrong!