Jump to content

AppleALC — dynamic AppleHDA patching


vit9696
5,371 posts in this topic

Recommended Posts

Guys, I'm compiling AppleALC from latest commit with Xcode 11.3, but never get release folder, I only get Debug, I'm doing something wrong or I forget something? Also, in the debug folder there's resourceconverter file, what is the use of it?

Link to comment
Share on other sites

On 10/7/2020 at 10:20 PM, ammoune78 said:

Guys, I'm compiling AppleALC from latest commit with Xcode 11.3, but never get release folder, I only get Debug, I'm doing something wrong or I forget something? Also, in the debug folder there's resourceconverter file, what is the use of it?

Download MacKernelSDK from https://github.com/acidanthera/MacKernelSDK and follow the instructions.

Just one thing rename the folder to MacKernelSDK. I compiled AppleALC 1.5.3 successfully.

I also put the folder named MacKernelSDK and Lilu.kext to the root of the AppleALC master folder.

 

Link to comment
Share on other sites

On 3/25/2019 at 5:18 AM, nqseo said:

Sorry, I don't understand that. Is that what you said?

Codec.txt

hi i have the same issue as this guy and the same codec output (except he has xps 9375 and i have 9380) alc299 layout id 22 everything is working(speakers and internal mic) but have noise when i insere combo jack i tried the fix from https://github.com/wdubaiyu/Hackintosh-Dell-XPS-9380 alc plug fix but it didnt working (sometimes i have to try different combination of sleep insert remove jack to get to work)  any solution for this 

xps9380EffectiveNode (2).txt

codec.0 (2).txt

catalina 10.15.5

Edited by zouhir111
Link to comment
Share on other sites

On 9/25/2020 at 11:08 PM, najeeb_anwer said:

I have installed macOS Catalina (10.15.7) on a Dell XPS 13 9300 and I'm trying to get the audio working.

 

Hardware & Software configuration:

CPU: Intel Core i7-1065G7 (Ice Lake)

GPU: Intel Iris Plus Graphics

RAM: 32GB

Disk: Samsung 970 EVO Plus 2TB NVMe SSD

Bootloader: OpenCore 0.6.2

SystemProductName: MacBookAir9,1

 

The OS loads properly but the audio output from the internal speakers does not work.

 

I am using AppleALC. The codec is Realtek ALC289. There are two available layout ids in AppleALC and I have tried them both. I have better luck with layout id 11 (0B) as it appears to load and shows both the internal speakers and internal microphone.

 

The microphone registers sounds in Sound Preferences, but there is no output from the speakers at all. As a result, video does not play either. If I connect to an Airplay Display, then both audio and video work.

 

I have tried adding SSDT-HPET just in case there are any IRQ conflicts with the audio device, but it made no difference.

 

I have attached the codec info from Ubuntu so that maybe some kind soul can add this as a new layout id for ALC289 for Dell XPS 13 9300.

 

Dell XPS 13 9300 - codec0.txt

 

Thanks in advance for any help you can provide.

 

I followed the instructions at: https://github.com/F0x1c/AppleALC_Instructions (I have attached a reformatted version of these instructions as a Word document).

 

These are the steps I followed:

1. Cloned AppleALC from the repository

2. Added Lilu.kext and MacKernelSDK to the downloaded AppleALC folder

3. Verified that building the kext with Xcode 12 works

4. Added my PinConfig information to Resources/PinConfig.kext/Contents/Info.plist (attached) Info.plist

5. Updated Resources/ALC289/Info.plist to add Layout id 12 and Platforms id 12 (see ALC289.zip)

6. Used the existing layout11.xml in Resources/ALC289 to create layout12.xml (see ALC289.zip)

7. Used the existing Platforms11.xml in Resources/ALC289 to create Platforms12.xml (see ALC289.zip)

8. Rebuilt AppleALC.kext and replaced the kext in EFI/OC/Kexts

9. Updated EFI/OC/config.plist to use layout-id 12

10. Rebooted

 

Still no audio from the speakers or headphones.

 

I have attached a Word document with my understanding of the changes required for the PinConfigs and layout/platforms (see AppleALC - Realtek ALC289.docx). I would appreciate any help/guidance on what to try next to get the audio working.

AppleALC Instructions.docx

ALC289.zip

AppleALC - Realtek ALC289.docx

Link to comment
Share on other sites

4 hours ago, najeeb_anwer said:

 

I followed the instructions at: https://github.com/F0x1c/AppleALC_Instructions (I have attached a reformatted version of these instructions as a Word document).

 

These are the steps I followed:

1. Cloned AppleALC from the repository

2. Added Lilu.kext and MacKernelSDK to the downloaded AppleALC folder

3. Verified that building the kext with Xcode 12 works

4. Added my PinConfig information to Resources/PinConfig.kext/Contents/Info.plist (attached) Info.plist

5. Updated Resources/ALC289/Info.plist to add Layout id 12 and Platforms id 12 (see ALC289.zip)

6. Used the existing layout11.xml in Resources/ALC289 to create layout12.xml (see ALC289.zip)

7. Used the existing Platforms11.xml in Resources/ALC289 to create Platforms12.xml (see ALC289.zip)

8. Rebuilt AppleALC.kext and replaced the kext in EFI/OC/Kexts

9. Updated EFI/OC/config.plist to use layout-id 12

10. Rebooted

 

Still no audio from the speakers or headphones.

 

I have attached a Word document with my understanding of the changes required for the PinConfigs and layout/platforms (see AppleALC - Realtek ALC289.docx). I would appreciate any help/guidance on what to try next to get the audio working.

AppleALC Instructions.docx

ALC289.zip

AppleALC - Realtek ALC289.docx

 

You can try merging this patch into your AppleALC source, and let me know if it helps.  I've been working with someone else with an Ice Lake laptop, and this resolved it for them as well.

cd AppleALC
wget https://github.com/fewtarius/AppleALC/commit/1dbba6491ea94eeef98b322254133d2f3e166f15.patch
patch -p1 <1dbba6491ea94eeef98b322254133d2f3e166f15.patch

Then build with Xcode like before.

Edited by fewtarius
Link to comment
Share on other sites

5 hours ago, fewtarius said:

You can try merging this patch into your AppleALC source, and let me know if it helps.  I've been working with someone else with an Ice Lake laptop, and this resolved it for them as well.

 

@fewtarius Thanks.

Strangely, AppleALC.kext with this patch causes the system to hang. I get both the internal and external display showing a blank, backlit screen and the wifi dongle activity light (which is my only indication that the system is still running) stops blinking. I turned on verbose boot, but unfortunately the hang occurs after the system is fully booted.

 

I restored my backup copy of AppleALC.kext and the system is running again.

I have attached the modified Controllers.plist; please let me know if I have made a mistake with the patch. I used the diff output to manually update the file, not the patch instructions you provided.

Controllers.plist

Link to comment
Share on other sites

5 hours ago, najeeb_anwer said:

 

@fewtarius Thanks.

Strangely, AppleALC.kext with this patch causes the system to hang. I get both the internal and external display showing a blank, backlit screen and the wifi dongle activity light (which is my only indication that the system is still running) stops blinking. I turned on verbose boot, but unfortunately the hang occurs after the system is fully booted.

 

I restored my backup copy of AppleALC.kext and the system is running again.

I have attached the modified Controllers.plist; please let me know if I have made a mistake with the patch. I used the diff output to manually update the file, not the patch instructions you provided.

Controllers.plist

 

It's not really possible that the patch itself caused that condition, as it only adds the patch data and does nothing else.  Your Controllers.plist and the patch are the same.  Did it work?

 

$ diff Resources/Controllers.plist ~/Downloads/Controllers.plist
$

 

Edited by fewtarius
Link to comment
Share on other sites

10 hours ago, fewtarius said:

It's not really possible that the patch itself caused that condition, as it only adds the patch data and does nothing else.  Your Controllers.plist and the patch are the same.  Did it work?

 

I agree with you that the patch itself should not cause the system to hang, but it does. I have tried rebuilding AppleALC.kext with and without the patch and no other changes. The patched version always causes the problem.

Link to comment
Share on other sites

HI Guys,

I have a HP HPE 590UK motherboard with IDT 92HD89E2.

I have followed the instructions and modified pinconfigs.kext with pin configurator.

 

I can see my codec entered at the end

 

I notice layoutid=0

 

How do I work out the layoutid?

 

Should I create a layout xml?

 

I've attached my linux dump in case it helps

codec_dump.txt

Link to comment
Share on other sites

@fewtarius Can you please explain what your additional patch in Controllers.plist does?

 

The two existing patches for "Icelake Smart Sound Technology Audio Controller" are simply replacing the device id a170 with device id 34c8.

Patch 1:
Find: 70a10000
Replace: c8340000

Patch 2:
Find: 868070a1
Replace: 8680c834

 

Your patch is:

Patch 3:
Find: 0e0000be020000004889df
Replace: 0e0000b8709d0000eb0690

I would like to understand what this does so that I can try to figure out why it doesn't work on my system.

Thanks.

Link to comment
Share on other sites

2 hours ago, najeeb_anwer said:

@fewtarius Can you please explain what your additional patch in Controllers.plist does?

 

The two existing patches for "Icelake Smart Sound Technology Audio Controller" are simply replacing the device id a170 with device id 34c8.

Patch 1:
Find: 70a10000
Replace: c8340000

Patch 2:
Find: 868070a1
Replace: 8680c834

 

Your patch is:

Patch 3:
Find: 0e0000be020000004889df
Replace: 0e0000b8709d0000eb0690

I would like to understand what this does so that I can try to figure out why it doesn't work on my system.

Thanks.

 

Look here.

Link to comment
Share on other sites

7 hours ago, fewtarius said:

Look here.

 

Thanks. I rebuilt AppleALC.kext by cloning from your repo and your commit db564f0; the only changes I made were to add my updated Info.plist, layout12.xml and Platforms12.xml to the Resources/ALC289 folder.

 

I got the same problem. The system freezes with blank screens. I do however hear a "beep" from the internal speakers before the system hangs, so the patch may be working. But, obviously, it's not much use if the system freezes.

 

Since I have an IceLake laptop that is having this problem, I am willing to try any experiments that you suggest to get this working. Maybe @lvs1974 or @vit9696 could provide some insight.

Link to comment
Share on other sites

48 minutes ago, najeeb_anwer said:

 

Thanks. I rebuilt AppleALC.kext by cloning from your repo and your commit db564f0; the only changes I made were to add my updated Info.plist, layout12.xml and Platforms12.xml to the Resources/ALC289 folder.

 

I got the same problem. The system freezes with blank screens. I do however hear a "beep" from the internal speakers before the system hangs, so the patch may be working. But, obviously, it's not much use if the system freezes.

 

Since I have an IceLake laptop that is having this problem, I am willing to try any experiments that you suggest to get this working. Maybe @lvs1974 or @vit9696 could provide some insight.

 

Did you try the test build that's in the PR?

Link to comment
Share on other sites

30 minutes ago, fewtarius said:

Did you try the test build that's in the PR?

 

Yes, I did. I placed your test build in EFI/OC/Kexts.

If I boot with an invalid alc-id = 12 (invalid because that alc-id does not exist in ALC289 without my additions), the system boots fine, although, of course, the audio is completely disabled.

If I change to alc-id = 11 (which is one of the existing ids for ALC289) and reboot, I get the same problem - blank screens and system freeze.

Link to comment
Share on other sites

8 hours ago, fewtarius said:

Did you try the test build that's in the PR?

 

Just a couple of questions to try to figure out why I have this problem when the other testers are reporting success:

 

1. Are any of the other testers using OpenCore as the bootloader? I am using OC 0.6.2.

 

2. Does the order of the Kexts matter, other than Lilu.kext being loaded first? My current load sequence is:

- Lilu.kext

- VirtualSMC.kext

- {SMC kexts}

- AppleALC.kext

- IntelBluetoothFirmware.kext

- IntelBluetoothInjector.kext

- NVMeFix.kext

- NoTouchID.kext

- NullEthernet.kext

- USBPorts.kext

- VoodooI2C.kext

- VoodooI2CHID.kext

- {VoodooI2C plugin kexts}

- VoodooPS2Controller.kext

- {VoodooPS2Controller plugin kexts}

- WhateverGreen.kext

- AirportItlwm.kext

 

 

Link to comment
Share on other sites

On 10/16/2020 at 11:58 AM, fewtarius said:

That spawned a theory that my original PR/Controller patch was incorrect as C89D0000 appears under controller #11 (WhiskeyLake Mobile PCH HD Audio).  Thinking I could correct support for my comet lake controller 0x8086 0x02C8 I replaced my original controller patch with a copy of #11 and modified the replace instances to patch for my controller.

 

Unfortunately, that didn't correct my issue.  It's loading up, and it looks like everything is fine but there's no output from the speakers or headphones.  If I switch back to the FakePCIID and reboot, everything is working again.  I also have a custom layout that works perfectly with FakePCIID but not with the controller patch.

 

Any advice on what to try next?  Logs are below, and here's a link to the patch.

Hi @fewtarius... @MacPeet recommended you to me ... He said you might have an idea on how to get a ALC269VC running (NVisen Y-MU01 with a i5-8265U)? I've tried all kinds of platform-ids or AppleALC ids but never got beyond the stage documented in the attached screenshots. Using an USB audio interface everything works fine. Under Linux I can do a audio codec dump but only get the Intel HDMI audio. Any thoughts?

Bildschirmfoto 2020-09-07 um 22.01.06.png

Bildschirmfoto 2020-09-07 um 22.01.16.png

Bildschirmfoto 2020-09-09 um 20.55.25.png

Edited by Bradamante
Link to comment
Share on other sites

3 hours ago, Bradamante said:

Hi @fewtarius... @MacPeet recommended you to me ... He said you might have an idea on how to get a ALC269VC running (NVisen Y-MU01 with a i5-8265U)? I've tried all kinds of platform-ids or AppleALC ids but never got beyond the stage documented in the attached screenshots. Using an USB audio interface everything works fine. Under Linux I can do a audio codec dump but only get the Intel HDMI audio. Any thoughts?

Bildschirmfoto 2020-09-07 um 22.01.06.png

Bildschirmfoto 2020-09-07 um 22.01.16.png

Bildschirmfoto 2020-09-09 um 20.55.25.png

 

Could be a couple of things.  If you have Windows, go to Device Manager and select view by connection.  Expand your audio devices.  If anything is connected under Intel Smart Sound Technology, it won't work in macOS.  If it's connected under the Realtek codec, you may be able to get it working.  Try running Corp's CheckAudio, if it indicates that you don't have a codec you'll probably need to use SSDTTime and patch your legacy IRQs.  Option C.  You'll need the patches and the SSDT.  Outside of those things, it would be impossible to diagnose without hardware and software configuration data. 

Link to comment
Share on other sites

On 10/19/2020 at 5:18 PM, najeeb_anwer said:
On 10/19/2020 at 4:35 PM, fewtarius said:

Did you try the test build that's in the PR?

 

Yes, I did. I placed your test build in EFI/OC/Kexts.

If I boot with an invalid alc-id = 12 (invalid because that alc-id does not exist in ALC289 without my additions), the system boots fine, although, of course, the audio is completely disabled.

If I change to alc-id = 11 (which is one of the existing ids for ALC289) and reboot, I get the same problem - blank screens and system freeze.

 

I have tried disabling unnecessary kexts - doesn't help.

Anything else that I can try?

Is there any diagnostic info that I can provide that will help determine what the problem is?

Link to comment
Share on other sites

Can anybody help me.out? I have conexant 8150, alc Id 22 . On latest big sur , my mic only works if I put the computer to sleep and then.immediayely wake. This only happened when I went from beta 4 - latest. I have to use cc for mic to even be recognized and installed to l/e. I've done irq patches and also have an acpi for the codec and mic that worked through catalina. Thanks in advance

Sent from my Pixel 4 using Tapatalk

Link to comment
Share on other sites

On 10/20/2020 at 11:07 PM, fewtarius said:

 Try running Corp's CheckAudio, if it indicates that you don't have a codec you'll probably need to use SSDTTime and patch your legacy IRQs.

Hm let's see ...

#######################################################
 #                    CheckAudio                       #
#######################################################

Finding Codecs...
 - Found 1

Iterating codecs:

 - Intel 280b
 --> ID:       0x8086280b
 --> Revision: 0x100000

Checking kexts:

Locating Lilu...
 - Found v1.4.7
Checking for Lilu plugins...
 - Locating AppleALC...
 --> Found v1.5.2
 - Locating WhateverGreen...
 --> Found v1.4.2
Locating AppleHDA...
 - Found v282.54

Locating HDEF devices...
 - Located 1

Iterating HDEF devices:

 - HDEF@1F,3 - PciRoot(0x0)/Pci(0x1f,0x3)
 --> built-in:            <00>
 --> alc-layout-id:       <37000000>
 --> layout-id:           <07000000>
 --> hda-gfx:             <"onboard-1">
 --> no-controller-patch: Not Present

Locating HDAU devices...
 - None found!

Gathering inputs/outputs...
 - None found!

Saving log...

Done.

Windows install is next … Hm I installed Win 10 Fresh and let all Auto updates run ... Apparently there is no Audio device at all. On the Bottom Right the Audio Symbol Shows a red cross. Starting iTunes for Windows the Software complains there is no Audio device. The Problem solving thingy that Windows offers doesn't solve anything ...

20201025Audio.jpg

Edited by Bradamante
Link to comment
Share on other sites

  • 2 weeks later...
On 10/19/2020 at 5:18 PM, najeeb_anwer said:
On 10/19/2020 at 4:35 PM, fewtarius said:

Did you try the test build that's in the PR?

 

Yes, I did. I placed your test build in EFI/OC/Kexts.

If I boot with an invalid alc-id = 12 (invalid because that alc-id does not exist in ALC289 without my additions), the system boots fine, although, of course, the audio is completely disabled.

If I change to alc-id = 11 (which is one of the existing ids for ALC289) and reboot, I get the same problem - blank screens and system freeze.

 

@fewtarius, I notice that the latest release of AppleALC includes your Controllers.plist patch.

 

I would like to reiterate that this patch causes my system to freeze. All I have to do is to set alc-id=11 (for codec ALC289) and reboot with the new AppleALC and the system freezes. If I revert to the older version of AppleALC the system boots fine.

 

Like I said before, I am willing to provide diagnostic information or try test versions of AppleALC to resolve this issue. I am convinced that I am not the only one with an Ice Lake laptop that will have this problem.

Link to comment
Share on other sites

On 11/3/2020 at 3:59 PM, najeeb_anwer said:

 

@fewtarius, I notice that the latest release of AppleALC includes your Controllers.plist patch.

 

I would like to reiterate that this patch causes my system to freeze. All I have to do is to set alc-id=11 (for codec ALC289) and reboot with the new AppleALC and the system freezes. If I revert to the older version of AppleALC the system boots fine.

 

Like I said before, I am willing to provide diagnostic information or try test versions of AppleALC to resolve this issue. I am convinced that I am not the only one with an Ice Lake laptop that will have this problem.

 

There is something else wrong with your configuration that is causing your system to freeze, perhaps an IRQ conflict.  Lots of people chimed in on the PR and confirmed that it corrected their audio issues.

On 10/25/2020 at 2:43 PM, Bradamante said:

Hm let's see ...

Windows install is next … Hm I installed Win 10 Fresh and let all Auto updates run ... Apparently there is no Audio device at all. On the Bottom Right the Audio Symbol Shows a red cross. Starting iTunes for Windows the Software complains there is no Audio device. The Problem solving thingy that Windows offers doesn't solve anything ...

 

 

It sounds like there may be something wrong with your hardware if audio is also not working in Windows.

Link to comment
Share on other sites

×
×
  • Create New...