Contribute
Register

How to Add or Edit dsdt/HDEF v2

toleda

Moderator
Joined
May 20, 2010
Messages
24,091
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS

How to Add or Edit dsdt/HDEF v2

For Realtek ALC AppleHDA

Realtek ALC AppleHDA Audio ID Injection adds or edits dsdt/HDEF for Realtek ALC Audio.

audio_ALCInjection
toleda/audio_ALCInjection

Version 2

  1. Minimum edits, no Method (DTGP..), faster boot; Credit: PikeRAlpha
Requirements

  1. OS X versions supported:
    1. Mavericks/10.9 or newer
    2. Mountain Lion/10.8 and newer
  2. Realtek ALC, one of the following Device_ID - Codec Name
    1. 10ec0885 - ALC885/ALC889a
    2. 10ec0887 - ALC887/ALC888b
    3. 10ec0888 - ALC888/ALC888s
    4. 10ec0889 - ALC889
    5. 10ec0892 - ALC892
    6. 10ec0899 - ALC898
    7. 10ec0900 - ALC1150 - 10.8.5 or newer
  3. Supported Audio-IDs (Audio_ID = layout-id)
    1. Audio_ID: 1 - 5/6 port Realtek ALC onboard audio and HD5K/AMD/Nvidia HDMI audio
    2. Audio_ID: 2 - 3 port Realtek ALC onboard audio and HD5K/AMD/Nvidia HDMI audio
    3. Audio_ID: 3 - 3/5/6 port Realtek ALC onboard audio and HD3K/HD4K/AMD/Nvidia HDMI audio
    4. Audio_IDs: 1 and 2 support analog 5.1 surround sound, 3 does not
    5. Audio_IDs: 1, 2 and 3 require HDMI audio dsdt edits/ssdts for HDMI audio.
  4. Successfully compiled dsdt.aml
    1. If no dsdt, MaciASL/File/New from ACPI/DSDT
Tools

  1. MaciASL
  2. IOReg (either)
    1. IORegistryExplorer/File/Save a Copy As… ( View Raw: IORegistryExplorer_v2.1.zip)
    2. IOJones Download
  3. DPCIManager
  4. Carbon Copy Cloner or SuperDuper
Backup System

  1. Make a bootable backup with Carbon Copy Cloner or SuperDuper
Remove Enabler (if installed)

  1. Remove any audio enablers
    1. kexts, S/L/E/HDAEnabler1.kext, HDAEnabler8--.kext, ALC8xxHDA.kext, etc.
    2. ssdt, remove Extra/SSDT-1.aml (usually)
Guide (with screenshots)

  1. [Guide]-Add_or_Edit_HDEF-dsdt.pdf
Procedure
A. Configure MaciASL

  1. Copy Downloads/MaciASL to Applications
  2. Open Applications/MaciASL
  3. MaciASL/Preferences/Source/+/https://raw.github.com/toleda/audio_ALCinjection/master
    1. URL:
      Code:
      https://raw.github.com/toleda/audio_ALCinjection/master
B. Apply Edits - MaciASL/File


  1. MaciASL/File/Open dsdt.aml
    1. Determine BIOS supplier (supports all AMI BIOS)
  2. MaciASL/Compile, if no errors, jump to 3
    1. MaciASL/Patch/toleda/AMI/Clean Compile (Note: AMI only)
    2. MaciASL/Compile, if no errors, jump to 3
    3. If errors, seek assistance
  3. MaciASL/Edit/Find/Find…/HDEF
    1. If "Device (HDEF)" present, jump to 4.
    2. MaciASL/Patch/toleda/Add dsdt/HDEF/Audio ID: 1
    3. Jump to 5.
  4. MaciASL/Patch/toleda/Select
    1. Enable Audio ID: 1 or
    2. Enable Audio ID: 2 or
  5. MaciASL/Patch/Apply
  6. MaciASL/Patch//Close
  7. MaciASL/Compile, if no errors, jump to Verify Edits
    1. If errors, seek assistance
C. Verify Edits - MaciASL/File

  1. MaciASL/Edit/Find HDEF (1x), represented as Device (HDEF)
  2. Verify HDEF/layout-id is:
    1. 0x01, 0x00, 0x00, 0x00 or
    2. 0x02, 0x0l0, 0x00, 0x00
D. Save dsdt - MaciASL/File

  1. MaciASL/File/Save As…/ACPI Machine Language Binary/Desktop/dsdt.aml (add extension)
E. Install dsdt.aml - MaciASL/File

  1. MaciASL/File/Save As…/ACPI Machine Language Binary/Extra/dsdt.aml (add extension)
    1. MultiBeat/Desktop/dsdt.aml
    2. Alternative: Copy (Drag/Hold Option key) Desktop/dsdt.aml to Extra
F. Verification

  1. Restart
  2. IORegistryExplorer
    1. Search: HDEF
    2. Locate: layout-id (right pane, scroll down)
    3. Verify:
      1. <01 00 00 00> or
      2. <02 00 00 00>
  3. System Preferences/Sound/Outputml_prefs_sound_output_aid1.png
Problem Reporting (include the following information)

  1. Description of audio problem
    1. OS X version/motherboard model/BIOS version/processor/graphics
    2. Procedure/Guide Used
    3. Copy of IORegistryExplorer/IOJones (either)
      1. IOReg/File/Save a Copy As…, verify file (no ioreg.txt)
      2. IOJones/Save.. .
    4. Chimera/Chameleon
      1. Extra/org.chameleon.Boot.plist
      2. DPCIManager/Misc/Boot Log
      3. Extra/dsdt.aml
    5. Clover
      1. EFI/Clover/config.plist
      2. EFI/Clover/misc/debug.log (Set config.plist/Boot/Debug/YES)
      3. EFI/Clover/ACPI/Patched/dsdt.aml
Credits:
VCH888; ALC889A, Gigabyte (Intel): now having a working front mic - Page 38 - Sound - InsanelyMac Forum
SJ_UnderWater: SourceForge.net: MaciASL - Project Web Hosting - Open Source Software
PikeRAlpha: Intel HD4600 with full resolution | Pike's Universum

dsdt Edits
1. HDEF
Code:
[B]After patch (.dsl)[/B]
[COLOR=#232323][FONT=Helvetica]Device (HDEF)[/FONT][/COLOR]
[COLOR=#232323][FONT=Helvetica]       {[/FONT][/COLOR]
[COLOR=#232323][FONT=Helvetica]           Name (_ADR, 0x001B0000)[/FONT][/COLOR]
[COLOR=#232323][FONT=Helvetica]....[/FONT][/COLOR]
[COLOR=#232323][FONT=Helvetica]....[/FONT][/COLOR]
            Method (_DSM, 4, NotSerialized)
            {
                If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }
                        Return (Package()
                            {
                                "layout-id", Buffer() { 0x01, 0x00, 0x00, 0x00 },
                                    "PinConfigurations", Buffer(Zero) {},
                                        "hda-gfx", Buffer() { "onboard-1" },
                                        })
[COLOR=#232323][FONT=Helvetica]               }[/FONT][/COLOR]
[COLOR=#232323][FONT=Helvetica]       }

[/FONT][/COLOR][B]Compiled (.aml)[/B]
Device (HDEF)
      {
          Name (_ADR, 0x001B0000)
....
....
            Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
            {
                If (LEqual (Arg2, Zero))
                {
                    Return (Buffer (One)
                    {
                         0x03
                    })
                }


                Return (Package (0x06)
                {
                    "layout-id", 
                    Buffer (0x04)
                    {
                         0x01, 0x00, 0x00, 0x00
                    }, 


                    "PinConfigurations", 
                    Buffer (Zero) {}, 
                    "hda-gfx", 
                    Buffer (0x0A)
                    {
                        "onboard-1"
                    }
                })
            }

 
Joined
Jun 19, 2012
Messages
32
Motherboard
GA-Z77X-UD5H [F14]
CPU
Core i7-3770K
Graphics
GeForce GTX 1050
Mac
iMac, MacBook Pro
Classic Mac
iMac
Mobile Phone
iOS
ML: How to Add or Edit dsdt/HDEF

I've just built my first system and haven't had to deal with dsdt and kext editing so far (I deal with Linux/J2EE app servers so I'm not afraid to get my hands dirty when I need to). I'm wondering how much work is involved in getting DisplayPort audio working on a GA-Z77X-UD5H using onboard HD4000. I hooked up a Dell U2711 monitor which has multichannel audio out and was hoping to be able do some neater speaker wiring rather than running it to the MoBo.
 

toleda

Moderator
Joined
May 20, 2010
Messages
24,091
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS
ML: How to Add or Edit dsdt/HDEF

I've just built my first system and haven't had to deal with dsdt and kext editing so far (I deal with Linux/J2EE app servers so I'm not afraid to get my hands dirty when I need to). I'm wondering how much work is involved in getting DisplayPort audio working on a GA-Z77X-UD5H using onboard HD4000. I hooked up a Dell U2711 monitor which has multichannel audio out and was hoping to be able do some neater speaker wiring rather than running it to the MoBo.
DP audio is available with HDMI audio. See Mountain Lion HDMI Audio - HD4000
 
Joined
Jun 20, 2012
Messages
69
Motherboard
Zotac H77-ITX WiFi
CPU
i5 3550
Graphics
MSI R6670 GDDR5
Mac
MacBook Pro
Classic Mac
Mobile Phone
Android, iOS
ML: How to Add or Edit dsdt/HDEF

Added the Method and am getting the error "DTGP not found". DSDT compiles fine if I comment out the line with DTGP and Arg# (arguments?). I can send you the DSDT later when I get home if required
 

toleda

Moderator
Joined
May 20, 2010
Messages
24,091
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS
ML: How to Add or Edit dsdt/HDEF

Added the Method and am getting the error "DTGP not found". DSDT compiles fine if I comment out the line with DTGP and Arg# (arguments?). I can send you the DSDT later when I get home if required
The patch adds DTGP. What did you do?
 
Joined
Sep 16, 2011
Messages
188
Motherboard
Mac OS X Lion 10.9.3
CPU
i7 4770k
Graphics
HD4600 1 Gb + nVidia GTX 650ti 2Gb
Mac
iMac
Classic Mac
Power Mac
Mobile Phone
iOS
ML: How to Add or Edit dsdt/HDEF

Hello Toleda

I am here with the hackintosh of a friend attempting add the device HDEF to the DSDT

I have compiled successful the DSDT but when want follow your guide for add the patches i dont know how continue

I am stucked here

Edit Lion layout-id - TextEdit
1. Determine Lion Audio_ID layout-id2. TextEdit Open/Downloads/ML_hdef_audio_ids//hdef_audio_id_1.txt
2. TextEdit Edit layout-id from 0x01, 0x01, 0x00, 0x00 to Lion Audio_ID layout-id
3.
TextEdit Save
Need I change the Audio_ID?, the hackintosh is running Mountain Lion

And i am having troubles for understand it point too

Apply Edits - DSDT Editor
1. DSDT Editor/Open dsdt.aml
2. DSDT Editor/Find HDEF, if "Search String HDEF not found", jump to Add HDEF - TextEdit
3. DSDT Editor/Patch/Open ML_hdef_audio_ids/
3a. hdef_audio_id_1.txt or
3b. hdef_audio_id_2.txt or
3c. hdef_audio_id_3.txt
4. DSDT Editor/Patch/Apply
5. DSDT Editor/iASL/Compile
6. Jump to Verify Edits - DSDT Editor
Need I apply all the fixes?, audio_1, audio_2, audio_3?

The Hackintosh have it configuration

CPU: i7 3930k
Motherboard: GA-X79-UD3
ALC898

Greetings
 

toleda

Moderator
Joined
May 20, 2010
Messages
24,091
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS
ML: How to Add or Edit dsdt/HDEF

Need I apply all the fixes?, audio_1, audio_2, audio_3?

CPU: i7 3930k
Motherboard: GA-X79-UD3
ALC898
Use Audio_ID:1, hdef_audio_id_1.txt.
Run MultiBeast 5.2.1 or newer - Select/Drivers & Bootloaders/Drivers/Audio/Realtek ALC8xx/With DSDT/ALC898

If audio does not work, see Note 3 of Unsupported/Non Working Audio ML Optimized AppleHDA in Mountain Lion: Optimized AppleHDA for Realtek ALC8xx. Edit dsdt/HDEF/layout-id to 0x82, 0x03, 0x00, 0x00 and install the Interim AppleHDA.kext.

Make a copy of IOReg for the MultiBeast 5.2.1 audio (with or without working 898 audio). Make a copy of IOReg with the Interim audio. [Guide] How to Make a Copy of IOReg.
 
Joined
Sep 16, 2011
Messages
188
Motherboard
Mac OS X Lion 10.9.3
CPU
i7 4770k
Graphics
HD4600 1 Gb + nVidia GTX 650ti 2Gb
Mac
iMac
Classic Mac
Power Mac
Mobile Phone
iOS
ML: How to Add or Edit dsdt/HDEF

Thanks Toleda


Onboard Audio is working ok, the winner solution was, modify the layout-id to 0x82, 0x03, 0x00, 0x00 in conjuction with the Interim AppleHDA


I leave to your request the IOREG files


Now come the turn of enable the HDMI Audio but if i have troubles i will open other topic in the correct forum


Greetings
 

Attachments

toleda

Moderator
Joined
May 20, 2010
Messages
24,091
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS
ML: How to Add or Edit dsdt/HDEF

Onboard Audio is working ok, the winner solution was, modify the layout-id to 0x82, 0x03, 0x00, 0x00 in conjuction with the Interim AppleHDA
Thanks. FYI, Interim with layout-id: 1 and ML AppleHDA with layout-id: 898 are not valid and will not work. You may have noticed ML AppleHDA with layout-id: 1 shows all audio device and looks like it is working in IOReg, however, no sound. One Intel X79 user got working audio with dsdt/HDEF. Unfortunately, you confirmed no sound on the GA X79 with the dsdt/HDEF and ML AppleHDA.kext.
 
Top