Jump to content
vit9696

AppleALC — dynamic AppleHDA patching

4,712 posts in this topic

Recommended Posts

Hello,

 

I recently upgraded my Dell XPS 14Z (L412Z) laptop to High Sierra and moved over to the lilu.kext and it's plugins as it's much cleaner.  I noticed that the current AppleALC.kext does not currently support my codec which is the ALC259.  I'm attaching a full codec dump here in hopes that somebody smarter and faster than me could get this codec included in the next version of AppleALC.kext.  Please let me know if any additional info should provided.  Thanks!  

ALC259_codec_dump.txt

Share this post


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

Hello,

 

I recently upgraded my Dell XPS 14Z (L412Z) laptop to High Sierra and moved over to the lilu.kext and it's plugins as it's much cleaner.  I noticed that the current AppleALC.kext does not currently support my codec which is the ALC259.  I'm attaching a full codec dump here in hopes that somebody smarter and faster than me could get this codec included in the next version of AppleALC.kext.  Please let me know if any additional info should provided.  Thanks!  

ALC259_codec_dump.txt

image.png.218a4868c012955f69660e98657c243f.png
Your codec is 0x10EC0269 Revision 0x100100. It's ALC269. Try various layoutID with appleALC.kext. Check here https://github.com/acidanthera/AppleALC/tree/master/Resources/ALC269

You will get sound with that. It's not ALC259

Share this post


Link to post
Share on other sites

Hi,

 

the recent changes to AppleALC broke audio on my Dell M4800.  the older AppleACL-test with CodecLookup.plist method works.

here are diffs between working and non-working (latest) repos.

$ diff -rq AppleALC-vit9696 AppleALC-test|grep -v git|differ
diff AppleALC-vit9696/AppleALC/kern_alc.cpp AppleALC-test/AppleALC/kern_alc.cpp
diff AppleALC-vit9696/AppleALC/kern_alc.hpp AppleALC-test/AppleALC/kern_alc.hpp
diff AppleALC-vit9696/AppleALC/kern_resources.cpp AppleALC-test/AppleALC/kern_resources.cpp
diff AppleALC-vit9696/AppleALC/kern_resources.hpp AppleALC-test/AppleALC/kern_resources.hpp
diff AppleALC-vit9696/AppleALC.xcodeproj/project.xcworkspace/xcuserdata/tluck.xcuserdatad/UserInterfaceState.xcuserstate AppleALC-test/AppleALC.xcodeproj/project.xcworkspace/xcuserdata/tluck.xcuserdatad/UserInterfaceState.xcuserstate
diff AppleALC-vit9696/ResourceConverter/main.mm AppleALC-test/ResourceConverter/main.mm
Only AppleALC-test/Resources/CodecLookup.plist

ALC_logs.zip

 

log zip has the kernel logs snippets for working and failed situation.

It finds 4 controllers to scan/patch on working version 

But then only 3 and it fails to find a suitable codec.

 

Note: this box has an AMD card for the external ports (HDAU) and ALC292 for analog.

 

what else can I provide to debug?

 

Note: the latest ver works on my T420 HD3000.

 

 

 

 

 

Edited by tluck

Share this post


Link to post
Share on other sites
14 minutes ago, tluck said:

Hi,

 

the recent changes to AppleALC broke audio on my Dell M4800.  the older AppleACL-test with CodecLookup.plist method works.

here are diffs between working and non-working (latest) repos.


$ diff -rq AppleALC-vit9696 AppleALC-test|grep -v git|differ
diff AppleALC-vit9696/AppleALC/kern_alc.cpp AppleALC-test/AppleALC/kern_alc.cpp
diff AppleALC-vit9696/AppleALC/kern_alc.hpp AppleALC-test/AppleALC/kern_alc.hpp
diff AppleALC-vit9696/AppleALC/kern_resources.cpp AppleALC-test/AppleALC/kern_resources.cpp
diff AppleALC-vit9696/AppleALC/kern_resources.hpp AppleALC-test/AppleALC/kern_resources.hpp
diff AppleALC-vit9696/AppleALC.xcodeproj/project.xcworkspace/xcuserdata/tluck.xcuserdatad/UserInterfaceState.xcuserstate AppleALC-test/AppleALC.xcodeproj/project.xcworkspace/xcuserdata/tluck.xcuserdatad/UserInterfaceState.xcuserstate
diff AppleALC-vit9696/ResourceConverter/main.mm AppleALC-test/ResourceConverter/main.mm
Only AppleALC-test/Resources/CodecLookup.plist

ALC_logs.zip

 

log zip has the kernel logs snippets for working and failed situation.

It finds 4 controllers to scan/patch on working version 

But then only 3 and it fails to find a suitable codec.

 

Note: this box has an AMD card for the external ports (HDAU) and ALC292 for analog.

 

what else can I provide to debug?

 

 

 

 

 


Try to reBuild AppleALC (1.3.5) and still work fine with my CA0132.
image.png.561fbedd26b0d308311ab06147407c2a.png

Share this post


Link to post
Share on other sites

more info ... something doesn't seem right in the new GrabCodecs - can't find the analog codec

 

i changed the logic to scan enter registry vs (ctlr-detect location)

... and then it at least finds a codec (albeit not an the ALC292) but either the Intel HDMI codec (2807) or AMD (AA01)

 

storing codec info for 8086:2807:100000

or reboot and got this:

storing codec info for 1002:AA01:100300
found unsupported AMD codec 0xAA01 revision 0x100300
failed to find a suitable codec, we have nothing to do

 

if i hard code the VendorID in appendCodecs it works.

 

$ ioreg -xl|grep IOHDACodecV

    | |   |         |   "IOHDACodecVendorID" = 0x1002aa01

    | |   |     |   "IOHDACodecVendorID" = 0xffffffff80862807

    | |   |     |   "IOHDACodecVendorID" = 0x10ec0292

 

//auto iterator = IORegistryIterator::iterateOver(ctlr->detect, gIOServicePlane, kIORegistryIterateRecursively);
auto iterator = IORegistryIterator::iterateOver(gIOServicePlane, kIORegistryIterateRecursively);
if (iterator) {
IORegistryEntry *codec = nullptr;
while ((codec = OSDynamicCast(IORegistryEntry, iterator->getNextObject())) != nullptr) {
if (codec->getProperty("IOHDACodecVendorID")) {
DBGLOG("alc", "found analog codec %s for %X:%X", safeString(codec->getName()), ctlr->vendor, ctlr->device);
appendCodec(this, codec);
break;
}
}

 

Edited by tluck

Share this post


Link to post
Share on other sites

Now my ALC269-VB having no sound output at all after this commit, even after kernelcache && prelinkedkernel rebuilt.

I've been placing AppleALC on Clover's kexts dir since long time ago, having no problem previously. Thanks.

(I'm using 10.11.6, 10.13.6 & 10.14.4 Beta 1). I'm still able to rolling back with older version, though.

Share this post


Link to post
Share on other sites
43 minutes ago, Badruzeus said:

Now my ALC269-VB having no sound output at all after this commit, even after kernelcache && prelinkedkernel rebuilt.

I've been placing AppleALC on Clover's kexts dir since long time ago, having no problem previously. Thanks.

(I'm using 10.11.6, 10.13.6 & 10.14.4 Beta 1). I'm still able to rolling back with older version, though.


I compile new kext with new commit. Still working fine and no problem

image.thumb.png.97abea696aa8007d266006cb7f5e5c02.png
 

Share this post


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

I compile new kext with new commit. Still working fine and no problem

OK, plz attach your latest precompiled AppleALC (release) for me to test.. not sure where's the problem that make it didn't work; using Xcode 8.2.1 to compile here. Thanks.

Share this post


Link to post
Share on other sites
17 minutes ago, Andres ZeroCross said:

As your wish...

Cool, it works (efi\clover\kexts\other). My ALC269-VB Audio Output is back again. Thanks.

I've to recheck my compilation; I just noticed that Lilu is also updated to v1.3.3 which I forgot using this new debug kext when building latest AppleALC (though, vit9696 ever said that we don't need doing it but.. who know?).

 

MacBook-Pro:~ badruzeus$ kextstat | egrep "AppleALC|Lilu"
   25    7 0xffffff7f82c79000 0x20000    0x20000    as.vit9696.Lilu (1.3.3) 07E95C83-F850-300E-AA77-29C63A82F776 <7 5 4 3 2 1>
   26    0 0xffffff7f82c99000 0xff000    0xff000    as.vit9696.AppleALC (1.3.5) F02FB15A-0652-37DB-8B24-A537E96DEE09 <25 12 7 5 4 3 2 1>
MacBook-Pro:~ badruzeus$ 



Screenshot 10.png

Edited by Badruzeus

Share this post


Link to post
Share on other sites
4 minutes ago, Badruzeus said:

Cool, it works (efi\clover\kexts\other). My ALC269-VB Audio Output is back again. Thanks.

I've to recheck my compilation; I just noticed that Lilu is also updated to v1.3.3 which I forgot using this new debug kext when building latest AppleALC (though, vit9696 ever said that we don't need doing it but.. who know?).

 

 


MacBook-Pro:~ badruzeus$ kextstat | egrep "AppleALC|Lilu"

   25    7 0xffffff7f82c79000 0x20000    0x20000    as.vit9696.Lilu (1.3.3) 07E95C83-F850-300E-AA77-29C63A82F776 <7 5 4 3 2 1>

   26    0 0xffffff7f82c99000 0xff000    0xff000    as.vit9696.AppleALC (1.3.5) F02FB15A-0652-37DB-8B24-A537E96DEE09 <25 12 7 5 4 3 2 1>

MacBook-Pro:~ badruzeus$ 

 

Screenshot 10.png


I always check latest debug lilu.kext (In release version of github) before compiling any plugin kext of lilu. :D

I am using Lilu.kext v 1.3.1 not 1.3.3

Edited by Andres ZeroCross

Share this post


Link to post
Share on other sites

well the new code is not working for me on my Dell (that has 3 audio devices), but it works on other machines (they only have 1 device). the grabCodecs tries to find properties

IOHDACodecVendorID and IOHDACodecRevisionID... but the new iterator method of searching IOREG only finds in the non-analog devices?  even though there are 3 devices to find. 

 

I made it work by expanding the IOREG search to beyond the current controller and find any instance of IOHDACodecVendorID/IOHDACodecRevisionID

and then I stuff these properties in HDEF so they will be found (vs device below it) since they are not found by the iterator otherwise. 

 

the attached log shows all the devices the iterator finds. Strange that it only finds one IOHDACodecDevice - bug in the iterator?

 

$ ioreg -xl|egrep "IOHDACodecD|odecV|odecRev"|grep -v Kit

    | |   |       +-o IOHDACodecDevice@0,1,0  <class IOHDACodecDevice, id 0x1000003d4, registered, matched, active, busy 0 (110 ms), retain 7>

    | |   |         |   "IOHDACodecVendorID" = 0x1002aa01

    | |   |         |   "IOHDACodecRevisionID" = 0x100300

    | |   |         +-o IOHDACodecDriver  <class IOHDACodecDriver, id 0x1000003d7, !registered, !matched, active, busy 0 (110 ms), retain 5>

    | |   |           |   "IOClass" = "IOHDACodecDriver"

    | |   |           |   "IOProviderClass" = "IOHDACodecDevice"

    | |   |   +-o IOHDACodecDevice@3,0  <class IOHDACodecDevice, id 0x1000003e1, registered, matched, active, busy 0 (65 ms), retain 7>

    | |   |     |   "IOHDACodecVendorID" = 0xffffffff80862807

    | |   |     |   "IOHDACodecRevisionID" = 0x100000

    | |   |     +-o IOHDACodecDriver  <class IOHDACodecDriver, id 0x1000003e3, !registered, !matched, active, busy 0 (64 ms), retain 5>

    | |   |       |   "IOClass" = "IOHDACodecDriver"

    | |   |       |   "IOProviderClass" = "IOHDACodecDevice"

    | |   | |   "IOHDACodecRevisionID" = 0x100001

    | |   | |   "IOHDACodecVendorID" = 0x10ec0292

    | |   |   +-o IOHDACodecDevice@1B,0  <class IOHDACodecDevice, id 0x1000003ea, registered, matched, active, busy 0 (423 ms), retain 7>

    | |   |     |   "IOHDACodecVendorID" = 0x10ec0292

    | |   |     |   "IOHDACodecRevisionID" = 0x100001

log

Share this post


Link to post
Share on other sites
On 1/21/2019 at 6:37 PM, Andres ZeroCross said:

Try this,,, 

 

Revert back to your previous ones,, your codec and AlexAMD is same ALC256 but different layoutID. Both of you make me confuse.

Take another day,,, Alex make fast response,, so i will help him first

Can we continue ?

A reminder. Audio is working without codecommander and ssdt , both internal and speakers. Problem is that , randomly (cannot reproduce it , seems to happen when system idle ?) speakers makes a noise and cpu gets high. Only way to stop this is to reboot.

Share this post


Link to post
Share on other sites

Hello, I am having some issue with static headphone audio. I have attached the debug files. 

Quick information: 

Lenovo Thinkpad T440p laptop Mojave 10.14.3

Codec Realtek 292

Layout-id=28

 

DebugALC.zip

 

Thanks!

Edited by Emulle

Share this post


Link to post
Share on other sites

good news -  with today's updates after 1651 retries, it finds the analog Codec info!

latest version works for me.

(I was wondering if it was a matter of timing?)

    ...

     alc @ failed to find IOHDACodecVendorID, retrying 1649

     alc @ failed to find IOHDACodecVendorID, retrying 1650

     alc @ failed to find IOHDACodecVendorID, retrying 1651

     alc @ (DBG) platformLoadCallback 2 0 1 14530 1

     alc @ (DBG) resource-request arrived platform

     alc @ (DBG) checking codec 10EC:292:100001

     alc @ (DBG) selecting from 3 files

     alc @ (DBG) comparing 0 layout C/12

     alc @ (DBG) comparing 1 layout 12/12

...

 

Share this post


Link to post
Share on other sites

Greetings,

 

I am having problems with my audio.  The information is as follows.  (Some of the information I will add later and update this post.)

 

The report is meant to contain:

1. Laptop model/Motherboard model:   Acer Aspire TC-780A
2. Codec name:   Realtek ALC 662
3. Layout used with the info what works for you (ideally if you try them all) : I Tried all available layouts.  As follows:

 

Audio Layout 5

Works, rear output and input are not recognized.(They dont even appear in settings)  The sound works from the front output perfectly (Qaulity of sound no hissing, no skipping etc) but the sound output is very low.  With the volume turned up to full it is audible but nowhere near where it should be.  HDMI audio recognized (Have not tested it)

 

Audio Layout 7

Not working no sound.  No devices listed under audio

 

Audio layout 11

Works, rear output and input are not recognized.(They dont even appear in settings)  The sound works from the front output perfectly (Qaulity of sound no hissing, no skipping etc) but the sound output is very low.  With the volume turned up to full it is audible but nowhere near where it should be.  HDMI audio recognized (Have not tested it)

 

Audio Layout 12

Works, rear output and input are not recognized.(They dont even appear in settings)  The sound works from the front output perfectly (Qaulity of sound no hissing, no skipping etc) but the sound output is very low.  With the volume turned up to full it is audible but nowhere near where it should be.  HDMI audio recognized (Have not tested it)

 

Audio Layout 13

Works, rear output and input are not recognized.(They dont even appear in settings)  The sound works from the front output perfectly (Qaulity of sound no hissing, no skipping etc) but the sound output is very low.  With the volume turned up to full it is audible but nowhere near where it should be.  HDMI is also not recognized.


4. OS X versions you tried: 10.13 (High Sierra)  10.14 (Mojave) The result is the same in both.


5. Autogenerated Info.plist made with the help of this utilityWill add this later when I get home

 

Thank you all in advance
 

 
 

Edited by Redoginzer

Share this post


Link to post
Share on other sites
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, my system specs:

 

MacOS High Sierra 10.13.6

Clevo P750DM2-G

Intel Z170 Board

Intel Core i7 7700K Processer

64 GB RAM

NVIDIA GeForce 1070 Discreet Video

(No on-board video)

 

HDA Codec #0: Realtek ALC899
 HDA Codec ID: 0x10ec0899
       Vendor: 0x10ec
       Device: 0x0899

 

I have tried numerous layouts:

 

1 = Internal Speaker only, no other output/inputs

2 = Internal Speaker, Line Out only

3 = Gives correct Input/Outputs, but no sound

5 = no sound

7 = doubles all inputs/outputs but gives internal speaker sound only

11 = Mic only

65 = Internal Speaker and Microphone only

98 = nothing

99 = nothing

101 = nothing

 

Dumps are attached.  Please help!  Thanks!

0x10ec0899.zip

Edited by jiggyman

Share this post


Link to post
Share on other sites

Just for fun, compiled targeting 10.7, and it works! WOW!

I have to edit minkernel of course :D

Edited by ellaosx

Share this post


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

 

Hi, my system specs:

 

MacOS High Sierra 10.13.6

Clevo P750DM2-G

Intel Z170 Board

Intel Core i7 7700K Processer

64 GB RAM

NVIDIA GeForce 1070 Discreet Video

(No on-board video)

 

HDA Codec #0: Realtek ALC899
HDA Codec ID: 0x10ec0899
Vendor: 0x10ec
Device: 0x0899

 

I have tried numerous layouts:

 

1 = Internal Speaker only, no other output/inputs

2 = Internal Speaker, Line Out only

3 = Gives correct Input/Outputs, but no sound

5 = no sound

7 = doubles all inputs/outputs but gives internal speaker sound only

11 = Mic only

65 = Internal Speaker and Microphone only

98 = nothing

99 = nothing

101 = nothing

 

Dumps are attached. Please help! Thanks!

0x10ec0899.zip

Check, layout 66.

899.zip

Share this post


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

 

Hi, my system specs:

 

MacOS High Sierra 10.13.6

Clevo P750DM2-G

Intel Z170 Board

Intel Core i7 7700K Processer

64 GB RAM

NVIDIA GeForce 1070 Discreet Video

(No on-board video)

 

HDA Codec #0: Realtek ALC899
 HDA Codec ID: 0x10ec0899
       Vendor: 0x10ec
       Device: 0x0899

 

I have tried numerous layouts:

 

1 = Internal Speaker only, no other output/inputs

2 = Internal Speaker, Line Out only

3 = Gives correct Input/Outputs, but no sound

5 = no sound

7 = doubles all inputs/outputs but gives internal speaker sound only

11 = Mic only

65 = Internal Speaker and Microphone only

98 = nothing

99 = nothing

101 = nothing

 

Dumps are attached.  Please help!  Thanks!

0x10ec0899.zip

 

Attached updated Dump file.  

VoodooHDA_Dump

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.

×