Jump to content

AppleALC — dynamic AppleHDA patching


vit9696
5,371 posts in this topic

Recommended Posts

On 1/22/2021 at 7:43 AM, biscate said:

Hello guys.

 

Need help to build my AppleALC... or create a variation from the CX8400.

 

My codec is similar to the CX8400, for HP Elitebook 1050 G1 (by tyufhl & kuque), but using layout 12 I have no mic and speakers sound (only headphones).

 

No lucky trying to dump the codec using Linux (last Ubuntu live version), as explained in the AppleALC tutorial.

 

Thanks

 

Get VoodooHDA and run the getdump command and post your results.

 

As a side note, I have the same codec and could never quite get it to work properly, my speaker out works for a few seconds then nothing, no errors, nothing, very strange. everything else worked fine though, and voodoohda works, so it must be something the apple driver is doing.

Link to comment
Share on other sites

On 1/24/2021 at 11:03 PM, hugodlc said:

 

Get VoodooHDA and run the getdump command and post your results.

 

As a side note, I have the same codec and could never quite get it to work properly, my speaker out works for a few seconds then nothing, no errors, nothing, very strange. everything else worked fine though, and voodoohda works, so it must be something the apple driver is doing.

Hey, @hugodlc, sorry for late response, had no email notification set.

 

UPDATE

 

Ok, I've installed VoodooHDA (with no errors) but got no audio devices after reboot.

Verified that AppleALC was removed from kext folder and OC/kernel/add configurations.

 

I notice Big Sur has no usr/local/bin/ folder, only usr/bin/ (usr/local/ is completelly empty).

 

And, btw, how to dump the codec with VoodooHDA?

 

Got partially VoodooHDA to work after follow solution 2 from olarila forum:

Speakers: workiing

Headphones: working

Onboard mic: not working

 

----------------------------

Problem: kext doesn't work (usually when there's more than one audio card or the video card has HDMI audio).

Solution: use solution 2 for kernel panic problem above. If you want to use both cards, create one entry for each card in IOKitPersonalities.

 

Solution 2: edit Info.plist, replace the key IOPCIClassMatch by IOPCIPrimaryMatch and put the PCI ID of your audio card in string.

----------------------------

 

Device used: 0X34C88086

Device 0x34C88086.rtf

Edited by biscate
Link to comment
Share on other sites

I have macOS 11.2 running on a Dell XPS 13 9300 (Ice Lake).

I have a USB-C monitor connected via a USB-C cable that also supplies power to the system. It all seems to work fine until I try to use AppleALC.

If I use any valid layout-id for ALC289 (the codec for this system), the system freezes after boot is complete but before the login window - but only if the USB-C monitor is connected.

If I boot the system with just the internal display then the system does not freeze and AppleALC works fine. VoodooHDA works with the external monitor connected, but I would prefer to use AppleALC.

I thought that the problem might be caused by the code in AppleALC/Whatevergreen that converts DP to HDMI for HDMI audio to work, so I disabled the HDMI patches but that did not make any difference.

1964506772_ScreenShot2021-01-28at3_59_34PM.png.77f3c5627813ccf674453838c16c6667.png

1427826843_ScreenShot2021-01-28at4_11_17PM.thumb.png.54c9615de5bdbac30cedb9605ca51a4f.png

I would appreciate any help to figure this out. Or, if this is a problem with AppleALC dealing with USB-C monitors, I would be happy to try out test versions of AppleALC.

 

Link to comment
Share on other sites

  • 2 weeks later...

I am running Big Sur on Lenovo M920s, AppleALC installed and identified the Audio card as Realtek ALC235. It works fine with the internal speaker, but it doesn't work if I use the external speakers plugged into the rear jack.

I boot into Linux and it shows me the audio card is actually ALC233.

 

Screen Shot 2021-02-16 at 4.37.11 PM.png

MicrosoftTeams-image.png

Link to comment
Share on other sites

  • 2 weeks later...
On 3/7/2016 at 5:46 PM, 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.

 

Hi,

 

I've installed Big Sur 11.2.1 using OpenCore guide (0.6.6). I can't get sound working on my headset using 3.5mm jack plug, here is the Hackintosh info:

1. Laptop Acer Nitro 5 AN515-55
2. ALC295
3. Layout id: 21
4. Big Sur 11.2.1
5. Codec dump attached

 

P.S.: The sound is working well through Built-in speakers, but stops working after sleep. I'm using Lilu.kext along with AppleALC.kext.

 

Any help would be really appreciated.

 

Regards,

card0-codec#0.zip

Link to comment
Share on other sites

On 2/1/2021 at 5:21 PM, najeeb_anwer said:

I have macOS 11.2.1 running on a Dell XPS 13 9300 (Ice Lake).

I have a USB-C monitor connected via a USB-C cable that also supplies power to the system. It all seems to work fine until I try to use AppleALC.

If I use any valid layout-id for ALC289 (the codec for this system), the system freezes after boot is complete but before the login window - but only if the USB-C monitor is connected.

If I boot the system with just the internal display then the system does not freeze and AppleALC works fine. VoodooHDA works with the external monitor connected, but I would prefer to use AppleALC.

 

Hi everyone, how do I get help for this issue?

Is there any additional information that I need to provide?

Link to comment
Share on other sites

Hi all

Since my tablet combined jack is different form others so I am trying to build my own AppleALC.kext.
During patch the applealc, Im not sure that I picked right node for my machine and hope someone would correct me.
If I picked right node how can I edit the path in Platform.xml.

Thx for your advice

Details are below

I think my node:
18 Internal Mic Boost Volume
19 Internal Mic Boost Volume
20 Speaker Playback Switch
33 Headphone Playback Switch

 

Verbs from Linux Codec Dump File: codec_dump.txt

Codec: Realtek ALC3253   Address: 0   DevID: 283902501 (0x10ec0225)

   Jack   Color  Description                  Node     PinDefault             Original Verbs
--------------------------------------------------------------------------------------------------------
Digital Unknown  Mic at Oth Mobile-In        18 0x12   0xb7a60130   01271c30 01271d01 01271ea6 01271fb7
Digital   Black  Mic at Oth Mobile-Out       19 0x13   0xb8a61140   01371c40 01371d11 01371ea6 01371fb8
Analog Unknown  Speaker at Int N/A          20 0x14   0x90170110   01471c10 01471d01 01471e17 01471f90
Unknown Unknown  Line Out at Ext N/A         22 0x16   0x40000000   01671c00 01671d00 01671e00 01671f40
    1/8   Black  Speaker at Ext Rear         23 0x17   0x411111f0   01771cf0 01771d11 01771e11 01771f41
    1/8   Black  Speaker at Ext Rear         24 0x18   0x411111f0   01871cf0 01871d11 01871e11 01871f41
    1/8   Black  Speaker at Ext Rear         25 0x19   0x411111f0   01971cf0 01971d11 01971e11 01971f41
    1/8   Black  Speaker at Ext Rear         26 0x1a   0x411111f0   01a71cf0 01a71d11 01a71e11 01a71f41
Speaker at Ext Rear    0x1b 0x1b                        1091637744 01b71cf0 01b71d11     01b71e11 01b71f41
Unknown Unknown  SPDIF In at Ext N/A         29 0x1d   0x40c00001   01d71c01 01d71d00 01d71ec0 01d71f40
    1/8   Black  Speaker at Ext Rear         30 0x1e   0x411111f3   01e71cf3 01e71d11 01e71e11 01e71f41
    1/8   Black  HP Out at Ext Right         33 0x21   0x04211020   02171c20 02171d10 02171e21 02171f04
--------------------------------------------------------------------------------------------------------


   Jack   Color  Description                  Node     PinDefault             Modified Verbs
--------------------------------------------------------------------------------------------------------
Digital Unknown  Mic at Oth Mobile-In        18 0x12   0xb7a60130   01271c30 01271d00 01271ea6 01271fb0
Digital   Black  Mic at Oth Mobile-Out       19 0x13   0xb8a61140   01371c40 01371d10 01371ea6 01371fb0
Analog Unknown  Speaker at Int N/A          20 0x14   0x90170110   01471c10 01471d00 01471e17 01471f90
Unknown Unknown  Line Out at Ext N/A         22 0x16   0x40000000   01671c50 01671d00 01671e00 01671f40
Unknown Unknown  SPDIF In at Ext N/A         29 0x1d   0x40c00001   01d71c60 01d71d00 01d71ec0 01d71f40
    1/8   Black  Speaker at Ext Rear         30 0x1e   0x411111f3   01e71cf0 01e71d10 01e71e11 01e71f41
    1/8   Black  HP Out at Ext Right         33 0x21   0x04211020   02171c20 02171d10 02171e21 02171f00
--------------------------------------------------------------------------------------------------------

image.png.60b1d09b8d34984fd88e1cdcb3087057.png

Link to comment
Share on other sites

I can't build latest AppleALC build success but red mark.

I thing kern_resources.cpp missing

548999840_ScreenShot2021-03-13at4_47_05AM.thumb.png.3ef6f957deba8a9fd69f677610d6c885.png

please help

Thanks Team.

Link to comment
Share on other sites

On 3/13/2021 at 3:54 AM, nmano said:

I can't build latest AppleALC build success but red mark.

I thing kern_resources.cpp missing

548999840_ScreenShot2021-03-13at4_47_05AM.thumb.png.3ef6f957deba8a9fd69f677610d6c885.png

please help

Thanks Team.

 

Here are the steps:

 

1) Get the source  code for AppleALC:

cd ~/Developer

git clone https://github.com/acidanthera/AppleALC.git

 

2) Copy the latest Lilu.kext (debug version) into the AppleALC folder

 

3) Copy the MacKernelSDK folder (from https://github.com/acidanthera/MacKernelSDK) into the AppleALC folder

 

4) Start Xcode and open the AppleALC project. Ignore any warnings about MACOSX_DEPLOYMENT_TARGET.

 

5) Make sure you have active scheme set to "AppleALC -> My Mac" at the top. This selects the product to build.

 

6) From the Xcode menu, select "Product/Clean Build Folder" and then "Product/Build".

 

7) After a successful build, AppleALC.kext will be available in the "Products" folder in the Xcode Project Navigator - you can right-click and open the Finder window containing the created kext.

 

Hope this helps

  • Like 1
Link to comment
Share on other sites

5 hours ago, najeeb_anwer said:

 

Here are the steps:

 

save as script and run

#!/bin/sh
cd "$(dirname "$0")"

git clone https://github.com/acidanthera/Lilu
git clone https://github.com/acidanthera/MacKernelSDK
git clone https://github.com/acidanthera/AppleALC

cd MacKernelSDK
git pull

cd ../Lilu
git pull
ln -s ../MacKernelSDK MacKernelSDK
xcodebuild
xcodebuild -configuration Debug

cd ../AppleALC
git pull
ln -s ../MacKernelSDK MacKernelSDK
ln -s ../Lilu/build/Debug/Lilu.kext Lilu.kext
xcodebuild

 

Link to comment
Share on other sites

On 3/15/2021 at 10:40 AM, najeeb_anwer said:

 

Here are the steps:

 

1) Get the source  code for AppleALC:

cd ~/Developer

git clone https://github.com/acidanthera/AppleALC.git

 

2) Copy the latest Lilu.kext (debug version) into the AppleALC folder

 

3) Copy the MacKernelSDK folder (from https://github.com/acidanthera/MacKernelSDK) into the AppleALC folder

 

4) Start Xcode and open the AppleALC project. Ignore any warnings about MACOSX_DEPLOYMENT_TARGET.

 

5) Make sure you have active scheme set to "AppleALC -> My Mac" at the top. This selects the product to build.

 

6) From the Xcode menu, select "Product/Clean Build Folder" and then "Product/Build".

 

7) After a successful build, AppleALC.kext will be available in the "Products" folder in the Xcode Project Navigator - you can right-click and open the Finder window containing the created kext.

 

Hope this helps

Hi My Friend

I follow your steps 1-7

Still I can't build.please look my screen shot images.2147341768_ScreenShot2021-03-19at4_40_39AM.png.1bfa8b1a72f2176bcd31ccf7c70bad84.png

 

1572200460_ScreenShot2021-03-19at4_41_24AM.thumb.png.c048e3f876707720fe9c6a9fdeeddbf5.png

Thanks.

Link to comment
Share on other sites

7 hours ago, nmano said:

I follow your steps 1-7

 

Please make sure you follow step 5. According to your screen shot your active scheme is "ResourceConverter -> My Mac".

Click on where it currently says ResourceConverter at the top of the Xcode window and select AppleALC instead.

Edited by najeeb_anwer
  • Like 1
Link to comment
Share on other sites

8 hours ago, najeeb_anwer said:

 

Please make sure you follow step 5. According to your screen shot your active scheme is "ResourceConverter -> My Mac".

Click on where it currently says ResourceConverter at the top of the Xcode window and select AppleALC instead.

Thanks my friend I just found It.Its worked now.

Thank you so much.

655319267_ScreenShot2021-03-19at8_31_37PM.thumb.png.a0dc8c1c71093086c95fbfe48e0d8d01.png

 

Link to comment
Share on other sites

Hello,

i would like to know 2 things which i can't find in the AppleALC wiki :

1) Where should i place alc-verb executable so that AppleALC can use it correctly

2) I'm quite sure that the layout for my laptop is not perfect and i would try to create my own layout using the sound card dump i can obtain from linux but i can't find a single guide to achieve this goal. Is there somewhere an updated guide ?

Thanks

Mattia

 

Link to comment
Share on other sites

On 3/24/2021 at 9:20 AM, tmbt said:

2) I'm quite sure that the layout for my laptop is not perfect and i would try to create my own layout using the sound card dump i can obtain from linux but i can't find a single guide to achieve this goal. Is there somewhere an updated guide ?

 

I have attached the guide I used (AppleALC Instructions.docx) as well as the one specifically for my codec ALC289.

I hope this helps.

AppleALC Instructions.docx AppleALC - Realtek ALC289.docx

Link to comment
Share on other sites

  • 2 weeks later...

@MacPeet , can you help me with my alc256 on a Dell 5570 ?

I'm tring to use applealc.kext only , without the need of ssdt and codeccommander.

Problem is that audio from headphones  is sometimes distorted (there is a high pitch noise) and cpu stays at max speed.

Maybe the problem is the line in must be disabled ? or something else.

 

Hope you can help me.

 

 

codec_dump.txt BIG SUR.ioreg.zip

Link to comment
Share on other sites

@matgeo

 

LayoutID 11 is not from me either, the developer is @Rockjesus
LayoutID 21 is specially designed for the Dell 5570.
Maybe better ask these developers! Maybe they have the same Dell.

Sorry, but with the large selection of layoutIDs, I am not developing past the other developers.

Your problem "CPU on max" may also be due to incorrect power management.

 

1.thumb.png.8018ef509b457bc4175b6faead7388bf.png

Link to comment
Share on other sites

  • 2 weeks later...
On 2/1/2021 at 5:21 PM, najeeb_anwer said:

I have macOS 11.3 running on a Dell XPS 13 9300 (Ice Lake).

I have a USB-C monitor connected via a USB-C cable that also supplies power to the system. It all seems to work fine until I try to use AppleALC.

If I use any valid layout-id for ALC289 (the codec for this system), the system freezes after boot is complete but before the login window - but only if the USB-C monitor is connected.

If I boot the system with just the internal display then the system does not freeze and AppleALC works fine. VoodooHDA works with the external monitor connected, but I would prefer to use AppleALC.

I thought that the problem might be caused by the code in AppleALC/Whatevergreen that converts DP to HDMI for HDMI audio to work, so I disabled the HDMI patches but that did not make any difference.

1964506772_ScreenShot2021-01-28at3_59_34PM.png.77f3c5627813ccf674453838c16c6667.png

1427826843_ScreenShot2021-01-28at4_11_17PM.thumb.png.54c9615de5bdbac30cedb9605ca51a4f.png

I would appreciate any help to figure this out. Or, if this is a problem with AppleALC dealing with USB-C monitors, I would be happy to try out test versions of AppleALC.

 

 

Link to comment
Share on other sites

×
×
  • Create New...