Jump to content
vit9696

AppleALC — dynamic AppleHDA patching

2,147 posts in this topic

Recommended Posts

Advertisement

Lilu and AppleALC both target Mountain Lion (10.8) and higher (as well as all the prebuilt binaries on github releases).

When it comes to compiling, you will need a compiler with C++14 support. Normally Lilu and AppleALC would compile on Mavericks and newer, since clang from Xcode 5.1.1 does not fully support c++14. However, I made some changes to Lilu and AppleALC (other kexts may follow) to let the buildsystem use the preliminary C++14 support on Mountain Lion's Xcode as well.

However, you should really avoid compiling with old Xcode if you could, as its bundled compiler is less reliable and may provide less optimised code.

Share this post


Link to post
Share on other sites

Hi my friends...

I recently upgraded my laptop to High Sierra from Yosemite.

I´m testing AppleALC for my Laptop and I can´t get properly work from this kext. 

I have ALC269VB

I upload my CodecDrump.

Can anyone help me?

Thanks in advance.

Captura de pantalla 2018-04-19 a las 23.16.46.png

CodecDump.zip

Share this post


Link to post
Share on other sites
Posted (edited)

I am having an issue with my GE60 0ND. DPCIManager reports my laptop with ALC892.  I already have Lilu and AppleALC in my clover other kext folder.  I've tried all the layouts listed for 892 but nothing works.  AppleHDA is stock and change HDAS to HDEF patach applied in ACPI>DSDT>Patch. VoodooHDA works but it splits my 4 speakers into 2 separate outputs with 2 speakers on each output, making only 2 speakers work at any given time. I would much rather use AppleALC and see if it fixes the problem. 

 

Below is what's reported in DPCIManager.

Audio Devie,  Sub Device,    Codec ID,   Revision,   Codec name:

0x80861E20, 0x146210C7, 0x10EC0892, 0x0302, Realtek ALC892

 

https://drive.google.com/open?id=1K3-ayWOidKNKrZvzTdaf8GAgiufLUbKL

Edited by 9000RPM

Share this post


Link to post
Share on other sites
Posted (edited)
On 4/11/2018 at 10:21 AM, MacPeet said:

Hi MacPeet, sorry for replying that late. 

 

Here are my test results:

Trial 5: Only ‘Internal Speakers’ are working on the ‘Internal Speakers’ mode. Headphones are not working.

Trial 6: Just like the previous attempts, speakers and headphones are both working on the ‘Headphone’ mode.

Trial 7: This  switch mode, shows 'Headphones' when headphones are attached, and ‘Internal speakers’ when  sound is playing over the internal speakers. So this is actually working! The only thing is that the headphone port constantly is is red, even when no data is emitted.

Edited by MegaCookie

Share this post


Link to post
Share on other sites

@MegaCookie

red? LED indicator light?

Version 7 but almost perfect for AppleALC release?
 

Ok, last attempts for red problem:
 

trial 7 PinConfig had EAPD 2 on speakers and headphones

01471C10 01471D10 01471E21 01471F01 01470C02 01271C30 01271D00 01271EA6 01271F99 01871C40 01871D10 01871E81 01871F01 01B71C60 01B71D00 01B71E17 01B71F99 01B70C02 01E71C70 01E71D10 01E71E44 01E71F01

 

try this:

Trial 8 EAPD speaker only

trial8_ALC1220_for_Clevo_P950HR_LayoutID13.zip

Trial 9 EAPD headphones only

trial9_ALC1220_for_Clevo_P950HR_LayoutID13.zip

Share this post


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

@MegaCookie

red? LED indicator light?

Version 7 but almost perfect for AppleALC release?
 

Ok, last attempts for red problem:
 

trial 7 PinConfig had EAPD 2 on speakers and headphones

01471C10 01471D10 01471E21 01471F01 01470C02 01271C30 01271D00 01271EA6 01271F99 01871C40 01871D10 01871E81 01871F01 01B71C60 01B71D00 01B71E17 01B71F99 01B70C02 01E71C70 01E71D10 01E71E44 01E71F01

 

try this:

Trial 8 EAPD speaker only

trial8_ALC1220_for_Clevo_P950HR_LayoutID13.zip

Trial 9 EAPD headphones only

trial9_ALC1220_for_Clevo_P950HR_LayoutID13.zip

Unfortunately both trials had the same red led on inside the headphone port, sound was still working right as expected.

 

Share this post


Link to post
Share on other sites
Posted (edited)

New built here:

Notebook Asus X550VX i7 - 7700hq

with ALC255

not working with layout id  3, 13, 17, 18, 27, 28, 99

mic works others not.. :(

 

codec dump linux

https://drive.google.com/file/d/1pg2y76WvFYsO8vFY-2B_2OLyKMmkQ8Tg/view

 

Do i edit config.plist right? here the debug fuke

https://drive.google.com/file/d/1k6v8cWpxqNcWjsvGY4-h1jhAvkikuNcS/view

 

latest debug

http://www.mediafire.com/file/2pjny4eq5r64ed8/debug_1383 (1).zip

 

clover and kext

https://drive.google.com/open?id=1n5rHIw-jDPCgocWJtZ0AoVlqIi6Xc7XL

Edited by Babiloe

Share this post


Link to post
Share on other sites

i think the "red light" you are referring to is that you have a optical SPDIF output (3.5 mm) combo jack. it most likely will be "red" when audio is active. 

hs_spdif_121.jpg

Share this post


Link to post
Share on other sites
5 hours ago, MacPeet said:

@MegaCookie

 

ok, I have no solution for that

Trial 7 good for the release?
Is this codec good enough for you?

Yup that's fine! Oddly, when rebooting several times it is suddenly gone! Only thing I need to fix is getting 'Headphone' output to work, after sleep. Internal Speakers are working after sleep. I assume to fix this in CodecCommander.kext/ EAPDFix.kext?

Anyway thanks for your help!

 

1 hour ago, bronxteck said:

i think the "red light" you are referring to is that you have a optical SPDIF output (3.5 mm) combo jack. it most likely will be "red" when audio is active. 

Yup I have a combo output, so there was something wrong I guess.

Share this post


Link to post
Share on other sites

Hi! Is it possible to get codec AD1981 running with AppleHDA on HP Compaq 8710w?

It works nicely with VoodooHDA. Speakers and HP are switching automatically. 

Internal and HP mic also work - no switching in SysPref but it works when mic is plugged in and internal mic works when hp mic is unplugged.

 

It has same weird pathmap - connected directly: 

Playback:

    nid=5 [pin: Speaker (Analog)]
      |
      + <- nid=3 [audio output] [src: pcm] bindSeq=00008001


    nid=6 [pin: Headphones (Grey Left)]
      |
      + <- nid=3 [audio output] [src: pcm] bindSeq=00008001

 

But inputs are really weird. There are 5 nodes from input to HP mic/Internal mic

nid=4 [audio input]
      |
      + <- nid=21 [audio selector] [src: mix] bindSeq=00000003

             |
             + <- nid=12 [audio mixer] [src: mix] bindSeq=00000003

                    |
                    + <- nid=30 [audio selector] [src: mic] bindSeq=00000001

                           |
                           + <- nid=8 [pin: Microphone (Grey Left)] [src: mic] bindSeq=00000001

                    + <- nid=31 [audio selector] [src: monitor] bindSeq=00000002

                           |
                           + <- nid=24 [pin: Microphone (Analog)] [src: monitor] bindSeq=00000002

Can pathmap like that even work with AppleHDA? What codec should I patch?

I tried patches from AD1984 but no luck. 

 

These are manually patched verbs:

00571c10 00571d01 00571e17 00571f90 00570C02
00671c20  00671d10 00671e21 00671f03
00771cf0  00771d00 00771e00 00771f40
00871c30 00871d10 00871e81 00871f03
00971cf0  00971d00 00971e00 00971f40
00a71cf0  00a71d00 00a71e00 00a71f40
01671cf0  01671d00 01671e00 01671f40
01771cf0  01771d00 01771e00 01771f40
01871c40 01871d01 01871ea0 01871f90
01971cf0  01971d00 01971e00 01971f40

 

Codecgraph and linux codecdump attached.

Thx for any help or suggestions. 

 

 

 

 

 

 

codec.txt 2.svg

codec.txt

Share this post


Link to post
Share on other sites

@ivik

AD1981 is an old codec.
Ok, too few nodes for all devices, I had to reduce to Speaker, HP, IntMic and LineIn.

try this:

trial1_AD1981_layoutID11_(0B).zip

Delete VoodooHDA and Disabler!
AppleHDA must be original!
AppleALC and Lilu in Clover / kexts / others and KextInject "Yes" in Clover
Inject LayoutID 11 via Clover and FixHDA in Clover!
or
Inject in DSDT / HDEF with 0B without FixHDA in Clover!
Good luck

Share this post


Link to post
Share on other sites
Posted (edited)

Tried, but audio is greyed and nothing in syspref.

Microphone(24) works only with 4->21->12->31-24 with VoodooHDA. Doesn't work with 4->21->24.

ExtMic(8) works only with 4->21->12->30->8 with VoodooHDA.

 

Outputs work with 3->5 and 3->6 with VoodooHDA.

Outputs also work with 3->17-14->5/6.

 

Attached console, ioreg and sys info. It looks like it is registering to AppleHDA. 

Thank you for your effort and time. 

console.tiff

ioreg.tiff

ioreg2.tiff

sysinfo.tiff

Edited by ivik

Share this post


Link to post
Share on other sites

@MacPeet

El capitan. It has t7700 cpu, so HS is not option for now. Have to find t9500 cpu. I bought this laptop for 30euros 3 weeks ago, with everything working, battery like new, it looks like from store, 4gb ram, 1920x1200 17" screen, replaced wifi and put SSD. Also sleep and hibernation working, native brightness, volume touch buttons work. Windows was not option because of broken  touchpad drivers, and linux because of slow graphics. Here everything works like it should.

 

AD1981 is also on thinkpad T60. I searched everywhere, but no solution. Here is some half working legacy driver, don't know how binary was patched(if it was):

https://forum.thinkpads.com/viewtopic.php?t=85344&start=28#p564260

Share this post


Link to post
Share on other sites
Posted (edited)

@MacPeet - I changed the kext inject configuration in Clover config.plist from 'Detect' to 'Yes' and the sound started working.  Leaving my original post below for others who may have this same problem.  I need to set the Output device to "headphones" in order to play on my internal speakers and my sound is very low/poor quality.  I'm open to suggestions.  Thank you.

 

@MacPeet I have a Thinkpad T61 running OSX Sierra 10.12.6.  I'd like to use AppleALC.kext for sound.  I patched Device (HDEF) in my DSDT with Layout 11 (confirmed 0x0b in IoReg explorer) and placed AppleALC.kext and Lilu.kext in my Clover/kexts/Other directory.  AppleHDA.kext is the original in /S/L/E and no other HDA kexts are installed.  After reboot, a sound device is not detected.  Am I attempting to use AppleALC.kext correctly?  If not, what steps am I missing?  Thank you.

 

System Details:

  • Thinkpad T61 Laptop (Middleton BIOS), Penryn T9300, NVidia Quadro NVS 140m, 8GB DDR2-800, SSD 256GB
  • Clover (Legacy) 4439
  • OSX Sierra 10.12.6
  • NVidia Web Driver 378.05.05.25f07
Edited by tonyx86
added system details

Share this post


Link to post
Share on other sites

@tonyx86


At the time I patched the codec for Thinkpad T61 with @griven.
I do not have a Thinkpad T61.
The codec was difficult and not quite perfect.
@griven reported:
Do not switch to headphones in System Preferences / Sound.
Stand on speaker even if headphones are plugged.

 

 

 

hello  @vandroiy2012

 

I have new codec.

ALC888 - LayoutID27 (1B) for Acer Aspire 7738G or compatible

 

Resources_new_ALC888_ID27.zip


all works

can you please added the new codec?
 
many thanks
 

 

Share this post


Link to post
Share on other sites

Hello,@vit9696

I have a B360 motherboard, the audio is ALC662 Rev3, the latest AppleALC does not support, I get Codec#0, but not compile AppleALC, do I add support?

codec#0


Verbs from Linux Codec Dump File: codec#0

Codec: Realtek ALC662 rev3   Address: 0   DevID: 283903586 (0x10ec0662)

   Jack   Color  Description                  Node     PinDefault             Original Verbs
--------------------------------------------------------------------------------------------------------
    1/8   Black  Speaker at Ext Rear         18 0x12   0x411111f0   01271cf0 01271d11 01271e11 01271f41
    1/8   Green  Line Out at Ext Rear        20 0x14   0x01014010   01471c10 01471d40 01471e01 01471f01
 Analog UNKNOWN  Speaker at Ext N/A          21 0x15   0x4017c040   01571c40 01571dc0 01571e17 01571f40
    1/8   Black  Speaker at Ext Rear         22 0x16   0x411111f0   01671cf0 01671d11 01671e11 01671f41
 Mic at Ext Rear    0x18 0x18                        27365408 01871c20 01871d90     01871ea1 01871f01  
 Mic at Ext Front    0x19 0x19                        44142625 01971c21 01971d90     01971ea1 01971f02  
 Line In at Ext Rear    0x1a 0x1a                        25243695 01a71c2f 01a71d30     01a71e81 01a71f01  
 HP Out at Ext Front    0x1b 0x1b                        35733535 01b71c1f 01b71d40     01b71e21 01b71f02  
    1/8   Black  Speaker at Ext Rear         28 0x1c   0x411111f0   01c71cf0 01c71d11 01c71e11 01c71f41
Optical UNKNOWN  Mic at Ext N/A              29 0x1d   0x40a5c641   01d71c41 01d71dc6 01d71ea5 01d71f40
    1/8   Black  Speaker at Ext Rear         30 0x1e   0x411111f0   01e71cf0 01e71d11 01e71e11 01e71f41
--------------------------------------------------------------------------------------------------------


   Jack   Color  Description                  Node     PinDefault             Modified Verbs
--------------------------------------------------------------------------------------------------------
    1/8   Green  Line Out at Ext Rear        20 0x14   0x01014010   01471c10 01471d40 01471e01 01471f01
 Analog UNKNOWN  Speaker at Ext N/A          21 0x15   0x4017c040   01571c40 01571dc0 01571e17 01571f40
 Mic at Ext Rear    0x18 0x18                        27365408 01871c20 01871d90     01871ea1 01871f01  
 Mic at Ext Front    0x19 0x19                        44142625 01971c30 01971d90     01971ea1 01971f01  
 Line In at Ext Rear    0x1a 0x1a                        25243695 01a71c50 01a71d30     01a71e81 01a71f01  
 HP Out at Ext Front    0x1b 0x1b                        35733535 01b71c60 01b71d40     01b71e21 01b71f01  
Optical UNKNOWN  Mic at Ext N/A              29 0x1d   0x40a5c641   01d71c70 01d71dc0 01d71ea5 01d71f40
--------------------------------------------------------------------------------------------------------

 

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.

×