Jump to content
vit9696

AppleALC — dynamic AppleHDA patching

4,437 posts in this topic

Recommended Posts

Posted (edited)

I used to do the hackintosh about 8 years ago. I stopped but recently fell into a couple of used macs that needed hardware repair to get going.

 

Would AppleALC work on a real Mac? I have an old iMac 8,1 that I have patched to 10.14.4 with dosdude1's tool. I get bad audio clipping with his Legacy Audio Patcher. I have a vanilla AppleHDA.kext that I can pull from a supported Mac with 10.14.4 already on it. I have installed Lilu and AppleALC into /L/E/ but I think I am still missing a boot argument that I cannot figure out. DCPI Manager says my iMac's audio is Realtek ALC889A. I am supposed to avoid using Clover on a real Mac, so all I can think of is not having the right boot argument in place for AppleALC to work. Thanks in advance.

Edited by nerlins

Share this post


Link to post
Share on other sites
Advertisement

I got  audio to work on my Dell Inspiron 7720 to work with a modified version of VoodooHDA.kext. Volume control works, too.

Share this post


Link to post
Share on other sites
Posted (edited)
On 3/27/2019 at 2:47 PM, spiritstealer said:

hello, well I'm having an issue where 
No audio at all, neither through headphones nor through speakers, no devices show on the Audio control panel, neither in nor out I Tried : 

1- installing AppleALC.Kext to /L/E
2- config.plist : A : DSDT patch: HDAS to HDEF
B: Devices: Inject “1” , ResetHDA : YES

vanilla AppleHDA is still loaded in the system 

Config Plist used: Rehabman’s Config for UHD630
MACOS : 10.14.3
Motherboard: HP Pavilion Gaming 15-CX0056wm 
BIOS: Clover UEFI 
Processor intel core i5-8300H & 300 Series Chipset
Graphics: intel UHD 630 (working) / nVidia 1050Ti (not working but didn’t disable it yet)
Audio : Vendor ID : 10EC (Realtek) Device ID : 0295 (after searching the internet I think the codec my device use is ALC295 correct me if I’m wrong)

Guide used to install macOS :
Why InsanelyMac does not support tonymacx86

Guide to get Audio Working:
Why InsanelyMac does not support tonymacx86

I tested all the layout IDs (1,3,13,14,15,28) but nothing worked

Thanks for your support

AudioIssueFIles.zip

 

@vit9696

 

hello man,

 

sorry but I've been waiting for about a week now, can you please help me out ?

 

I've provided all the info i could get my hands on, the Info.plist tool you've linked gives me 404 error code (no file found)

 

Thanks for  your time & Support man.

 

Edited by spiritstealer

Share this post


Link to post
Share on other sites
Posted (edited)

Hi 

 

Can someone help me with this?

 

I have Dell Optiplex 3060 that came with combo jack (front), speaker port (back) and internal speaker 

the codec is ALC255

 

Layout 18

- I try all layout IDs. please see the result in the attachment (screenshot)

 

I attached some files that could be helpful to fi my issues 

- the second screenshot shows the ports in my PC

- the codec dump from Ubuntu (sound drivers installed) is in the attachment

- the Dmsg from Ubuntu is in the attachment 

- Screenshot from Dmsg is in the attachment (shows something related to the sound card)

 

Note1: currently I am running version 1.3.6 of AppleALC

Note2: all the test has been done with AppleALC 1.3.5

Note3: using layout27 in AppleALC 1.3.6 if I connect my headphone to the back jack. the mic is working with noise !!! (in Ubuntu and windows the mic never work from the back jack. the back jack used only for speaker). I try a mic only without headphone and it's not working. only headphone mic working with noise 

 

One more question. Is there any tutorial to modify the AppleALC? 

 

thanks 

 

 

1437075056_ScreenShot2019-03-03at8_54_02PM.png.76a843dd92bd3bc556f72fe12c9994eb.png

original.jpg.1a6b7a67bf0eaeaad11e298bbff9c8e7.jpg

dmsg.log

CodecDump.zip

6AE8FD96-924A-4C6D-9109-80D00A2B7853.png.9efc6c8c87c0bd944a7b45bf9b01b75b.png

Screen Shot 2019-04-05 at 6.10.28 AM.png

Edited by Ali Jamali

Share this post


Link to post
Share on other sites
Posted (edited)
6 hours ago, Andres ZeroCross said:

@vandroiy2012 i want to ask,, what's "Anti Click Patch" in newest commit? Can you give explanation?

Hey @Andres ZeroCross thanks so much for your work! I wanted to know the answer too because I thought the Anti-click meant the click you get when the audio codec goes to sleep, but I still get that click or pop as some people call it unless there are two different things?

 

Is there a proper way to get AppleALC to use AntiPop instead of using another product or script? Please let me know as this issue and the COEF issue with my Realtek ALC256 for headsets are the main things I've noticed with Hackintosh.

Edited by Andrw0380

Share this post


Link to post
Share on other sites
On 4/9/2019 at 7:10 AM, Andrw0380 said:

Hey @Andres ZeroCross thanks so much for your work! I wanted to know the answer too because I thought the Anti-click meant the click you get when the audio codec goes to sleep, but I still get that click or pop as some people call it unless there are two different things?

 

Is there a proper way to get AppleALC to use AntiPop instead of using another product or script? Please let me know as this issue and the COEF issue with my Realtek ALC256 for headsets are the main things I've noticed with Hackintosh.

Open macIASL and create new file then paste this, then save as SSDT-1.aml and put to EFI/CLOVER/ACPI/Patched. Make sure there is no RMCF method in HDEF at your DSDT.aml.
 

DefinitionBlock ("", "SSDT", 1, "hack", "ALC256", 0x00003000)
{
    External(_SB.PCI0.HDEF, DeviceObj)
    Name(_SB.PCI0.HDEF.RMCF, Package()
    {
        "CodecCommander", Package()
        {
            "Custom Commands", Package()
            {
                Package(){}, // signifies Array instead of Dictionary
                Package()
                {
                    // 0x19 SET_PIN_WIDGET_CONTROL 0x25
                    "Command", Buffer() { 0x01, 0x97, 0x07, 0x25 },
                    "On Init", ">y",
                    "On Sleep", ">n",
                    "On Wake", ">y",
                },
                Package()
                {
                    // 0x21 SET_UNSOLICITED_ENABLE 0x83
                    "Command", Buffer() { 0x02, 0x17, 0x08, 0x83 },
                    "On Init", ">y",
                    "On Sleep", ">n",
                    "On Wake", ">y",
                },
                Package()
                {
                    // 0x20 SET_COEF_INDEX 0x36
                    "Command", Buffer() { 0x02, 0x05, 0x00, 0x36 },
                    "On Init", ">y",
                    "On Sleep", ">n",
                    "On Wake", ">y",
                },
                Package()
                {
                    // 0x20 SET_PROC_COEF 0x1737
                    "Command", Buffer() { 0x02, 0x04, 0x17, 0x37 },
                    "On Init", ">y",
                    "On Sleep", ">n",
                    "On Wake", ">y",
                },
            },
            "Perform Reset", ">n",
            //"Perform Reset on External Wake", ">n", // enable if using AppleALC
            "Send Delay", 10,
            "Sleep Nodes", ">n",
        },
    })
}
//EOF

Credit to vbourachot. BUT DON'T FORGET to put CodecCommander.kext to Library/Extensions and rebuild kext cache.

Share this post


Link to post
Share on other sites
Posted (edited)
On 4/11/2019 at 3:02 AM, Andres ZeroCross said:

Open macIASL and create new file then paste this, then save as SSDT-1.aml and put to EFI/CLOVER/ACPI/Patched. Make sure there is no RMCF method in HDEF at your DSDT.aml.
 


DefinitionBlock ("", "SSDT", 1, "hack", "ALC256", 0x00003000)
{
    External(_SB.PCI0.HDEF, DeviceObj)
    Name(_SB.PCI0.HDEF.RMCF, Package()
    {
        "CodecCommander", Package()
        {
            "Custom Commands", Package()
            {
                Package(){}, // signifies Array instead of Dictionary
                Package()
                {
                    // 0x19 SET_PIN_WIDGET_CONTROL 0x25
                    "Command", Buffer() { 0x01, 0x97, 0x07, 0x25 },
                    "On Init", ">y",
                    "On Sleep", ">n",
                    "On Wake", ">y",
                },
                Package()
                {
                    // 0x21 SET_UNSOLICITED_ENABLE 0x83
                    "Command", Buffer() { 0x02, 0x17, 0x08, 0x83 },
                    "On Init", ">y",
                    "On Sleep", ">n",
                    "On Wake", ">y",
                },
                Package()
                {
                    // 0x20 SET_COEF_INDEX 0x36
                    "Command", Buffer() { 0x02, 0x05, 0x00, 0x36 },
                    "On Init", ">y",
                    "On Sleep", ">n",
                    "On Wake", ">y",
                },
                Package()
                {
                    // 0x20 SET_PROC_COEF 0x1737
                    "Command", Buffer() { 0x02, 0x04, 0x17, 0x37 },
                    "On Init", ">y",
                    "On Sleep", ">n",
                    "On Wake", ">y",
                },
            },
            "Perform Reset", ">n",
            //"Perform Reset on External Wake", ">n", // enable if using AppleALC
            "Send Delay", 10,
            "Sleep Nodes", ">n",
        },
    })
}
//EOF

Credit to vbourachot. BUT DON'T FORGET to put CodecCommander.kext to Library/Extensions and rebuild kext cache.

Thanks, but I am already using a SSDT for CodecCommander. My 0x21 is using 021707c0 and my 0x19 is 01970724 as according to my linux dump, shows that is correct. What is the propose of Node 20 and what does the COEF commands in this case do? This is my SSDT.aml file.

 

/*
 * Intel ACPI Component Architecture
 * AML/ASL+ Disassembler version 20161210-64(RM)
 * Copyright (c) 2000 - 2016 Intel Corporation
 * 
 * Disassembling to non-symbolic legacy ASL operators
 *
 * Disassembly of iASLO3abAT.aml, Fri Apr 12 20:13:29 2019
 *
 * Original Table Header:
 *     Signature        "SSDT"
 *     Length           0x0000014A (330)
 *     Revision         0x01
 *     Checksum         0x4D
 *     OEM ID           "Deepak"
 *     OEM Table ID     "ALC256"
 *     OEM Revision     0x00000000 (0)
 *     Compiler ID      "INTL"
 *     Compiler Version 0x20161210 (538317328)
 */
DefinitionBlock ("", "SSDT", 1, "Deepak", "ALC256", 0x00000000)
{
    External (_SB_.PCI0.HDEF, DeviceObj)    // (from opcode)

    Name (_SB.PCI0.HDEF.RMCF, Package (0x02)
    {
        "CodecCommander", 
        Package (0x0A)
        {
            "Custom Commands", 
            Package (0x03)
            {
                Package (0x00) {}, 
                Package (0x08)
                {
                    "Command", 
                    Buffer (0x04)
                    {
                         0x02, 0x17, 0x07, 0xC0                         
                    }, 

                    "On Init", 
                    ">y", 
                    "On Sleep", 
                    ">n", 
                    "On Wake", 
                    ">y"
                }, 

                Package (0x08)
                {
                    "Command", 
                    Buffer (0x04)
                    {
                         0x01, 0x97, 0x07, 0x24                         
                    }, 

                    "On Init", 
                    ">y", 
                    "On Sleep", 
                    ">n", 
                    "On Wake", 
                    ">y"
                }
            }, 

            "Perform Reset", 
            ">n", 
            "Perform Reset on External Wake", 
            ">n", 
            "Send Delay", 
            0x0A, 
            "Sleep Nodes", 
            ">n"
        }
    })
}

I will attach my codec_dump file in case there is something else that I am missing with AppleALC. I appreciate your assistance.

codec_dump.txt

Edited by Andrw0380

Share this post


Link to post
Share on other sites

Hi everyone

 

My English is not good.

 

May I need everyone's abilities?

 

My laptop is HanSung A37X, and I5 7200U , RAM 8G, sound is ACL282.

 

I did RunMe , and I will attach it.

 

I use lilu and applealc, so I insert layout 3

 

At that time, speaker is not work, but when enter the earpods sound is work and mic also good.

 

thx everyone I need your abilities

Send me customui-MacBookPro.zip

Share this post


Link to post
Share on other sites

Hello everyone, I want to ask help from you guys to make my audio fully works, Have ALC256 codec tried using id 11,13,21,28,56,57 mic not working, using id 5 mic is working but headphone jack sound is really distorted, I'll attach my codec dump below, Thank in Advance, appreciate it if someone will gladly help me :)

codec_dump.txt

Share this post


Link to post
Share on other sites

Hey everyone first of all I love your work. You're superstars.

 

Now I haven't been able to get audio working and it seems that this is the new go-to option.

My audio codecs are not supported and I'm wondering if installing Realtek would enable me to use this method? Would upgrading to Win10 help?

I also have to use this:

https://www.umart.com.au/Creative-Sound-Blaster-Play-3-USB-DAC-Amp-and-Sound-Card_40207G.html?gclid=EAIaIQobChMIhPPYmIfX4QIVAw4rCh3FKgdtEAQYASABEgK6bfD_BwE

Would that have an impact? If needed I can buy a new pc case and not have to use it.

 

Running macOS Mojave 10.14 fresh install with VirtualBox 6 on this host:

 

systeminfo.png.97c26fb75dbef90608b49244567e553b.png

 

systeminfocodecs.png.9e7f885358178dcb919dfd42095385c8.png

 

Codecs according to WindowsMediaPlayer:

wmp_codecs.png.fca22a0a34694f6f936377c478b15abd.png

 

 

Please help! Thanks for your time.

Share this post


Link to post
Share on other sites

Hi folks! I'm reluctant to add another post to this long topic, but it's somewhat pertinent and could help others with similar hardware if they perform a search.

 

I successfully created a new layout for a ALC1220 chip in my MSI P65 Creator laptop. It's very similar to the GS65 Stealth, so this layout might work for that machine as well.

The pull request is here: https://github.com/acidanthera/AppleALC/pull/401

The layout is numbered 34.

 

I spent more than a couple weeks chipping away at this very complex process of extracting codec info, playing trial and error, and figuring out what works and what doesn't work. None of the other layouts would work. The closest I came was with #13, but it would act erratically and only work once every so often. After understanding more about the verbs and node ID's I understand now that the hardware was just too different.

 

Feedback is welcome. I didn't want to just keep this fix to myself since it could help others with similar hardware.

 

Cheers!

- Sean

Share this post


Link to post
Share on other sites

hello @vandroiy2012

 

I have a new codec. (At the request of the user in two variants.)

 

ALC892 - LayoutID 17 (11) for MSI B150M MORTAR (Outputs SwitchMode)
ALC892 - LayoutID 18 (12) for MSI B150M MORTAR (Outputs ManualMode)

 

new_Resources.zip


can you please added the new codec?
 
many thanks

Share this post


Link to post
Share on other sites
On 3/26/2019 at 3:08 PM, arsradu said:

Yeah, so, I've got AppleALC 1.3.4 with Lilu 1.3.4 on my sig build, aaand...I had occasions where it will simply lose audio. The devices are still detected, the kexts are obviously loaded, but no actual sound.

 

Also, I've tried Lilu 1.3.5 & AppleALC 1.3.6 (official builds) and i've got the same weird issue with no sound sometimes, on the Skylake build.

 

Later update: Lilu 1.3.5 + 1.3.6 = same issue on both builds

 

I'll keep investigating this, but so far, the most stable versions seem to be Lilu 1.3.3 + AppleALC 1.3.4. AppleALC doesn't seem to have any effect here. So, it works just as well with Lilu 1.3.3 and AppleALC 1.3.6, for example. But Lilu didn't work the same way regardless of version. And it looks like, starting with Lilu 1.3.4, there's a problem somewhere.

 

Sorry arsradu, too lazy myself to try latest Lilu and AppleALC: is this bug solved with latest releases in case you tried them?

 

Thanks,

 

Patrice

Share this post


Link to post
Share on other sites
Posted (edited)
20 minutes ago, brousseau6933 said:

Sorry arsradu, too lazy myself to try latest Lilu and AppleALC: is this bug solved with latest releases in case you tried them?

 

Thanks,

 

Patrice

 

Hi Patrice,

 

I'm currently on Lilu 1.3.5 (official) and AppleALC 1.3.7 (built by me). Aaand...so far so good.

 

If you wanna try them on your computer, you can find them attached to this post.

AppleALC1.3.7&Lilu1.3.5.zip

 

Edit: Now I saw that 1.3.7 is officially released. So...I guess it should be fixed with this release. Haven't tried it yet.

Edited by arsradu

Share this post


Link to post
Share on other sites
41 minutes ago, arsradu said:

 

Hi Patrice,

 

I'm currently on Lilu 1.3.5 (official) and AppleALC 1.3.7 (built by me). Aaand...so far so good.

 

If you wanna try them on your computer, you can find them attached to this post.

AppleALC1.3.7&Lilu1.3.5.zip

 

Edit: Now I saw that 1.3.7 is officially released. So...I guess it should be fixed with this release. Haven't tried it yet.

Thanks a bunch, I'll try it first on an USB stick to be sure...

Share this post


Link to post
Share on other sites

Hi,

 

I am facing the same problem with Audio. Audio is not detected sometimes (actually com.apple.driver.AppleHDA and com.apple.driver.AppleHDAController are loaded all the times but not com.apple.driver.AppleHDAHardwareConfigDriver). While if I use AppleALC 1.3.4, audio comes all the times "on a successful boot". The problem with AppleALC 1.3.4 is that sometimes my boot hangs (I couldn't see any specific error in verbose mode) and then I have to force shutdown the laptop and boot OSX again. Sometimes it is booted in one go, and sometimes two go. Version above AppleALC 1.3.4 (that include all 1.3.5, 6 and 7) the system boots all the times but then audio is not detected sometimes. 

Currently I have AppleALC 1.3.4 and Lilu latest. I have built, AppleALC, AirportBrcmFixup and Whatevergreen from source using Lilu 1.3.5 (the latest one). I tried using Lilu official built, and tried building Lilu also from source. Same results. I attach herewith the debug files from my computer. Please help.

debug_26817.zip

Share this post


Link to post
Share on other sites
Posted (edited)

Hey, using Mojave 10.14.4 & ALC1220-VB (Z390 Aorus Ultra)

my headphones connected to the front audio jack and speakers connected to the back audio jack.

My headphones and Internal speakers use the same output when opening the Audio menubar.

 

If my headphones are connected sounds works only through the headphones using the "Headphones" output. If I remove the headphones connector, the headphones output is changing to "Internal speakers". Selecting it will output audio through the speakers.

 

I'd like to be able to switch between outputs without removing the headphones connector.

 

On previous setup I managed to do so by changing the layout-id. With this board, I tried all these ids: 1,2,5,7,11,13,15,16,27

And none of them helped.

 

Any help would be appreciated. 

Edited by Shasoosh

Share this post


Link to post
Share on other sites
Posted (edited)

Hi.

 

From HP ZbooK 15UG4 :

 

Put CX7700 codec dump again but with Clover 4920.

As usual, Conexant (unknown) by Clover, and of course, no sound, with layout ID 21 or 3 with latest LiLu and AppleALC Flavor.

 

Recognize by Linux or Hackintool as CX8200, but no, after looking directly on the chip, it's a CX7700

 

This chip is present on HP PRoBooK 430,450,470 G4 family too.

 

Hope this help

 

Regards

 

 

CX7700CodecDumP.zip

Edited by DoZe

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×