Jump to content

AppleALC — dynamic AppleHDA patching


vit9696
5,371 posts in this topic

Recommended Posts

1 hour ago, jin2k9 said:

I would like to request someone to get the CX20641 supported. Is there any guide on how get the codec_dump from a Linux live cd and how to submit it to someone who can update AppleALC to support it ?

How to: In this Post

 

Link to comment
Share on other sites

14 hours ago, jin2k9 said:

I would like to request someone to get the CX20641 supported. Is there any guide on how get the codec_dump from a Linux live cd and how to submit it to someone who can update AppleALC to support it ?

I have the CX20642 on a Fujitsu desktop board, which I assume is not much different from that one, and I've been trying on and off for the last two weeks on my own to get this thing working without VoodooHDA, and nothing. Could anyone more knowledgeable please have a look at my codec? Thanks.

codec_dump.txt

Edited by junoir
Link to comment
Share on other sites

17 hours ago, ammoune78 said:

How to: In this Post

 

Thanx for the info. I checked out the post and followed the link to the German blog text. I don’t really understand German that well,  at least not enough to follow that guide. However I did the first Linux Live CD command and got the codec dump. If some one that actually know how to patch in support for codecs based on the codec dump can update AppleALC to support the CX20641 that would be great. Thanks in advance.

 

codec_dump.txt

Link to comment
Share on other sites

On 2016/3/8 at 6:46 AM, vit9696 said:

Hello,

This is going to be a support/discussion topic of AppleALC on InsanelyMac. 
AppleALC is a kernel extension allowing you to enable native apple HD audio without any filesystem modifications. It dynamically injects the necessary modifications to AppleHDA (and other kexts) including the

layouts, and makes your audio work starting from the OS installation.

 

It should be noted that AppleALC starting with version 1.1.0 requires Lilu.kext to be put in the same folder as AppleALC.kext. See this topic for more details.

 

For quite some time we are trying to obtain the necessary information about AppleALC codec compatibility. If you use something, please, consider checking the compatibility table (do not worry, it is in English), and report (here) on your codec. We are also looking for all the possible revisions of the codec, if we do not have the revisions listed for your codec please report as well. Thanks for understanding. 

 

The report is meant to contain:

1. Laptop model/Motherboard model
2. Codec name
3. Layout used with the info what works for you (ideally if you try them all)
4. OS X versions you tried
5. Autogenerated Info.plist made with the help of this utility.

 
All the details including the source code are available on github:
https://github.com/vit9696/AppleALC
Some short wiki articles explaining the usage are included.
 
As for now the project is relatively immature without practically any codec support. But it should be pretty easy to add more of them, I am hoping for the support of the "community" :)
If you have any issues, better report them on github for structural reasons.

Great jobs man!

i have a laptop pc with alc662 @ intel 5 series board. I can boot 10.12.6 correct and loaded applealc & lilu & IOHDAFamily & AppleHDAController. but i can't see any input or output devices in the volume control。

I use layout of 13 and clover as bootloader. when i check the system log, there is no error appear.

please help me!

 

codec-0.txt

DSDT.dsl

Link to comment
Share on other sites

Great jobs man!
i have a laptop pc with alc662 @ intel 5 series board. I can boot 10.12.6 correct and loaded applealc & lilu & IOHDAFamily & AppleHDAController. but i can't see any input or output devices in the volume control。
I use layout of 13 and clover as bootloader. when i check the system log, there is no error appear.
please help me!
 

codec-0.txt

DSDT.dsl
Try other layouts.
You can use 5, 7, 11, 12 and 13.

Sent from my SM-G930F using Tapatalk Pro

Link to comment
Share on other sites

@vit9696 Would you be able to help get this working on AMD boards? I've got ALC892 and I've tried a few times to get AppleALC working but not managed it. I've tried different layouts and I've added HDEF to my DSDT. Would like to get this working. Here's a dump from Darwin Dumper with modified DSDT, AppleALC and Lilu injected. If you need something else let me know and I can upload. Specs are in my signature.

https://www.dropbox.com/s/lo7xpey3pcn8gs5/DarwinDumper_3.0.4_21.03_19.06.05_MacPro6%2C1_Clover_X64_4392_High Sierra_17D102_shaneee.zip?dl=0

 

Link to comment
Share on other sites

2 hours ago, Shaneee said:

@vit9696 Would you be able to help get this working on AMD boards? I've got ALC892 and I've tried a few times to get AppleALC working but not managed it. I've tried different layouts and I've added HDEF to my DSDT. Would like to get this working. Here's a dump from Darwin Dumper with modified DSDT, AppleALC and Lilu injected. If you need something else let me know and I can upload. Specs are in my signature.

https://www.dropbox.com/s/lo7xpey3pcn8gs5/DarwinDumper_3.0.4_21.03_19.06.05_MacPro6%2C1_Clover_X64_4392_High Sierra_17D102_shaneee.zip?dl=0

 

Hey Shaneee! I think you should delete that actual HDEF Device you just added into the DSDT, and start renaming SBAZ to HDEF using clover patch, then rename the two SBAZ in the DSDT to HDEF, then apply on it your patch! If you look at your iOREG and LSPCI they both reports that the: (1002:4383) is the Audio Device!

Also you maybe have to rename other devices such as: LPC0 to LPC, SMB0 to SBUS, TMR to TIMR, PIC to IPIC, DMA1 to DMAC, USB's as well

Edited by ammoune78
Link to comment
Share on other sites

31 minutes ago, ammoune78 said:

Hey Shaneee! I think you should delete that actual HDEF Device you just added into the DSDT, and start renaming SBAZ to HDEF using clover patch, then rename the two SBAZ in the DSDT to HDEF, then apply on it your patch! If you look at your iOREG and LSPCI they both reports that the: (1002:4383) is the Audio Device!

Also you maybe have to rename other devices such as: LPC0 to LPC, SMB0 to SBUS, TMR to TIMR, PIC to IPIC, DMA1 to DMAC, USB's as well

Ok I got a fresh DSDT and renamed SBAZ to HDEF and added the layout. I've renamed other devices too but still noting. Here's an updated dump of IOREG, LSPCI and audio. Any suggestions?

https://www.dropbox.com/s/nuwl2rbmwg7bgsn/DarwinDumper_3.0.4_21.03_22.26.43_MacPro6%2C1_Clover_X64_4392_High Sierra_17D102_shaneee.zip?dl=0

Link to comment
Share on other sites

Excuse me i forgot, you should rename LPC0 to LPCB, another thing is that your device HDEF is placed in the: 00140002 address instead of 001B0000! But if you use clover you have that patch section under ACPI that allows you to rename devices, because your board maybe have some other SSDT's and that aren't extracted with clover or any other app, so when you use clover patches, it search on the entire UEFI image to find that specific name!

So my suggestion is, trying clover patches for SBAZ to HDEF, renaming SBAZ to HDEF in the DSDT, will help to avoid any other SSDT that have SBAZ on it and who can stop AppleALC to use that HDEF. Also try to change that address from 00140002 to 001B0000 and also if you want change that 

Spoiler

Device (HDEF)
            {
                Name (_ADR, 0x00140002)  // _ADR: Address
                OperationRegion (PCI, PCI_Config, Zero, 0x0100)
                Field (PCI, AnyAcc, NoLock, Preserve)
                {
                    Offset (0x42), 
                    DNSP,   1, 
                    DNSO,   1, 
                    ENSR,   1
                }

                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x1B, 
                    0x04
                })
                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"
                        }
                    })
                }
            }

To something like that:

Spoiler

Device (HDEF)
            {
                Name (_ADR, 0x001B0000)  // _ADR: Address
                OperationRegion (HDAR, PCI_Config, 0x4C, 0x10)
                Field (HDAR, WordAcc, NoLock, Preserve)
                {
                    DCKA,   1, 
                    Offset (0x01), 
                    DCKM,   1, 
                        ,   6, 
                    DCKS,   1, 
                    Offset (0x08), 
                    Offset (0x09), 
                    PMEE,   1, 
                        ,   6, 
                    PMES,   1
                }

                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x1B, 
                    0x04
                })
                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"
                        }
                    })
                }
            }

and try other layouts

For my desktop, I use this patch:

Spoiler

#
# HDEF ALC887
# Fix HDEF device for the Realtek ALC887 audio codec
into device label HDEF insert begin
Method (_DSM, 4, NotSerialized)\n
{\n
    Store (Package () {\n
        "device_type", Buffer () {"Realtek ALC887"},\n
        "codec-id", Buffer () {0x87,0x08,0xEC,0x10},\n
        "layout-id", Buffer () {0x01,0x00,0x00,0x00},\n
        "PinConfigurations", Buffer (Zero) {},\n
        "MaximumBootBeepVolume", Buffer(One) {0x00},\n
        "MultiEQDevicesPresence", Buffer () {0x00,0x00,0x01,0x00},\n
    }, Local0)\n
    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))\n
    Return (Local0)\n
}\n
end;

 

Edited by ammoune78
Link to comment
Share on other sites

11 hours ago, ammoune78 said:

Excuse me i forgot, you should rename LPC0 to LPCB, another thing is that your device HDEF is placed in the: 00140002 address instead of 001B0000! But if you use clover you have that patch section under ACPI that allows you to rename devices, because your board maybe have some other SSDT's and that aren't extracted with clover or any other app, so when you use clover patches, it search on the entire UEFI image to find that specific name!

So my suggestion is, trying clover patches for SBAZ to HDEF, renaming SBAZ to HDEF in the DSDT, will help to avoid any other SSDT that have SBAZ on it and who can stop AppleALC to use that HDEF. Also try to change that address from 00140002 to 001B0000 and also if you want change that 

  Reveal hidden contents

To something like that:

  Reveal hidden contents

and try other layouts

For my desktop, I use this patch:

  Reveal hidden contents

 

Still can't get it working. Here is my DSDT, the original DSDT and my config. Can you have a look and work some magic? DSDT isn't my strong point lol

 

Shaneee_.zip

Link to comment
Share on other sites

 

24 minutes ago, Shaneee said:

Still can't get it working. Here is my DSDT, the original DSDT and my config. Can you have a look and work some magic? DSDT isn't my strong point lol

 

Shaneee_.zip

Before trying something, can you remove the AppleHDA patches from the "KernelAndKextPatches and Devices>Audio>Inject + ResetHDA" in Config.plist, also remove any existing VoodooHDA or any AudioKext? keep only AppleALC in the EFI/Clover/Kexts/Other folder and Original AppleHDA in S/L/E

Edited by ammoune78
Link to comment
Share on other sites

12 minutes ago, ammoune78 said:

 

Before trying something, can you remove the AppleHDA patches from the "KernelAndKextPatches and Devices>Audio>Inject + ResetHDA" in Config.plist, also remove any existing VoodooHDA or any AudioKext? keep only AppleALC in the EFI/Clover/Kexts/Other folder and Original AppleHDA in S/L/E

Ok I've removed those and still nothing. I'd already removed VoodooHDA and AppleHDA hasn't been touched.

Link to comment
Share on other sites

Hi guys, I have one question about the latest version of the AppleALC 1.2.3,i see the changelog say "Added automatic rename for HDEF device',so I use the latest version,and i removed the dsdt patch HDAS-HDEF in the config.plist , then reboot, but audio does't work ! So I check the dsdt.aml and I found AppleALC hasn't rename the audio device name to HDEF,i was confuse, may I miss something?:(

Link to comment
Share on other sites

1 hour ago, Shaneee said:

Ok I've removed those and still nothing. I'd already removed VoodooHDA and AppleHDA hasn't been touched.

I did renaming USB's to UHCX, LPC0 to LPCB, SMB0 to SBUS, SBAZ to HDEF with changing it's OperationRegion, COPR to MATH, PIC to IPIC, DMA1 to DMAC, TMR to TIMR! Also added BUS0, LPCB, HDEF, GFX1 with HDAU _DSM with DTGP and the second with SATA patch

 

Shaneee DSDT aml:dsl.zip

Shaneee DSDT + SATA aml:dsl.zip

12 minutes ago, Shaneee said:

I've got HDEF showing in the IOREG now and I think it's correct. AppleALC and Lilu are loaded but nothing else :(

Screenshot 2018-03-22 13.47.01.png

Try other Layout ID's supported for ALC892

Link to comment
Share on other sites

16 minutes ago, ammoune78 said:

I did renaming USB's to UHCX, LPC0 to LPCB, SMB0 to SBUS, SBAZ to HDEF with changing it's OperationRegion, COPR to MATH, PIC to IPIC, DMA1 to DMAC, TMR to TIMR! Also added BUS0, LPCB, HDEF, GFX1 with HDAU _DSM with DTGP and the second with SATA patch

 

Shaneee DSDT aml:dsl.zip

Shaneee DSDT + SATA aml:dsl.zip

Try other Layout ID's supported for ALC892

 

Still a no go. I've tried layouts 1, 2, 3 and 5. What others are supported? Also with the DSDT you made HDEF disappeared from the IOREG.

Link to comment
Share on other sites

Did you tried other layout's with the DSDT from where you got this iOREG?

15 minutes ago, Shaneee said:

 

Still a no go. I've tried layouts 1, 2, 3 and 5. What others are supported? Also with the DSDT you made HDEF disappeared from the IOREG.

 

Link to comment
Share on other sites

I think it's just an _DSM Method that need to be changed with the DSDT for iOREG you showed, change that _DSM because I had same thing for my Laptop when I changed the _DSM the HDEF reappeared and worked with AppleALC, you can see it in few posts ago here!

Link to comment
Share on other sites

@jin2k9

Try this:

Trial_CX20641_LayoutID11_(0B).zip

AppleALC and Lilu in Clovers /other folder
original AppleHDA in S/L/E is required
delete all VoodooHDA files
KextInject "YES" in Clover

Inject via Clover:
Inject 11 and set FixHDA

Inject via DSDT:
DSDT / HDEF is 0B (= 11) not set FixHDA in Clover

your dump:

CX20641.png.aaae2dad42b1dba91e47017f0142f7b0.png

Nodes:

28 - 16
25 - 17
20 - 26
21 - 27

@junoir

Try this:

Trial_CX20642_LayoutID11_(0B).zip

AppleALC and Lilu in Clovers /other folder
original AppleHDA in S/L/E is required
delete all VoodooHDA files
KextInject "YES" in Clover

Inject via Clover:
Inject 11 and set FixHDA

Inject via DSDT:
DSDT / HDEF is 0B (= 11) not set FixHDA in Clover

your dump:

CX20642.png.5e4831cb3d957e0fbe45b0c0c43be397.png

Nodes:

28 - 16
25 - 17
20 - 26
21 - 29


Both first attempts in ManualMode!
If it works later in SwitchMode configuration!

have fun :D

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

2 hours ago, Shaneee said:

 

Still a no go. I've tried layouts 1, 2, 3 and 5. What others are supported? Also with the DSDT you made HDEF disappeared from the IOREG.

 

Did you apply the IRQ fix to your DSDT? (Check rehabman’s DSDT patches on fithub).

 

For me, AppleHDA refused to load without that patch.

  • Like 1
Link to comment
Share on other sites

3 hours ago, MacPeet said:

 

@junoir

Try this:

Trial_CX20642_LayoutID11_(0B).zip

AppleALC and Lilu in Clovers /other folder
original AppleHDA in S/L/E is required
delete all VoodooHDA files
KextInject "YES" in Clover

Inject via Clover:
Inject 11 and set FixHDA

Inject via DSDT:
DSDT / HDEF is 0B (= 11) not set FixHDA in Clover

your dump:

CX20642.png.5e4831cb3d957e0fbe45b0c0c43be397.png

Nodes:

28 - 16
25 - 17
20 - 26
21 - 29


Both first attempts in ManualMode!
If it works later in SwitchMode configuration!

have fun :D

Great thanks, gonna give it a try and report back. One thing I don't get though, don't I have to also figure out a correct path map for each node for this to work? Or are there preconfigured correct layout ids that make this unnecessary?

Edit: Wooo, we're getting somewhere, I have sound output!(microphone I can not test since I don't have one at hand). What did you mean by SwitchMode config?

Edited by junoir
Link to comment
Share on other sites

×
×
  • Create New...