Jump to content

Get Apple ALC Audio Working with SSDT Method or DSDT Patching Method Easily.


RoberT_XeS
 Share

10 posts in this topic

Recommended Posts

 

 

NEW METHOD: SSDT Patching Method

 

1. Add all the following

 

"TMR IRQ 0 Fix": <22010079 00> -> <22000079 00> 

"PIC IRQ 2 Fix":  <22040079 00> -> <22000079 00>

"RTC0 IRQ 8 Fix": <22000179 00> -> <22000079 00>

(Note: These values might be different for you depending on the IRQ Hot patching required for your System. Some may even need IRQ 15 Fix. You can try these values as well. For detailed explanation scroll below in the comment section and read the explanation from @Bill Huang)

86953779_ScreenShot2022-03-03at1_10_40AM.thumb.png.fe67e6f3357479d8b7ff64ee34387a3f.png

 

2. Also add the SSDT-HDEF-edited.aml in to the ACPI folder
 

(Note: You need to edit this SSDT-HDEF according to the path of your audio location . My audio location was under 
    Scope (\_SB.PCI0)
 
Your audio HDEF location might be different you need to edit the SSDT accordingly. You can use Hackintool and under PCie Section you can find your Audio Location)

 

1540329263_ScreenShot2022-03-03at2_19_11AM.thumb.png.2dcd0b6517c92e3c9be892fe970ed0ca.png
3. As you can see I have added the location according to the location I found in Hackintool. i.e \_SB.PCI0 in the SSDT-HDEF-edited.aml file 

550385478_ScreenShot2022-03-03at2_20_30AM.png.a1bf8eaa035994e776160b26cb0a8fc7.png

 

4. Add the SSDT-HDEF-edited entry into the config.plist as shown below

1001779749_ScreenShot2022-03-03at1_09_43AM.thumb.png.6500d2f6a51631352657ccab8a56206b.png

 

4. Create SSDT-HPET.aml using SSDTTime from Windows or Mac and add it to ACPI Folder.

5. Also add the entry into config.plist as shown above

482948737_ScreenShot2022-03-03at1_14_59AM.thumb.png.a286fadb6eda57fcb7bbd124396c4be1.png

6. Add the patch in to the config ACPI>Patch section that SSDTTime app gives you named patches_OC.plist 

86953779_ScreenShot2022-03-03at1_10_40AM.thumb.png.fe67e6f3357479d8b7ff64ee34387a3f.png

 

 

7. After adding all the above reboot the system and your Audio should start working.

372038440_ScreenShot2022-03-03at1_11_56AM.thumb.png.f1a38b3760ca3bd1888db533f4b28445.png

1860809994_ScreenShot2022-03-03at1_12_36AM.png.01bdffbcf37aab448f71cf879bfa40b9.png

 

 

 

If the above method does not work for you then you can follow the below given guide. 

OLD METHOD BUT STILL EFFECTIVE AND WORKING

DSDT Patching Method:

 

Most of might be able to get the audio working using the Dortania Guide  but many are unable to get their ALC Audio working with that guide in BigSur and Monterey. Like you I also tried many solutions but none worked. 

 

I have ALC 892 and it worked after DSDT Patching. This patch works for other ALC Audio as well. This guide is only for those who has exhausted all their options and don't know how to get the Audio working.

 

I will try to make this guide as simple as possible. Just follow all the steps mentioned below and you should get your Audio Working. Do not skip any of the steps.

 

Use only Rehabman's MaciASL.

 

Method:

 

First of all you need to check if you have the latest AppleALC.kext and Lilu.kext are present in EFI/OC/Kexts. If not then download and paste it inside the Kexts folder and then continue with the guide. 

 

Second of all I assume that you have exhausted all the options to get your audio working but still no Audio then the guide is for you.

 

 

1. Download the last Rehabman's MaciASL and then open it in Mac. You will see the following.  If you see the following then your DSDT is already loaded. If it is not loaded then you need to use other methods to get your DSDT and open it in Rehabman's MaciASL.

828759354_Screenshot2022-01-26at7_32_41PM.thumb.png.c25cdfb5bed4715ee6740900f0cc7eeb.png

2. Now click on MaciASL Menu and then go to Preferences and then click on Sources and add the following and close the dialog.

 

Toleda HDMI
http://raw.githubusercontent.com/toleda/audio_hdmi_uefi/master

Toleda HDMI 8
http://raw.githubusercontent.com/toleda/audio_hdmi_8series/master

Toleda ALC
http://raw.githubusercontent.com/toleda/audio_ALCInjection/master

_RehabMan Laptop
http://raw.github.com/RehabMan/Laptop-DSDT-Patch/master

2059063493_Screenshot2022-01-26at7_42_25PM.png.f7a83e49e836c1cf6f10ee23cbedd125.png

3. Now click on the Patch icon and select 'Add dsdt/HDEF/Audio ID:1' and click on Apply

(Note: If Audio ID:1 do not work for you then you can try the other patches in the list)

 

1991964113_Screenshot2022-01-26at7_09_43PM.thumb.png.a48e7a658bbec1b79200b63c43be4da7.png

 

4. Now Select IRQ Fix under Rehabman's Laptop Patches and then press Apply. (Some should have their audio working with the above audio patch but for the rest you need to apply the IRQ Fix as well.)

923430605_Screenshot2022-01-26at7_17_57PM.thumb.png.8dd66ea3c4442926aada8d4ba02471d7.png

5. . Now press the Compile Button and check if you are getting any error like this. If you are getting error then close everything and repeat the steps 1 to 4 again. As you can see I am getting 0 Errors.

1196398382_Screenshot2022-01-26at7_46_56PM.png.0c50454418ad8a8828ef6c49d95553c6.png

 

6. Save the file as ONLY_AUDIO using the ACPI Machine Learning File Format.

1740528442_Screenshot2022-01-26at7_26_11PM.png.7eb1c6e193aa0975539c0b11fc2ab6d0.png

7. Now mount your EFI Partition and then place ONLY_AUDIO.aml in the ACPI Folder under EFI/OC/ACPI/

 

8. Add the ACPI entry in config.plist using Propertree or PlistEditor or OpencoreConfigurator. I am using Plist Editor.

1465981091_Screenshot2022-01-26at7_55_03PM.png.6fb4220294ef0c5dc8d8a5d6a0409cac.png

 

9. Add Boot Args:

alcid=1

(Note: This value depends on your Supported Audio Layout. You can check your supported Audio Layout here https://github.com/acidanthera/applealc/wiki/supported-codecs ). Mine works with Layout ID 1 hence I am using alcid=1 in this guide. The layout ID may be different for you.

1885601954_Screenshot2022-01-26at7_56_30PM.png.06497ae9aad490b46186ef15abdeb3ed.png

10. Save the config and then reboot and now you should have your Audio Working.

 

1436259794_Screenshot2022-01-26at8_09_01PM.thumb.png.3d40877ed5a8024f628442948cb73a23.png379438690_Screenshot2022-01-26at8_09_42PM.png.5878ae2c6c2e8a249e72feb1ac002417.png

 

 

 

Edited by RoberT_XeS
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

13 hours ago, Hervé said:

This is all fine but kinda deprecated with the demise of DSDT patching in favour of using patched SSDTs as alternatives. These do include dedicated SSDTs for patching HDEF device and/or HPET device for IRQ. See the Dortania documentation on the matter for instance.

 

I tried all that but was unable to get it working... I tried SSDT-HPET, and SSDT-HDEF with IRQ fix but none worked. This was the only way for me to get ALC 892 Working. If you can provide an alternate SSDT-HDEF and IRQ Fix then I can try.

 

One of my friend has Sabertooth X79 and he just have to add alcid=1 and it works. But I have Huananzhi Chinese Motherboard same ALC 892 and same Audio Layout but it do not work it needs DSDT Patch

 

 

Edited by RoberT_XeS
Link to comment
Share on other sites

16 hours ago, Hervé said:

To patch HPET, one needs to:

1) rename the original ACPI device to XPET (or whatever other name)

2) inject the replacing code (with IRQ patch) through a dedicated SSDT

 

1st action is required or the patch will simply be ignored because one cannot redefine an existing device, only add new properties to it. By renaming the original device, one basically opens the path to create a new one that will entirely replace the original one.

 

This is pretty well documented in the Dortania documentation. Look it up.

 

I used SSDTTime to get that SSDT-HPET Patch. Even then it didn't work

Edited by RoberT_XeS
Link to comment
Share on other sites

  • 4 weeks later...

 

You will need to hot-patching the IRQ's (0, 8, 11, may be 15 too) to make Apple ALC work. Your DSDT patch did that for you. For SSDT only method, you will need to add IRQ patching in your config.plist section: Root->ACPI->Patch (see below)

 

The following is an example I did for my HP Z820 (also applies for Z420/Z620), for fixing IRQ 0, 2, 8, for Realtec ALC262 to work under Apple ALC. You could easily figure out the signature string for fixing IRQ11 (may be 15 too), by examining your original DSDT code. Good luck!

 

 

Fixing-IRQ-Sample.png

Edited by Bill Huang
Link to comment
Share on other sites

On 2/26/2022 at 4:17 AM, Bill Huang said:

 

You will need to hot-patching the IRQ's (0, 8, 11, may be 15 too) to make Apple ALC work. Your DSDT patch did that for you. For SSDT only method, you will need to add IRQ patching in your config.plist section: Root->ACPI->Patch (see below)

 

The following is an example I did for my HP Z820 (also applies for Z420/Z620), for fixing IRQ 0, 2, 8, for Realtec ALC262 to work under Apple ALC. You could easily figure out the signature string for fixing IRQ11 (may be 15 too), by examining your original DSDT code. Good luck!

 

 

Fixing-IRQ-Sample.png

I used SSDTtime app to get the IRQ patch...but it did not work...Isn't that similar

 

I have attached my original DSDT with this, guide me.

 

DSDT.aml SSDT-HPET.aml patches_OC.plist

Edited by RoberT_XeS
Link to comment
Share on other sites

On 2/28/2022 at 10:34 AM, RoberT_XeS said:

I used SSDTtime app to get the IRQ patch...but it did not work...Isn't that similar

 

I have attached my original DSDT with this, guide me.

 

DSDT.aml 33.34 kB · 0 downloads SSDT-HPET.aml 111 B · 0 downloads patches_OC.plist 1.92 kB · 0 downloads

I looked at your DSDT (assuming it is the original, unpatched).  I believe you need to do additional IQR patching, similar as I did. That is to hot-patching IRQ 0, 2, 8 (config.plist->Root->ACPI->Patch):

 

"TMR IRQ 0 Fix": <22010079 00> -> <22000079 00>  (You've already have this)

"PIC IRQ 2 Fix":  <22040079 00> -> <22000079 00>

"RTC0 IRQ 8 Fix": <22000179 00> -> <22000079 00>

 

The next step, you need to create a SSDT for injecting the ALC audio:

Take a look at your patched DSDT code, where the audio is working (i.e. the one you applied the Rehabman's fixes). Find the section for Device (HDEF), should be under _SB\PCI0\HDEF, - this is the extra code added by Rehanbman's to make audio work (Windows does not need this, but macOS does). Copy the codes associated with : Device (HDEF) {....}, and creates a SSDT version. As an example, the following is one I created for my system (HP Z820). You need to replace codes within the brackets of Device (_SB/PCI0.HDEF) { ... }, by yours from the above, but keep the rest unchanged. Save and compile this file as SSDT-HDEF.aml, and add it to OC. For your reference, I've attached my version too. Good luck!

 

- Bill

 

DefinitionBlock ("", "SSDT", 1, "mano", "HDEF", 0x00003000)
{
    External (_SB_.PCI0, DeviceObj)
    External (_SB_.PCI0.HDEF, DeviceObj)

    Device (_SB.PCI0.HDEF)
    {
        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
        }

        Name (_ADR, 0x001B0000)  // _ADR: Address
        Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
        {
            Return (Package (0x02)
            {
                0x0D, 
                0x05
            })
        }

        Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
        {
            If ((Arg2 == Zero))
            {
                Return (Buffer (One)
                {
                     0x03                                             // .
                })
            }

            Return (Package (0x10)
            {
                "AAPL,slot-name", 
                "Built In", 
                "name", 
                "Realtek Audio Controller", 
                "model", 
                Buffer (0x20)
                {
                    "Realtek ALC262 Audio Controller"
                }, 

                "device_type", 
                Buffer (0x11)
                {
                    "Audio Controller"
                }, 

                "layout-id", 
                Buffer (0x04)
                {
                     0x1C, 0x00, 0x00, 0x00                           // ....
                }, 

                "MaximumBootBeepVolume", 
                Buffer (One)
                {
                     0x01                                             // .
                }, 

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

 

 

SSDT-HDEF.aml

Edited by Bill Huang
Link to comment
Share on other sites

22 hours ago, Bill Huang said:

I looked at your DSDT (assuming it is the original, unpatched).  I believe you need to do additional IQR patching, similar as I did. That is to hot-patching IRQ 0, 2, 8 (config.plist->Root->ACPI->Patch):

 

"TMR IRQ 0 Fix": <22010079 00> -> <22000079 00>  (You've already have this)

"PIC IRQ 2 Fix":  <22040079 00> -> <22000079 00>

"RTC0 IRQ 8 Fix": <22000179 00> -> <22000079 00>

 

The next step, you need to create a SSDT for injecting the ALC audio:

Take a look at your patched DSDT code, where the audio is working (i.e. the one you applied the Rehabman's fixes). Find the section for Device (HDEF), should be under _SB\PCI0\HDEF, - this is the extra code added by Rehanbman's to make audio work (Windows does not need this, but macOS does). Copy the codes associated with : Device (HDEF) {....}, and creates a SSDT version. As an example, the following is one I created for my system (HP Z820). You need to replace codes within the brackets of Device (_SB/PCI0.HDEF) { ... }, by yours from the above, but keep the rest unchanged. Save and compile this file as SSDT-HDEF.aml, and add it to OC. For your reference, I've attached my version too. Good luck!

 

- Bill

 

DefinitionBlock ("", "SSDT", 1, "mano", "HDEF", 0x00003000)
{
    External (_SB_.PCI0, DeviceObj)
    External (_SB_.PCI0.HDEF, DeviceObj)

    Device (_SB.PCI0.HDEF)
    {
        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
        }

        Name (_ADR, 0x001B0000)  // _ADR: Address
        Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
        {
            Return (Package (0x02)
            {
                0x0D, 
                0x05
            })
        }

        Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
        {
            If ((Arg2 == Zero))
            {
                Return (Buffer (One)
                {
                     0x03                                             // .
                })
            }

            Return (Package (0x10)
            {
                "AAPL,slot-name", 
                "Built In", 
                "name", 
                "Realtek Audio Controller", 
                "model", 
                Buffer (0x20)
                {
                    "Realtek ALC262 Audio Controller"
                }, 

                "device_type", 
                Buffer (0x11)
                {
                    "Audio Controller"
                }, 

                "layout-id", 
                Buffer (0x04)
                {
                     0x1C, 0x00, 0x00, 0x00                           // ....
                }, 

                "MaximumBootBeepVolume", 
                Buffer (One)
                {
                     0x01                                             // .
                }, 

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

 

 

SSDT-HDEF.aml 409 B · 2 downloads

 

Here are the things that I did after looking at your post.

 

1. Added all the following

 

"TMR IRQ 0 Fix": <22010079 00> -> <22000079 00> 

"PIC IRQ 2 Fix":  <22040079 00> -> <22000079 00>

"RTC0 IRQ 8 Fix": <22000179 00> -> <22000079 00>

 

2. Also added the SSDT-HDEF-edited.aml in to the ACPI folder and added the entry into the config.plist

 

But the Audio did not work for me then I also added the following 

 

3. Created SSDT-HPET using SSDTTime from Windows and Added it to ACPI Folder and also added the entry into config.plist

4. Added the patch that SSDTTime app gave me in patches_OC.plist into the ACPI>Patch Section in config.plist

482948737_ScreenShot2022-03-03at1_14_59AM.thumb.png.a286fadb6eda57fcb7bbd124396c4be1.png

5. Now it looks like this 

1001779749_ScreenShot2022-03-03at1_09_43AM.thumb.png.6500d2f6a51631352657ccab8a56206b.png86953779_ScreenShot2022-03-03at1_10_40AM.thumb.png.fe67e6f3357479d8b7ff64ee34387a3f.png

6. After adding all the above I rebooted the system and my Audio started working.

372038440_ScreenShot2022-03-03at1_11_56AM.thumb.png.f1a38b3760ca3bd1888db533f4b28445.png

1860809994_ScreenShot2022-03-03at1_12_36AM.png.01bdffbcf37aab448f71cf879bfa40b9.png

Thanks for the guidance @Bill Huang

 

 

Edited by RoberT_XeS
Link to comment
Share on other sites

1 hour ago, RoberT_XeS said:

 

Here are the things that I did after looking at your post.

 

1. Added all the following

 

"TMR IRQ 0 Fix": <22010079 00> -> <22000079 00> 

"PIC IRQ 2 Fix":  <22040079 00> -> <22000079 00>

"RTC0 IRQ 8 Fix": <22000179 00> -> <22000079 00>

 

2. Also added the SSDT-HDEF-edited.aml in to the ACPI folder and added the entry into the config.plist

 

But the Audio did not work for me then I also added the following 

 

3. Created SSDT-HPET using SSDTTime from Windows and Added it to ACPI Folder and also added the entry into config.plist

4. Added the patch that SSDTTime app gave me in patches_OC.plist into the ACPI>Patch Section in config.plist

482948737_ScreenShot2022-03-03at1_14_59AM.thumb.png.a286fadb6eda57fcb7bbd124396c4be1.png

5. Now it looks like this 

1001779749_ScreenShot2022-03-03at1_09_43AM.thumb.png.6500d2f6a51631352657ccab8a56206b.png86953779_ScreenShot2022-03-03at1_10_40AM.thumb.png.fe67e6f3357479d8b7ff64ee34387a3f.png

6. After adding all the above I rebooted the system and my Audio started working.

372038440_ScreenShot2022-03-03at1_11_56AM.thumb.png.f1a38b3760ca3bd1888db533f4b28445.png

1860809994_ScreenShot2022-03-03at1_12_36AM.png.01bdffbcf37aab448f71cf879bfa40b9.png

Thanks for the guidance @Bill Huang

 

 

@RoberT_XeS

 

Yes, you still need the HPET fix from the SDDTtime. I did not emphasize that since I was assuming you are doing that. These IRQ hot-patching's and the SSDT-HDEF were the additional fixes needed. They were in your DSDT patch but missing when you transition to SSDT only solution. Glad it worked out for you! 

 

This approach can be used to fix most audio issues, if you have a working DSDT patch (such as the DSDT patch you suggested in your original post). Also, to figure out what IRQ's need to be patched, you can compare the original DSDT with the patched working DSDT, to see what IRQ's were zapped when the Rahabman's fixes were applied. Just Search "IRQ" string with maciASL, one can easily figure that out. In your case, as well as mine, IRQ 0, 2 and 8 were the ones. 

 

Best regards,

 

- Bill

Edited by Bill Huang
  • Like 2
Link to comment
Share on other sites

  • 7 months later...
 Share

×
×
  • Create New...