Jump to content
vit9696

AppleALC — dynamic AppleHDA patching

2,874 posts in this topic

Recommended Posts

16 hours ago, Andrey1970 said:

 It is necessary to set value layout-id in Devices-Properties or boot arguments.

 

Using Device-Properties to inject layout-id follows the same methodolgy required for WhatEverGreen .... so it is the preferred method

However AppleALC also supports the legacy method of setting layout-id using Device/Audio/Inject ...

 

You can see in the new style AppleALC debug log file that it will detect and use a legacy layout-id if it is not found as a device property against the HDEF PCI device path :-

 

AppleALC:   iokit @ (DBG) getOSData alc-layout-id was not found
AppleALC:   iokit @ (DBG) getOSData layout-id has 3 value
AppleALC:   audio @ (DBG) found legacy alc-layout-id (from layout-id) 3

 

In this instance you can see that AppleALC tried to first find layout-id via device properties, but when it was not found it then looked at the legacy value and found layout-id from Device/Audio/Inject

Vlt9696 confirmed this personally when i was working with him on Monday to solve the problem of AppleALC requiring manual injection of both layout-id and alc-layout-id on some systems.

That problem turned out to be an issue with lilu not parsing the device class-code correctly which is now fixed in Lilu version 1.2.7 

 

Either method of setting layout-id works  ....

 

I think Vit9696 kept support for the legacy method of setting layout-id to help new users coming to AppleALC ... all they need to do is remove their old AppleHDA patching method and install Lilu + AppleALC

Of course more advanced users who have already made the switch to using WhatEverGreen and are already using Device Properties can use the new method to set layout-id.

 

Cheers

Jay

Share this post


Link to post
Share on other sites
Advertisement
On 9/3/2018 at 11:11 PM, jaymonkey said:

 

Hi insanelyDeepak,

 

I've just finished testing the version of AppleALC you made for the HP Spectre X360, ALC295 Codec using layout-id 13.

 

Test Results:-

 

Internal Speakers and Microphone are present in System Prefs --> Sound

Black Speaker Icon in Menu Bar

No Sound form Internal Speakers, even after a sleep/wake event thus forcing EAPD verbs to be refreshed ... I suspect that this is a EAPD issue

Internal Microphone Works ok

Headphones are detected when headset is plugged in but there is no sound from them.

External Microphone is not detected when headset is plugged in ... Internal Microphone still active and working.

 

Please advise if you need any more info ...

Cheers

Jay

 

Hi 

i need these files 
https://github.com/insanelydeepak/cloverHDA-for-Mac-OS-Sierra-10.12/blob/master/TroubleShoot/Troubleshoot Reporting.md

Share this post


Link to post
Share on other sites
21 hours ago, insanelyDeepak said:

 

Hi IDpak,

 

Requested debug files attached ... i made two versions

 

One with working Audio (including HDMI Audio) but no external Mic using the current public release of AppleALC

One using your test Version of AppleALC using layout 13 .. which has No Audio Devices working

 

Cheers

Jay

 

 

Debug files for InsanleyDeepack.zip

Share this post


Link to post
Share on other sites

Who can help me with my Clevo P950HR - ALC1220 codec? Currently this is already pushed into the repository with audio id 13, thanks to MacPeet :)


However, I still have problems with EAPD after waking up from sleep.

The headphones don't work anymore after sleep, speakers and mic are working though.
 

Megacookie.ioreg.zip

Edited by MegaCookie

Share this post


Link to post
Share on other sites
18 hours ago, MegaCookie said:

Who can help me with my Clevo P950HR - ALC1220 codec? Currently this is already pushed into the repository with audio id 13, thanks to MacPeet :)


However, I still have problems with EAPD after waking up from sleep.

The headphones don't work anymore after sleep, speakers and mic are working though.
 

Megacookie.ioreg.zip

use codeccommander or port profile to AppleALC both should work use only one

 

 

Share this post


Link to post
Share on other sites

Hey @insanelyDeepak

Thanks for taking the effort to release a patched HDA for ALC665 and making several people's task easier. 

 

However, I'm unable to enable the audio on my Sandy Bridge L502x XPS 15 laptop which uses ALC665. I've installed both latest Lilu and AppleALC in /L/E, put layout id as 13 under devices/audio. The audio id in system report/audio remains at 7 and layout id under HDEF in ioReg reflects it as 07 00 00 00, whatever layout I provide. 

Could you please help me? Thank you. 

 

I'm on Mac OS Sierra 10.12.6.

 

ALC665 debug.zip

Share this post


Link to post
Share on other sites

Lenovo Yoga 13 / QS77

CX20590

Layout 12

 

Audio working 100%

 

Mic works on Quicktime recorder, Audacity , Skype

 

Mic does not work in Chrome, Whatsapp Desktop, Google Hangouts (I guess all web based apps). It's a really low clicking noise

 

Anyone knows what could be the problem?

Edited by chimi

Share this post


Link to post
Share on other sites
On 9/10/2018 at 9:57 PM, bloodyraven said:

Hey @insanelyDeepak

Thanks for taking the effort to release a patched HDA for ALC665 and making several people's task easier. 

 

However, I'm unable to enable the audio on my Sandy Bridge L502x XPS 15 laptop which uses ALC665. I've installed both latest Lilu and AppleALC in /L/E, put layout id as 13 under devices/audio. The audio id in system report/audio remains at 7 and layout id under HDEF in ioReg reflects it as 07 00 00 00, whatever layout I provide. 

Could you please help me? Thank you. 

 

I'm on Mac OS Sierra 10.12.6.

 

ALC665 debug.zip

 

Try again with Lilu V 1.2.7 which was just released as a public binary :-

 

https://github.com/acidanthera/Lilu/releases

 

The previous few versions of Lilu had an issue which stopped Lilu from parsing the HDEF device's code-class correctly on some systems ...

Probably also worth updating AppleALC to 1.3.2 as it's usually built against the latest release of Lilu.

 

Cheeers

Jay

 

 

 

Share this post


Link to post
Share on other sites

With AppleALC, headphone's detected, but not working properly (just heard some noises).

 

1. Laptop: Dell Inspiron 15-5567 (i3-7100U, HD 620)

2. Codec Name: Realtek ALC256 (3246)

3. Tried all the available layout ids available (11, 13, 28, 56). With all of them, only internal audio works, headphone's detected and I hear noises when playing an audio or video. With 11 and 13, audio ports are switched automatically (ie. when I insert a headphone, system will automatically switch to headphone port.)

4. Tried on 10.13.6 and 10.14 beta 11

5. View attachment (interestingly the layout-id is set to 7 there although FBPatcher detected 11)

Currently using no SSDT-ALC256.aml (tried it, didn't work either). Using absolutely no patches on Clover.

 

Codec dump, AppleALC log are also attached with the Info.plist.

Info.plist

AppleALC.log

audio_codec#0.txt

Share this post


Link to post
Share on other sites
12 hours ago, Muntashir said:

With AppleALC, headphone's detected, but not working properly (just heard some noises).

 

1. Laptop: Dell Inspiron 15-5567 (i3-7100U, HD 620)

2. Codec Name: Realtek ALC256 (3246)

3. Tried all the available layout ids available (11, 13, 28, 56). With all of them, only internal audio works, headphone's detected and I hear noises when playing an audio or video. With 11 and 13, audio ports are switched automatically (ie. when I insert a headphone, system will automatically switch to headphone port.)

4. Tried on 10.13.6 and 10.14 beta 11

5. View attachment (interestingly the layout-id is set to 7 there although FBPatcher detected 11)

Currently using no SSDT-ALC256.aml (tried it, didn't work either). Using absolutely no patches on Clover.

 

Codec dump, AppleALC log are also attached with the Info.plist.

Info.plist

AppleALC.log

audio_codec#0.txt

Hi 

you must use below SSDT with layout 13 

 

https://bitbucket.org/RehabMan/os-x-eapd-codec-commander/src/cff89db6fba02b41a5edb043acba0e83d1de4a89/SSDT-ALC256-insanelydeepak.dsl?at=master&fileviewer=file-view-default

On 9/11/2018 at 2:27 AM, bloodyraven said:

Hey @insanelyDeepak

Thanks for taking the effort to release a patched HDA for ALC665 and making several people's task easier. 

 

However, I'm unable to enable the audio on my Sandy Bridge L502x XPS 15 laptop which uses ALC665. I've installed both latest Lilu and AppleALC in /L/E, put layout id as 13 under devices/audio. The audio id in system report/audio remains at 7 and layout id under HDEF in ioReg reflects it as 07 00 00 00, whatever layout I provide. 

Could you please help me? Thank you. 

 

I'm on Mac OS Sierra 10.12.6.

 

ALC665 debug.zip

use latest AppleALC as @jaymonkey said 
AppleALC changes itself alot you must use alc_layout instead layout_id in DSDT/SSDT like below 
 

 "alc-layout-id", 
                        Buffer (0x04)
                        {
                             0x0D, 0x00, 0x00, 0x00                         
                        }, 

 

 

@jaymonkey sorry i was quite busy from last week , this week i have plenty of time, will try to fix your codec issue 

 

 

Edited by insanelyDeepak

Share this post


Link to post
Share on other sites

currently i am using a layout id 1 with applealc v131 when i got to add the applealc 132 i lose sound on an asus z370-p Realtek® ALC887 8-Channel High Definition Audio CODEC is there other layout that im unaware of image.thumb.png.c294f3e10c3fbdeee1ded1cd8ab182f6.png

Share this post


Link to post
Share on other sites
6 hours ago, errorexists said:

currently i am using a layout id 1 with applealc v131 when i got to add the applealc 132 i lose sound on an asus z370-p Realtek® ALC887 8-Channel High Definition Audio CODEC is there other layout that im unaware of image.thumb.png.c294f3e10c3fbdeee1ded1cd8ab182f6.png

Same here with same ALC887 and Lilu 1.2.7.

Share this post


Link to post
Share on other sites
16 hours ago, insanelyDeepak said:

Thanks as always (y). I never knew you had an SSDT-ALC256 on CodecCommander!

Share this post


Link to post
Share on other sites
2 minutes ago, insanelyDeepak said:

i never use HDMI audio though 

I had to ask because I often need to deliver presentations.

 

 

@vandroiy2012, I don't know what you need, but here's the codec dump:

 

audio_codec#2.txt

Share this post


Link to post
Share on other sites
22 hours ago, insanelyDeepak said:

Hi 

you must use below SSDT with layout 13 

 

https://bitbucket.org/RehabMan/os-x-eapd-codec-commander/src/cff89db6fba02b41a5edb043acba0e83d1de4a89/SSDT-ALC256-insanelydeepak.dsl?at=master&fileviewer=file-view-default

use latest AppleALC as @jaymonkey said 
AppleALC changes itself alot you must use alc_layout instead layout_id in DSDT/SSDT like below 
 


 "alc-layout-id", 
                        Buffer (0x04)
                        {
                             0x0D, 0x00, 0x00, 0x00                         
                        }, 

 

 

Guys,

 

Manual injection of the alc-layout-id device property was only needed to workaround an issue with Lilu 1.2.6, on some systems Lilu would not parse the class-code of the HDEF device correctly which stopped it reading layout-id from the config data, this issue was fixed by Vit9696 two weeks ago and the fix is included in the new public release of Lilu version 1.2.7.

 

With Lilu Version 1.2.7 installed there should be no more need to inject alc-layout-id as a device property ....

 

You only need layout-id, you can use the traditional legacy method of setting the value in Clover/Device/Audio/Inject or your can set this to 'No' and define layout-id as a Device Property. AppleALC will then automatically create the new device property alc-layout-id which will inherit the value of layout-id (which you set on your config.plist) and layout-id will then be assigned a new target id (usually 7) which will be the layout in AppleHDA that will be patched by AppleALC. This method allows AppleALC to use unsupported layout-id values on Mojave .... Note: This is AppleALC new default patching scheme so  it will also do same on Sierra and High Sierra.

 

23 hours ago, insanelyDeepak said:

 

@jaymonkey sorry i was quite busy from last week , this week i have plenty of time, will try to fix your codec issue 

 

Hi DP,

 

No problem at all, appreciate you taking a look .....

 

Cheers

Jay

Share this post


Link to post
Share on other sites

Acer Aspire E5-571G-50XE
ALC283
_____

Layout-id 1 - works only Headphones (very good), No Internal Sound, no mic.
Layout-id 3 - Internal Speaker - OK, Mic - OK, Headphones - cracking

Layout-id 11 - Internal Speaker - OK, Mic - OK, Headphones - cracking 

Layout-id 66 - Internal Speaker -OK, Headphones - cracking, no mic.

It's possible to fix it ?

 

Mic from id 1 + id 3 or something else...

Share this post


Link to post
Share on other sites
3 hours ago, Speaker007 said:

Acer Aspire E5-571G-50XE
ALC283
_____

Layout-id 1 - works only Headphones (very good), No Internal Sound, no mic.
Layout-id 3 - Internal Speaker - OK, Mic - OK, Headphones - cracking

Layout-id 11 - Internal Speaker - OK, Mic - OK, Headphones - cracking 

Layout-id 66 - Internal Speaker -OK, Headphones - cracking, no mic.

It's possible to fix it ?

 

Mic from id 1 + id 3 or something else...

 

Could be an issue with the pin config data for your codec.

 

Try doing a Codec dump in Linux and consolidate your codec verbs, then paste the consolidated verbs into pin configurator, apply fix and generate corrected pin config data.

Finally replace the the pin config data in Layout 3 of ALC283 in AppleALC's info.plist with your generated pin config data.

 

You can find guides on how to do all of this in these forums, just search for the appropriate terms.

 

Cheers

Jay

Share this post


Link to post
Share on other sites
30 minutes ago, jaymonkey said:

 

Could be an issue with the pin config data for your codec.

 

Try doing a Codec dump in Linux and consolidate your codec verbs, then paste the consolidated verbs into pin configurator, apply fix and generate corrected pin config data.

Finally replace the the pin config data in Layout 3 of ALC283 in AppleALC's info.plist with your generated pin config data.

 

You can find guides on how to do all of this in these forums, just search for the appropriate terms.

 

Cheers

Jay

 

Could you mention a good one? :)

 

I'm trying to get my layout id fixed and...I couldn't find a complete guide on how to do this for AppleALC. I found plenty for patching AppleHDA (which is similar, but not quite the same thing). And I don't want to mess with that. I just want to compile an AppleALC kext for my motherboard layout. Shouldn't be that hard, should it? I suppose the problem in my case are probably the resources (LayoutID.xml and Platforms.xml). Also, I never understood why a specific Layout ID needs to be used. I mean, in this case, why 3? Why not 66? How do you choose? You flip a coin? There has to be some sort of reasoning behind it. But nobody seems to either know it, or explain it.

 

I wish someone could point me to the right direction. I'm probably pretty close to getting this done. But it just doesn't work. And I don't know why. I tried taking examples from the other layout IDs for my codec, but nothing worked. And there are so many things that I don't understand why are they used. Or where do they come from. I feel there might be an easier way to accomplish what I want (which is just a better mapping of my ports for my particular motherboard). But I couldn't find a complete tutorial. I learned some things form one tutorial, others from other tutorials. But I couldn't find any tutorial to learn how to do it from A to Z. From the beginning which is taking a codec dump, to compiling AppleALC into a kext. I know that would probably be a huge thread. But there are too many missing informations right now. Too many variables to change. And it's getting really frustrating.

Edited by arsradu

Share this post


Link to post
Share on other sites

I'm also having some issues with my ALC887 on Mojave with AppleALC.kext (v.1.3.2) and Lilu.kext (v.1.2.7). No sound and no outputs (or inputs) in System Preferences -> Sound. I only see DisplayPort in System Information -> Sound.

 

Same config.plist (layout-id 1) and kext versions work fine on High Sierra. I boot with -lilubeta -alcbeta on Mojave although I don't think -lilubeta is needed. 

 

alc-layout-id is <01 00 00 00>

layout-id is <07 00 00 00>

 

Values are the same between High Sierra and Mojave.

 

Any advice? Please let me know if any additional information is needed.

Edited by yobro

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×