Jump to content

AppleALC — dynamic AppleHDA patching


vit9696
5,371 posts in this topic

Recommended Posts

On 8/19/2021 at 5:30 AM, Allan said:

Hmm

 

Now Clover got some changes, did you set the quirks correctly?

 

You can take a look at this guide: 

 

Thank you so much for pointing out the issue from clover side.

Somehow with latest clover, AppleALC was not loading with "clover legacy layout-id inject" or "alcid=XX" or layout-id SSDT. 

Injecting layout id using device properties fixed the issue.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hello. I'm here again asking for help on the CX8400 AppleALC patch, included on the version 1.3.5.

  • Added CX8400 layout-id 12 for Elitebook 1050 G1 by tyufhl & kuque

My Acer laptop barely works with it, there is no speakers output and got microfone input issues.

I use to connect it to a bluetooth speaker to listen for music but nowadays using the laptop to work... and can't make meetings.

 

Thanks in advance.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Hey, I would like to ask for small assistance with ALC1220-VB on Gigabyte Z590 Aorus Elite AX. I've tested all of the available layouts, unfortunately while the device is detected and outputs are enumerated correctly there is no sound and the media playback is frozen at 0:00. Unfortunately I've failed with the patch since I cannot overcome the problem with frozen playback. In the attachment I've sent link to the full SysReport file and codec dump from Linux.

I'd appreciate every support since this is the only issue with the setup.

 

Cheers

SysReport_Z590_Aorus_Elite_AX.zip codec-dump-Z590.txt

Link to comment
Share on other sites

On 9/29/2021 at 4:19 PM, biscate said:

Hello. I'm here again asking for help on the CX8400 AppleALC patch, included on the version 1.3.5.

  • Added CX8400 layout-id 12 for Elitebook 1050 G1 by tyufhl & kuque

My Acer laptop barely works with it, there is no speakers output and got microfone input issues.

I use to connect it to a bluetooth speaker to listen for music but nowadays using the laptop to work... and can't make meetings.

 

Thanks in advance.

So, could someone tell me at least how to get a codec not found by the usual process using lynux terminal command?

I know device is CX8400 but can't get it using linux terminal.

Link to comment
Share on other sites

On 10/21/2021 at 2:12 AM, Resset said:

Hey, I would like to ask for small assistance with ALC1220-VB on Gigabyte Z590 Aorus Elite AX. I've tested all of the available layouts, unfortunately while the device is detected and outputs are enumerated correctly there is no sound and the media playback is frozen at 0:00. Unfortunately I've failed with the patch since I cannot overcome the problem with frozen playback. In the attachment I've sent link to the full SysReport file and codec dump from Linux.

I'd appreciate every support since this is the only issue with the setup.

 

Cheers

SysReport_Z590_Aorus_Elite_AX.zip 162.21 kB · 0 downloads codec-dump-Z590.txt 14.23 kB · 0 downloads

 

I am having exactly the same issue with the ALC1220-VB on the Gigabyte Z590 Aorus Master. All available layouts do not work; however, the device is detected but cannot seem to get any audio out, with any playback frozen at zero. Codecs attached.

codec0-ALC1200VB-Z590-Aorus-Master.txt

Link to comment
Share on other sites

  • 2 weeks later...

I prefer to have SPDIF output feeding my DAC for my audio needs. Currently I am using Realtek ALC887 based motherboard with ID=99. This works with the SPDIF riser card in my Gigabyte Z97-HD3 motherboard. (Thank you whoever added this in AppleALC v 1.1.2 )

 

Looking through the changelog, I see that only Realtek ALC887 and ALC892 have SPDIF support (ALC255 has also but I have not seen Gigabyte board with this).

 

As a result, my next motherboard update is kinda restricted. In fact I usually check this out before considering the board.

 

I can't see any guides in how to do this. Can someone point the way?

 

I see ALC1200 support is quite active in the changelog but no mention of SPDIF. How to look at the files to get SPDIF?

 

 

Link to comment
Share on other sites

AppleALC not persistant.

I need some help.

  • Asus PRIME B560M-A
  • Intel i7 11700
  • No discrete graphic for now (booted in vesa mode)
  • macOS Monterey 12.0.1
  • Opencore 0.7.5 (latest kexts)
  • Realtek ALC897 0x100402, tried layout ID 12, 23, 66, 69
  • HPET correctly present in IOReg
  • Lilu, AppleHDA and AppleALC loaded (see kextstat)
  • BIOS properly set
  • Windows 10 and Ubuntu 21.10 give proper sound
  • Audio source settings present in macOS System Preferences, but no sound

Thanks in advance

g.

 

Attacments:

EFI Folder

ALC linux dump

IOReg dump

Kextstat dump

 

giacomoleopardo's Asus PRIME B560M-A.zip

Edited by giacomoleopardo
Link to comment
Share on other sites

  • 2 weeks later...
On 10/24/2021 at 6:18 PM, Stonemage said:

 

I am having exactly the same issue with the ALC1220-VB on the Gigabyte Z590 Aorus Master. All available layouts do not work; however, the device is detected but cannot seem to get any audio out, with any playback frozen at zero. Codecs attached.

codec0-ALC1200VB-Z590-Aorus-Master.txt 14.24 kB · 1 download

 

Still wondering if anyone might be able to help with this. I am completely stuck :( 

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

i'm currently try to create my custom layout id, without luck, for my ALC256.
I've tried all the layout available and the best is 57 but it is not perfect (noise after sleep or sometime kernel process to 100% after sleep).

I've the dump created from linux. Could someone help me on this or at least pointing me on an updated guide to create a layout id for AppleALC starting from the dump ?

Thanks

Mattia

 

dump.txt.zip

Link to comment
Share on other sites

@vit9696

Audio ALC897 still not properly working.

New configuration. Added dGPU

  • Asus PRIME B560M-A
  • Intel i7 11700
  • dGPU Sapphire AMD Radeon HD 7870 2 GB (2x miniDP + HDMI + DVI)
  • macOS Monterey 12.0.1
  • Opencore 0.7.5 (latest kexts)
  • Realtek ALC897 0x100402, tried layout ID 12, 23, 66, 69
  • HPET correctly present in IOReg
  • Lilu, AppleHDA and AppleALC loaded (see kextstat)
  • BIOS properly set
  • Windows 10 and Ubuntu 21.10 give proper sound

Here are de scenarios:

Proper injection in DeviceProperties/PciRoot(0x0)/Pci(0x1F,0x3),either layout id 12, 23, 66, 69 (same results)
boot-args: none
RESULTS
Onboard audio: settings present, no sound
HDMI audio (via AMD Radeon HD 7870 2 GB): no devices detected
HDMI video output NOT WORKING (KP and boot loop)

 

Proper injection in DeviceProperties/PciRoot(0x0)/Pci(0x1F,0x3),either layout id 12, 23, 66, 69 (same results) + device-id_Data_C8060000 (courtesy of MaLd0n)
boot-args: none
RESULTS
Onboard audio: working properly
HDMI audio (via AMD Radeon HD 7870 2 GB): no devices detected

 

No injection in DeviceProperties
boot-args: alcid=12 (either 23,66 or 69, same results)
RESULTS
Onboard audio: settings present, no sound
HDMI audio (via AMD Radeon HD 7870 2 GB): working on all video out (HDMI, 2x miniDP, DVI)

 

scenarios.png.8c9430318407eba4dc88ec35edc659fc.png

 

 

Thanks in advance

g.

 

Attachments:

EFI Folder

ALC linux dump

IORegs link here

Kextstat dump

 

 

 

giacomoleopardo_EFI.zip Scenario_01.zip Scenario_02.zip Scenario_03.zip

 

linux_codec_dump.txt

Edited by giacomoleopardo
Link to comment
Share on other sites

  • 1 month later...
On 11/18/2021 at 1:18 PM, Stonemage said:

 

Still wondering if anyone might be able to help with this. I am completely stuck :( 

 

It's been 3 months since my initial call-out and I still cannot get this thing to work :(

 

Are there no experts out there that can help? Please..?

Link to comment
Share on other sites

Hello all, after a year still cant find solution. ALC294 internal speakers sound on ASUS UX534FAC. Firstly i test all avalaible layouts. With all tested on layout 21 and some anothers always mic is working only. Then i attempt to create my own layout id- it is succesfull but same here- only mic is working. Found bug fix for this laptop but for Linux, i provide also dump for this codec. It will be really apreciated if someone can look into this! Thanks.

https://wiki.archlinux.org/title/ASUS_Zenbook_UX534#Audio

 

DUMP ALC294.txt

  • Like 1
Link to comment
Share on other sites

@Zyzz You might need CodecCommander.kext to enable the speaker and headphone jack. ALC294 is know to have no sound without CodecCommander.kext. You can refer to my repos here and make some adjustments for your laptop:

https://github.com/shiecldk/ASUS-ZenBook-Pro-Duo-15-OLED-UX582-Hackintosh/tree/main/EFI/OC/Kexts/CodecCommander.kext

https://github.com/shiecldk/ASUS-ZenBook-Pro-Duo-15-OLED-UX582-Hackintosh/blob/main/EFI/OC/ACPI/SSDT-ALC294.aml

  • Like 1
Link to comment
Share on other sites

On 1/26/2022 at 12:59 PM, shiecldk said:

@Zyzz You might need CodecCommander.kext to enable the speaker and headphone jack. ALC294 is know to have no sound without CodecCommander.kext. You can refer to my repos here and make some adjustments for your laptop:

https://github.com/shiecldk/ASUS-ZenBook-Pro-Duo-15-OLED-UX582-Hackintosh/tree/main/EFI/OC/Kexts/CodecCommander.kext

https://github.com/shiecldk/ASUS-ZenBook-Pro-Duo-15-OLED-UX582-Hackintosh/blob/main/EFI/OC/ACPI/SSDT-ALC294.aml

can we actually dm somwehere?! i have something to test for u!

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
Guest 5T33Z0

Can someone explain to me how read and understand the attached visualization of my codec dump (ALC269 VC)? I've created it in codecgraph. I am trying to integrate the rear connector of my dock into a working Layout-ID . I think node 27 is for the rear connector but I don't really know what to enter in PinConfigurator to make the connection. Thanks

codec_dump_dec.svg verbs_original.txt

Link to comment
Share on other sites

  • 2 weeks later...
On 8/7/2016 at 3:11 AM, joevt said:

I am looking at the AppleALC code and was wondering if it would be better to save xml files to the repository instead of the zlib products. That way, you can look at the files without deflating them, do diffs, etc.

I just noticed that my suggestion from 2016 was implemented a couple years later in https://github.com/acidanthera/AppleALC/commit/539aa2b97e1f184e7974bb71e6178a5faec86e5e

I guess the objections to the idea no longer apply or the benefits of storing the xml outway having the zlib...

 

No matter, I just thought it was interesting enough to note the change. Why I'm actually posting now is because I have finally gotten around to converting my Z170X-Gaming 7 from Clover to OpenCore. I've reinstalled El Capitan and Sierra (though that was probably unnecessary). My HighSierra from Clover still works (it was the last OS compatible with my Maxwell based Nvidia Titan X). I had more recently installed Catalina under Clover while experimenting with Radeon RX 580 and W5700. Now with OpenCore, they all work and I've also installed Mojave, Big Sur, and Monterey. I'm using RX 580 so El Capitan (and maybe Sierra? I forget) don't have acceleration and can only switch between normal and HiDPI mode.

 

My motherboard uses the CA0132 codec and I am wondering what the state of the art is for AppleALC for my motherboard. I know there's a thread specifically for CA0132 which contains extra utilities for the codec so I'll probably ask there but for AppleALC in general, I have the following questions:

 

1) Why is there a Resources/PinConfigs.kext/Contents/Info.plist file containing info for all the codecs, when there's a separate folder for each codec? Shouldn't PinConfigs.kext be a separate build product with the info it contains spread out in the codec folders to keep related info together? Basically, there would be a PinConfig4.xml file that would go with the layout4.xml file and Platforms4.xml file.

2) Why are md5 files used in the build process? Wouldn't a makefile be sufficient? A build product in a make file has a modification date. If its modification date is less than that of the sources for that build product, then it gets rebuilt. Build products can depend on other build products. Xcode can use makefiles. I think Xcode has a build settings that can replace these features of makefiles?

3) The zlib files and md5 files should be output to a separate build folder to keep the source folder clean. Actually, one of the objections to my suggestion I mentioned was about "polluting the build directory" but I think not polluting the source directory is also important - and you can have multiple build directories.

4) Why do the names in the PinConfigs.kext not match the names in the codec's info.plist file? In the following example for CA0132, does "R3Di default" mean the same thing as "5.1 with C/Sub" ?

 

cd /Volumes/Work/Programming/KextProjects/AppleALC/acidanthera-AppleALC

perl -0777 -nE 'while ( m|
\s*<key>AFGLowPowerState</key>
\s*<data>[^<]*</data>
\s*<key>Codec</key>
\s*<string>([^<]*)</string>
\s*<key>CodecID</key>
\s*<integer>285343761</integer>
\s*<key>ConfigData</key>
\s*<data>[^<]*</data>
\s*<key>FuncGroup</key>
\s*<integer>\d+</integer>
\s*<key>LayoutID</key>
\s*<integer>(\d+)</integer>
|g ) { print $2 . " " . $1 . "\n" }
' < Resources/PinConfigs.kext/Contents/Info.plist

echo
perl -0777 -nE 'while ( m|
\s*<key>Comment</key>
\s*<string>([^<]*)</string>
\s*<key>Id</key>
\s*<integer>(\d+)</integer>
\s*<key>Path</key>
\s*<string>layout\d+\.xml\.zlib</string>
|g ) { print $2 . " " . $1 . "\n" }
' < Resources/CA0132/Info.plist

0 Creative CA0132, default
1 Creative CA0132: Alienware 15 R2
2 Creative CA0132: Alienware 17, Desktop 2xIn 3xOut
3 Creative CA0132, 2.0 + rear line-out
4 Creative CA0132: R3Di default
5 Creative CA0132, 2.0 front HP + Mic 
6 Creative CA0132, 5.1 with front HP
7 Creative CA0132: ZxRi
9 Creative CA0132 by Andres ZeroCross
10 Creative CA0132 by Andres ZeroCross
11 Custom Creative CA0132 5.1 channel
12 Custom Creative CA0132
99 Creative CA0132 5.1 channel for Alienware-M17X-R4 by DalianSky

0 Wern Apfel - 2.0 default
1 Wern Apfel - 2.0 Alienware 15 R2 
2 Wern Apfel - Alienware 17
3 Wern Apfel - 2.0 + rear line-out
4 Wern Apfel - 5.1 with C/Sub
5 Wern Apfel - 2.0 front + rear HP, simultaneously + front Mic
6 Wern Apfel - 5.1 with front HP
7 Wern Apfel - ZxRi
9 Andres ZeroCross - No Volume Control
10 Andres ZeroCross - No Volume Control
11 Custom Creative CA0132 5.1 channel
12 Custom Creative CA0132
99 Creative CA0132 5.1 channel for Alienware-M17X-R4 by DalianSky

 

Edited by joevt
Link to comment
Share on other sites

Guest 5T33Z0

@joevt I can't answer all of your questions, since I am not a dev or programmer. But I was having a lot of the same questions myself when I was writing my guide for creating new ALC Layout-IDs while trying to figure out how to integrate my data into the AppleALC source code at the same time. It took me days to figure out that there are 2 different info.plist files you have to edit so that the Layout-ID actually gets included into the AppleALC kext:

  • info.plst the inside the PinConfigs.kext – that's where you have to add the ConfigData
  • info.plist in the ALC folder for the Codec – That's where you have to enter the name/number your new Platforms.xml and layout.xml. Otherwise the Layout-ID won't be added to the AppleALC kext

The name entered inside the info.plist of the PinConfigs.kext is the one which will be used in the compiled AppleALC.kext. But I have no Idea why it's such a convoluted process..

 

It would be cool if someone would actually develop a tool with a GUI for this that would:

  • convert the codec dump,
  • extracts the verbs
  • lets you edit them (like in PinConfigurator)
  • let you visually create a pathmap
  • find a free spot for the layout id
  • handle all the file prepartions for compiling in the background
  • build the kext with a click of a button and open a finder window with the kext

You gotta have dreams ;)

Edited by 5T33Z0
Link to comment
Share on other sites

@5T33Z0

 

It's not complicated if you can.
Pinconfig to info.plist in PinConfigs.kext
The nodes are configured in (example) AppleALC-master/Resources/ALC269: layoutXX.xml and PlatformsXX.xml and also here the info.plist in the ALC269 folder.


Without seeing the original codec dump, your nodes will look like this:

 

Speakers: 20-12-2
HP: 27-13-3

int.Mic: 9-34-18
external Mic: 8-35-24

 

If it's a laptop then HPET and the IRQ fixes ( TIMR/RTC - remove IRQ 0 and 8 ) are important, otherwise AppleALC won't work on laptop's. Here the script "SSDTTime" from github is your friend (requires original DSDT from the computer).

 

What hardware do you have exactly?
ALC269 has the most layout IDs in AppleALC. All ID's tested?

Edited by MacPeet
Link to comment
Share on other sites

Guest 5T33Z0

@MacPeet It's a Lenovo T530 Laptop and I want the Line-Out on the Dockinstation to work. You helped me before with Trial kexts, but they didn't work. So I started figuring it out myself, but I have a question regarding switch mode: Do I have to connect the Nodes I want to switch between to the Same Mixer Node or another one? When I Plug in my external speakers to the LineOut of the Doch, I want it to swith from Node 21 to Node 27.

 

So the question is: do I have to Add 27 - 12 - 2 (red) to the Platforms.xml or 27 - 13 - 3 (green) to make the switching work?

 

I am using Layout 18 for the X230 as a base.

 

Thanks.

 

 

https://user-images.githubusercontent.com/76865553/171393009-65312baf-77c3-41d6-96d6-18359933aad5.png

Edited by 5T33Z0
Link to comment
Share on other sites

×
×
  • Create New...