Jump to content

AppleALC — dynamic AppleHDA patching


vit9696
5,390 posts in this topic

Recommended Posts

Mind updating the wiki on how to manually adding codecs ? Newest commit keeps giving me this when archiving:

clang: error: no such file or directory: '/Users/Shiki/Desktop/AppleALC/Lilu.kext/Contents/Resources/Library/plugin_start.cpp'
clang: error: no input files

So do I need to put the entire lilu repo in AppleALC repo or what ?

Link to comment
Share on other sites

Many KP with new versions, Lilu

back to v1.0.19, no problem, work fine

x99 Alc1150

Spitting out like this will not help anybody to resolve the issues. If you do have issues, consider providing panic logs with keepsyms=1 created with a debug version of the kext, the frequency you get them, the preconditions you have, etc.

 

So do I need to put the entire lilu repo in AppleALC repo or what ?

 

You just need to copy the debug version of Lilu.kext to AppleALC folder. Check the first post.

Link to comment
Share on other sites

After a short break i'm back again. :D

Here is an updated AppleALC.kext for the Creative CA0132 codec, which should work from 10.9 - 10.12, the resources are nearly the same as the last ones i uploaded.

So far i remember the most of you prefer the layout with working front Headphones, so i made a layout (5) where you can use the front and rear HP simultaneously.

Please test all layouts, any feedback could be useful. The layout 1 i've done with the help of abdouoi and should work with Alienware laptops.

 

Until now, the included CodecCommander.kext is mandatory, you should install it to @/S/L/E

The lilu kext is in the AppleALC Plugin folder, if you have already installed it, delete one of both.

 

Here a short explanation:

 

layout-id  0: 5.1 default

               1: 2.0 Alienware 15 R2 

               2: 2.0 + front HP 

               3: 2.0 + rear line-out

               4: 5.1 with C/Sub

               5: 2.0 front + rear HP, simultaneously

               6: 5.1 with front HP

 

AppleALC_1.1.1.zip

 

The goal is, to have only one layout for the desktops, for this we have to fix the auto-switch mode for the front HP.

Front Mic is also possible, but probably without auto-switch , as far i remember it does not work even on Windows, please test.

  • Like 3
Link to comment
Share on other sites

I would ask everyone having CA0132 to pay very serious attention to Wern's post. We have good hopes to be able to upstream proper CA0132 support into the main AppleALC branch, however this may not happen if someone here decides not to test when he can.

 

We require everybody owning the codec to test all the mentioned layouts and write a list of what works and what does not per each layout. Please also write the layout number you prefer to use, since most of them are just tests and will not be merged.

 

Please note that this version of AppleALC is based on the source written before Lilu release, so make sure it is not installed. The next test version will likely be Lilu-integrated one, but as for now we consider important to exclude all the possible side-effects. Uploaded AppleALC is now based on the latest source, so it works as a Lilu plugin. Please do NOT forget that the AppleHDA installed must be clean and unmodified. Use:

codesign --verify /System/Library/Extensions/AppleHDA.kext

terminal command to check AppleHDA integrity. The command should print nothing.

 

Thank you for understanding.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

@vit9696, I forgot to mention, I contacted @Rehabman and he updated the source for the Envy IDT 92HD91BXX. The link is included here. Just ignore the config.plist change as we included a couple of your AppleALC patches for this codec to help his repo as well. I tested these changes with your codec and it works beautiful! Thanks again for getting this to work for our codec and your overall work on this method.

Link to comment
Share on other sites

Here you go. Release AppleALC 1.1.1 with menu-bar fix...

attachicon.gifAppleALC.kext.zip

 

a) Once again, thank you for this interim release, vandroiy2012.

 

B) the jumping menubar icon, when pressing the speaker icon, is actually fixed by disabling 'Show mirroring options in the menu bar' in the display system preferences, as per this thread:

 

https://www.reddit.com/r/hackintosh/comments/5sl918/menubar_glitch_with_volume_icon/

 

Doing so will fix this visual glitch, no matter which version of AppleALC you are using.

 

Just FYI.

Link to comment
Share on other sites

What the word with CA0132??

I am still new to "hackintoshing". 

Im willing to try but need instructions on how to do so..

wern apfel's AppleALC_1.1.1.zip has been downloaded 19 times including by me http://www.insanelymac.com/forum/topic/311293-applealc-—-dynamic-applehda-patching/page-67#entry2382171. I assume those people are still testing and will provide feedback when they're done. I'll probably finish my testing during the weekend. Audio volume control works, SPDIF output works, input works. Different layouts enable different ports. Some have interesting behavior. I'll have a detailed list of results later. There might be a bug in AppleALC when using layout 0 such that it won't get enabled. I'll try that again and try to track down the issue in the source code if there is an issue. If there's no layout that will enable all ports then I'll try to provide information about my codec (from Ubuntu debugfs or VoodooHDA getdump or whatever you like).
Link to comment
Share on other sites

wern apfel's AppleALC_1.1.1.zip has been downloaded 19 times including by me http://www.insanelymac.com/forum/topic/311293-applealc-—-dynamic-applehda-patching/page-67#entry2382171. I assume those people are still testing and will provide feedback when they're done. I'll probably finish my testing during the weekend. Audio volume control works, SPDIF output works, input works. Different layouts enable different ports. Some have interesting behavior. I'll have a detailed list of results later. There might be a bug in AppleALC when using layout 0 such that it won't get enabled. I'll try that again and try to track down the issue in the source code if there is an issue. If there's no layout that will enable all ports then I'll try to provide information about my codec (from Ubuntu debugfs or VoodooHDA getdump or whatever you like).

 

Thanks for your short feedback, i set the layout-id in the dsdt and layout 0 works.

Since they have left no feedback, i assume that they have no problems, and the kext works, so the resources are ready to be merged!?. Another reason i ask you for feedback is that my old case has no audio front panel, and i have no 5.1 device for testing. 

Link to comment
Share on other sites

Thanks for your short feedback, i set the layout-id in the dsdt and layout 0 works.

Since they have left no feedback, i assume that they have no problems, and the kext works, so the resources are ready to be merged!?. Another reason i ask you for feedback is that my old case has no audio front panel, and i have no 5.1 device for testing. 

Layout 0 works on the Gigabyte Z170X G1 Gaming afaik

Link to comment
Share on other sites

Thanks for your short feedback, i set the layout-id in the dsdt and layout 0 works.

Since they have left no feedback, i assume that they have no problems, and the kext works, so the resources are ready to be merged!?. Another reason i ask you for feedback is that my old case has no audio front panel, and i have no 5.1 device for testing.

I am currently only using the Clover config.plist to set the layout id (Devices->Audio->Inject). So I'll see what code path depends on that in the source code if I confirm the problem with layout 0. I'll try to finish my testing in a couple days.
Link to comment
Share on other sites

I am currently only using the Clover config.plist to set the layout id (Devices->Audio->Inject). So I'll see what code path depends on that in the source code if I confirm the problem with layout 0. I'll try to finish my testing in a couple days.

I finished my testing for the CA0132 codec.

http://www.insanelymac.com/forum/topic/311293-applealc-—-dynamic-applehda-patching/page-67#entry2382171

 

These are the results:

Common notes:
    "Digital Out" "Optical digital-out port" : No volume control as expected for digital output.
    
    The connection between "Headphone rear" and "Line out (L/R)" seems strange. 
    I know on a Mac Pro that inserting headphones into the front headpones jack disables the internal speaker and changes the name from "Internal Speakers" to "Headphones".
    But what is the expected behavior on a Hackintosh? I would prefer the ports to be independent, to allow the user to switch between them from the Sound preferences panel, without physically connecting or disconnecting anything.
    

Layouts:

0: 5.1 default
    Shows four outputs and two inputs.
        1 "Headphones" "Headphone port" changes name to "Line Out" "Audio line-out port" when "Line out (L/R)" connected
        2 "Line Out" "Audio line-out port"
        3 "Line Out" "Audio line-out port"
        4 "Digital Out" "Optical digital-out port"
        5 "Internal Microphone" "Built-in" has "Use ambient noise reduction"

    Headphone rear (with detect)    :   1 "Headphones" "Headphone port"
    Line out (L/R), Green           :   1 "Line Out" "Audio line-out port"
    Rear (L/R),     Black           :   3 "Line Out" "Audio line-out port"
    Center/Sub,     orange          :   2 "Line Out" "Audio line-out port"
    SPDIF out                       :   4 "Digital Out" "Optical digital-out port"
    Microphone rear (with detect)   :   5 "Internal Microphone" "Built-in" has "Use ambient noise reduction"
    Headphone front (with detect)   :     no connection
    Microphone front (no detect)    :     no connection
    
    Connecting "Headphone rear" disables audio from "Line out (L/R)"
    In Clover config.plist, I had to use Devices->Arbitrary to use layout-id 0 because Devices->Audio only works correctly with layout-id > 0. I believe this is a bug in Clover.


1: 2.0 Alienware 15 R2 
    Shows two outputs and two inputs.
        1 "Internal Speakers" "Built-in" changes name to "Headphones" "Headphone port" when "Headphone rear" connected
        2 "Digital Out" "Optical digital-out port"
        3 "Internal Microphone" "Built-in" has "Use ambient noise reduction"
        4 "Line In" Audio line-in port"

    Headphone rear (with detect)    :   1 "Headphones" "Headphone port" but no audio
    Line out (L/R), Green           :   1 "Internal Speakers" "Built-in"
    Rear (L/R),     Black           :     no connection
    Center/Sub,     orange          :     no connection
    SPDIF out                       :   2 "Digital Out" "Optical digital-out port"
    Microphone rear (with detect)   :   3 "Internal Microphone" "Built-in" has "Use ambient noise reduction"
    Headphone front (with detect)   :     no connection
    Microphone front (no detect)    :     no connection

    
2: 2.0 + front HP
    Shows three outputs and one input.
        1 "Headphones" "Headphone port" changes name to "Line Out" "Audio line-out port" when "Line out (L/R)" connected
        2 "Headphones" "Headphone port"
        3 "Digital Out" "Optical digital-out port"
        4 "Internal Microphone" "Built-in" has "Use ambient noise reduction"

    Headphone rear (with detect)    :   1 "Headphones" "Headphone port"
    Line out (L/R), Green           :   1 "Line Out" "Audio line-out port" (slite static with sounds that are louder?)
    Rear (L/R),     Black           :     no connection
    Center/Sub,     orange          :     no connection
    SPDIF out                       :   3 "Digital Out" "Optical digital-out port"
    Microphone rear (with detect)   :   4 "Internal Microphone" "Built-in" has "Use ambient noise reduction"
    Headphone front (with detect)   :     no connection
    Microphone front (no detect)    :     no connection

        "Line out (L/R)" and "Headphone rear" appear to be the same connection. "Headphone rear" is louder and more clear than "Line out". Connecting "Line out" makes "Headphone rear" quieter.


3: 2.0 + rear line-out
    Shows three outputs and two inputs.
        1 "Headphones" "Headphone port" changes name to "Line Out" "Audio line-out port" when "Line out (L/R)" connected
        2 "Line Out" "Audio line-out port"
        3 "Digital Out" "Optical digital-out port"
        4 "Internal Microphone" "Built-in" has "Use ambient noise reduction"

    Headphone rear (with detect)    :   1 "Headphones" "Headphone port"
    Line out (L/R), Green           :   1 "Line Out" "Audio line-out port"
    Rear (L/R),     Black           :   2 "Line Out" "Audio line-out port"
    Center/Sub,     orange          :     no connection
    SPDIF out                       :   3 "Digital Out" "Optical digital-out port"
    Microphone rear (with detect)   :   4 "Internal Microphone" "Built-in" has "Use ambient noise reduction"
    Headphone front (with detect)   :     no connection
    Microphone front (no detect)    :     no connection


4: 5.1 with C/Sub
    Shows four outputs and two inputs.
        1 "Headphones" "Headphone port" changes name to "Line Out" "Audio line-out port" when "Line out (L/R)" connected
        2 "Line Out" "Audio line-out port"
        3 "Line Out" "Audio line-out port"
        4 "Digital Out" "Optical digital-out port"
        5 "Internal Microphone" "Built-in" has "Use ambient noise reduction"

    Headphone rear (with detect)    :   1 "Headphones" "Headphone port"
    Line out (L/R), Green           :   1 "Line Out" "Audio line-out port"
    Rear (L/R),     Black           :   3 "Line Out" "Audio line-out port"
    Center/Sub,     orange          :   2 "Line Out" "Audio line-out port"
    SPDIF out                       :   4 "Digital Out" "Optical digital-out port"
    Microphone rear (with detect)   :   5 "Internal Microphone" "Built-in" has "Use ambient noise reduction"
    Headphone front (with detect)   :     no connection
    Microphone front (no detect)    :     no connection
    
    Identical to layout 0?


5: 2.0 front + rear HP, simultaneously
    Shows three outputs and one input.
        1 "Line Out" "Audio line-out port" "Headphones" "Headphone port" changes name to  when "Line out (L/R)" connected
        2 "Headphones" "Headphone port"
        3 "Digital Out" "Optical digital-out port"
        4 "Internal Microphone" "Built-in" has "Use ambient noise reduction"

    Headphone rear (with detect)    :   2 "Headphones" "Headphone port"
    Line out (L/R), Green           :   1 "Line Out" "Audio line-out port"
    Rear (L/R),     Black           :     no connection
    Center/Sub,     orange          :     no connection
    SPDIF out                       :   3 "Digital Out" "Optical digital-out port"
    Microphone rear (with detect)   :   4 "Internal Microphone" "Built-in" has "Use ambient noise reduction"
    Headphone front (with detect)   :   2 "Headphones" "Headphone port"
    Microphone front (no detect)    :     no connection


6: 5.1 with front HP
    Shows four outputs and two inputs.
        1 "Headphones" "Headphone port" changes name to "Line Out" "Audio line-out port" when "Line out (L/R)" connected
        2 "Headphones" "Headphone port"
        3 "Line Out" "Audio line-out port"
        4 "Digital Out" "Optical digital-out port"
        5 "Internal Microphone" "Built-in" has "Use ambient noise reduction"

    Headphone rear (with detect)    :   1 "Headphones" "Headphone port"
    Line out (L/R), Green           :   1 "Line Out" "Audio line-out port"
    Rear (L/R),     Black           :   3 "Line Out" "Audio line-out port"
    Center/Sub,     orange          :     no connection
    SPDIF out                       :   4 "Digital Out" "Optical digital-out port"
    Microphone rear (with detect)   :   5 "Internal Microphone" "Built-in" has "Use ambient noise reduction"
    Headphone front (with detect)   :   2 "Headphones" "Headphone port"
    Microphone front (no detect)    :     no connection
I've attached my notes from Ubuntu, and the debug logs from macOS. These are the interesting files:

AppleALCNotes.txt - debug logs from macOS

around.txt - the entire output of Ubuntu's /proc/asound directory

asoundcodec0.txt - the information for codec 0 (CA0132)

asoundcodec0.txt.png - a graph created by codecgraph of that information

asoundcodec0summary.txt - manual rearrangement of that information, since the graph doesn't include everything

joevtAudio.zip

  • Like 2
Link to comment
Share on other sites

Hello. Read WiKi carefully. Especially Supported codecs https://github.com/vit9696/AppleALC/wiki/Supported-codecs to see what layout-id you need.

Thanks. Setting it to 11 enabled AppleHDAEngine Input and Output in IOREG under AppleHDADriver. I can select Volume level now, but I still have no sound. I did sudo kextcache -i / and rebooted, but still no sound. AppleALC and Lilu still IOResources in IOReg (but this might be the way it's supposed to be?). 

 

Do I need any DSDT patches?

Link to comment
Share on other sites

Thanks. Setting it to 11 enabled AppleHDAEngine Input and Output in IOREG under AppleHDADriver. I can select Volume level now, but I still have no sound. I did sudo kextcache -i / and rebooted, but still no sound. AppleALC and Lilu still IOResources in IOReg (but this might be the way it's supposed to be?). 

 

Do I need any DSDT patches?

 

Maybe you need CodecCommander.kext to force your codec. Try it. Or EAPDFix.kext... I have one for this codec give me couple minutes...

 

upd. Here you go. EAPDFix.kext.zip Put it in L/E and rebuild caches. Report working/not working

Link to comment
Share on other sites

Maybe you need CodecCommander.kext to force your codec. Try it. Or EAPDFix.kext... I have one for give me couple minutes...

I have CodecCommander.kext installed. 

 

I tried inserting headphones, but that "broke" it and I could no longer select volume level. I rebooted with headphones attached, volume levels was enabled. No sound. But could disconnect and reconnect headphones and still have volume levels supported.

Link to comment
Share on other sites

I have CodecCommander.kext installed. 

 

I tried inserting headphones, but that "broke" it and I could no longer select volume level. I rebooted with headphones attached, volume levels was enabled. No sound. But could disconnect and reconnect headphones and still have volume levels supported.

 

Delete CodecCommender and use EAPDFix.kext i posted in previous post! It is specially made for this codec!

  • Like 1
Link to comment
Share on other sites

Delete CodecCommender and use EAPDFix.kext i posted in previous post! It is specially made for this codec!

Deleted CodecCommander from S/L/E. Used Kext Utility this time instead, and it installed it to S/L/E and not L/E as I did not see any option to choose destination. Rebooted. Not working. Levels are working, but iTunes cannot play. GUI sounds not working etc. Did sudo kextcache -i / just to confirm, rebooted. Still not working.

 

Will it have to be installed to L/E? IOReg shows same output as before.

 

Edit: kextcache says EAPDFix and PinConfigs (think this one is new since I installed EAPD, right?) are allowed by disabled SIP. So should be running. But cannot see them in IOReg.

 

Edit2: Should I enable ResetHDA and AFGLowPowerState in Clover? Nope, did this and still does not work. Reverting to Disabled for these options.

Link to comment
Share on other sites

Suggest you to ask @Mirone to make resources for you in this thread AppleHDA Patch Requests.  If it works i'll add it in AppleALC

I have gotten it to work using a patched AppleHDA and Clover KextToPatches. The reason for me being here is well, I thought this way sounded cool. Sometimes after upgrading my patched AppleHDA broke and I had to reinstall it. It would be nice to not need that, and this seems more vanilla. 

 

Is there anything from these clover patches and patched AppleHDA I can provide you? Wouldn't want @Mirone to do double work.

Link to comment
Share on other sites

I have gotten it to work using a patched AppleHDA and Clover KextToPatches. The reason for me being here is well, I thought this way sounded cool. Sometimes after upgrading my patched AppleHDA broke and I had to reinstall it. It would be nice to not need that, and this seems more vanilla. 

 

Is there anything from these clover patches and patched AppleHDA I can provide you? Wouldn't want @Mirone to do double work.

 

Post here this AppleHDA and Patches i'll take a look...

Link to comment
Share on other sites

This AppleHDA, along with these patches in Clover KextsToPatch. Patch 5 should be disabled for El Capitan support, Patch 4 for Sierra. 

 

Audio Inject = 1, AFGLowPowerState and ResetHDA Enabled.

 

Sorry for any inconvenience by posting the patches as jpeg. Thank you for looking into it!

 

 

edit: I don't if it is the best solution though, it might be able to be improved. This solution provides some low crackling noise, sometimes. Sound also sometimes disappears, but resumes couple of seconds later. This does not happen under Windows. Not sure why it happens.

AppleHDA.kext.zip

post-1847887-0-27462700-1489930829_thumb.png

Link to comment
Share on other sites

×
×
  • Create New...