New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update MuteGPIO and AMP Values ALC255 + Add Layout21 for ALC272 Lenovo All In One PC C440 (CodecCommander.kext must be installed in Library/Extensions) #485
Conversation
Add MuteGPIO for Internal Mic and External Mic by Andres ZeroCross
Update AMP Values ALC255 by Andres ZeroCross
PinConfig for ALC272 Layout 21 by Andres ZeroCross (Lenovo All In One PC C440)
Add Path Layout and Platform for LayoutID 21 for Lenovo All In One PC C440 by Andres ZeroCross
Platform21.xml and Layout21.xml for ALC272 by Andres ZeroCross for Lenovo All In One PC C440
@andreszerocross why would you need CodecCommander.kext installed into Library/Extensions ? I use it on all my hacks because all of my laptops/desktop have codecs that need it. |
No, it wouldn't work if you put CodecCommander in EFI/CLOVER/Kexts/Other or OC/Kexts. I have Creative CA0132, CodecCommander is necessery. Without this,, i have "annoying high pitch sound" in speaker. AFAIK, CodecCommander.kext must be installed in Library/Extensions. ALC272 of AIO Lenovo PC C440 must put CodecCommadner.kext in Library/Extensions, if not there is no sound from Internal Speaker (but output is detected,). I made new resource because node id of internal speaker is 0x1A not 0x14. I have found 2 codec with same habit (Current ALC272 in AIO Lenovo and ALC298 in notebook), need CodecCommander in Library/Extensions and rebuild kext cache, then sound will work. Sorry for bad english |
Why do we merge stuff that needs CodecCommander? AppleALC has everything that fully replaces CodecCommander, it makes no sense to me to add borked resources that suddenly do require this legacy again? |
@vit9696 since you joined here, for example for ALC292 codec we need this configuration override SSDT for CodecCommander.kext:
I couldn't find proper evidence for this so can you or any other acidanthera member provide just a small example on how should i port these fixes into AppleALC, on what place should i put those because im a bit confused and couldn't figure out myself. There are many codecs on AppleALC merged like this with the use in combination with CodecCommander.kext in mind. I would really like to know how to do add those values into AppleALC.kext and get rid of CodecCommander.kext for good for the sake or a simpler and cleaner setup in general. Thanks. Additional note: we use AppleALC |
@roddy20 could you please provide the brief details on the matter? You know more than I do. |
My codec Audio is Creative CA0312, with layoutid 4 i need to set this profile to overide custom command of CodecCommander.kext `Name (RMCF, Package (0x02)
If i don't use that, I will get high pitch noise in my speaker. I used 5.1 Speaker Configuration. |
for
add 0157170D to WakeConfigData well known example is 01470C02 for a lot of Realtek codecs all possible values for Verbs and their parameters are described in |
It won't work, i have tried this for CA0132 with LayoutID = 4
So, we still need CodecCommander.kext in Library/Extensions and somehow some verb can't be sent with AppleALC.kext. |
@roddy20 i do confirm the same as @andreszerocross said. I just added the verbs but high pitch sound when i plug headphones and no audio output. For my codec Realtek ALC3232 (know as ALC292) aside of CodecCommander + AppleALC to have perfect audio inputs and outputs i also need ALCPlugFix which i have a fork with customized entries for my specific audio codec. See here: https://github.com/Sniki/ALCPlugFix The commands that you modify according to the specific codec are here: However since you guys said all those are supported by AppleALC itself i wanted to get rid of CodecCommander to have a cleaner setup (-1 SSDT, -1 kext, -2 config.plist entries). However i believe ALCPlugFix is still a necessity although i believe it's something that can be added into AppleALC as well so we have AppleALC as the perfect ALL IN ONE solution for audio. But it is not working for me without CodecCommander.kext Thanks |
@roddy20 i do confirm the same as @andreszerocross said. I just added the verbs but high pitch sound when i plug headphones and no audio output. For my codec Realtek ALC3232 (know as ALC292) aside of CodecCommander + AppleALC to have perfect audio inputs and outputs i also need ALCPlugFix which i have a fork with customized entries for my specific audio codec. See here: https://github.com/Sniki/ALCPlugFix The commands that you modify according to the specific codec are here: However since you guys said all those are supported by AppleALC itself i wanted to get rid of CodecCommander to have a cleaner setup (-1 SSDT, -1 kext, -2 config.plist entries). But it is not working for me. |
then Recompile new AppleALC.kext no need to recompile try this https://github.com/roddy20/VerbStub |
thanks @roddy20 I see and i will give it a try but i prefer automatic selection without having a popup to pick what i want. My Lenovo ThinkPad X240 does have a Docking Station, which it does have a combo jack there as well. so in total two combo jacks (2x Line-In=1x for laptop jack, 1x for dock jack) 1x Headphones(laptop jack), 1x LineOut(for the dock jack). What i noticed from people when patching audio, they patch it that way so you have to select from right click of volume icon on the menu bar which input or output you want. Basically a lot of desktop codecs are patched sort of that wrong way, no auto switch. Current existing patch is like this, if you plug headphones on the back audio does output into headphones automatically (that's fine), but if you plug headphones in front headphone jack, the audio will continue playing unless i rightclick menu bar and click on LineOut. same behavior for microphones. Anyway to the straight point, so by this now i can assume that AppleALC doesn't have that complete functionality that CodecCommander does have ? If yes, i can provide logs if needed, if not it would be great to port those, same for VerbStub and or ALCPlugFix functionality so we can have a fusion like WhateverGreen.kext had but now for audio. Sorry for this TLDR |
We believe the exact same functionality is supported by AppleALC. It might be, however, that CodecCommander does something else (e.g. more verbs that are not configured) to the HDA codec, or the amount of verbs you need to send with AppleALC are slightly different due to the order of the verbs sent. The suggestion to try VerbStub may unveil these differences by manually probing the commands and checking the result. There is some room that there is a race condition, and some verbs need to be sent e.g. twice, but I hope there is none. All in all, patience and trial and error are needed here. |
it is not for everyday usage |
Thanks @vit9696 That's good to know, i will try VerbStub and provide more details into this. @roddy20 correct me if im wrong with the order of things that i need to do:
I would appreciate a short brief to-do list so i can provide logs. |
yes, remove all these (ALCPlugFix, Commander, Combojack etc) |
installation and usage
|
Verbs names and numbers are described in HDA Spec, or here
etc |
@roddy20 i did some testing but i need to know which commands do i need for debugging my current problem for example: Let me know what are further commands that i need to try. |
I thougt just "hda-verb 0x15 SET_GPIO_DIRECTION 0x83" no need to use AC_VERB |
I believe that if there is a "PerformReset" command on boot, now my codec should work correctly, without CodecCommander and Without AlcPlugFix with the changes that i did. |
@andreszerocross try adding the WakeConfigData to ConfigData as well, that fixed almost completely my audio codec, mine just needs a full reset on Cold Boot, after wake from sleep everything works perfect. @roddy20 @vit9696 sorry for bothering you again, but can any of you or another member that can answer this: let me know if there is a "ResetHDA" function into AppleALC or OpenCore itself like we have this option on Clover or CodecCommander as i couldn't find any evidence or answer for this into documentations available. My codec needs a Full reset on Cold Boot to function completely fine. As for your point @vit9696 , yes you are right those commands are supported on AppleALC but they seem to be necessary to be included into ConfigData as well, not just on WakeConfigData. Thanks guys ! |
Interesting conversation. I also tested the Wake ConfigData, all verbs are sent, but the codec doesn't work. It works after restarting the core audio daemon. Maybe this could be a workaround. Regarding the CA0132 codec. CodecCommander has to be in /L/E because some commands have to be executed later. But already fixed, try AppleALC from the CA0132 topic on Insanelymac, where CC can be run by the boot loader. |
@wern-apfel how can i restart the audio daemon ? same for D3 cold power state ? I can do some debugging and send logs, i just need the directions on what/how to collect them. |
D3cold "hda-verb 0x1 0x705 0x4" assuming CC is loaded. then do a force restart coreaudio, enter "sudo killall coreaudiod" |
@wern-apfel i currently use a modified version of vusun123 - ALC292 for ThinkPad T440. Here are the files (codec_dump.txt, info.plist"of pinconfigs.kext, layout28.xml and Platforms28.xml): |
After a quick look, the MuteGPIO value is 1342242854 in hex 0x50010026. The pin should be in hex. 26 = 1a means 0x5001001a dec. 1342242842. |
Are you refering to Layout28.xml > PathMapRef > LineIn : |
Yes. With CodecCommander loaded and hda-verb in the path, you can use the script to display |
@wern-apfel here is what i got with CodecCommander.kext installed:
Those are the results, hopefully this can bring into surface a possible issue on my patch. Thanks ! Note: Aside from the codec_dump, is it possible to dump the hda-verb values from Linux and get a better understanding on what should be done to correct this codec ? |
I think you have a TRRS audio jack and the MIC and HP have pin sense. You must disable it for the microphone and call it via detect delegate. Try the simplified script. |
|
Is there any working example of detect delegate for Hackintosh codec with TRRS ? |
@Sniki hda-verb is only a client of CodecCommander, to make it work CC must be loaded. @roddy20 I don't have a Laptop with a TRRS jack, but I'm going to create an AppleALC for Sniki to see if it works. |
it is very interesting |
Oh, my old Dell laptop has an TRRS jack but my son uses it with Windows. Let's see if I can found a USB-to SATA adapter to do some tests. @Sniki in the meantime, you can try this sample. It is configured like the Dell. |
@wern-apfel not sure with what layout-id have done the configuration, i assumed it was the same: layout-id 28 that i was using on my files. However i get greyed out volume icon, sound doesn't work with your AppleALC.kext |
I'm sorry, I made a mistake. Try this one. |
No problem. |
Can you merge the AppleALC version of yours to AppleALC Github resource so i can use CodecCommander from Bootloader?? I can't use CodecCommander in Bootloader for CA0132 yet. |
Ok, now I see it. The Info.plist you provided is not the plist form the resources. I simply copied them without checking the content. |
Did you test it, does it work like before? I am not currently using the mainboard with the R3Di codec. |
Yes, that was just so i have a source of the hdaconfigdefault. Now it loads but the same problem is present: static noise on Headphones. |
I created a pull request with the changes. Can you try it and report? Thanks |
@wern-apfel any update or information gathered that you could provide for TRRS Jack ? |
I didn't have enough time to test. It seems that the issue is not the TRRS jack. When the GPIO entry is added, VREF is activated, but only if it is not configured in switch mode. The same behaviour on my desktop. I will do a few more tests. |
Yes, so currently we are using the MacPeet version of AppleALC patch with Manual Mode switch from Speaker to Headphones, so if we plug headphones, we lose audio from speakers but we have to click on the volume icon on the menu bar to select Line Out to get audio output from Headphones and vice versa (manual switch). Interestingly enough, instead of headphones, he choosed LineOut which seems to work for some reasons, i tried playing around with his patch and just to modify the pinconfigs so it shows "headphone" instead of "LineOut" and the static noise comes back. So current situation is: Manual mode works and headphones should be configured as LineOut. Here is the reference: |
Is it possible to setup an input device as a External Microphone instead of LineIn. On my MBP 13” Retina (Early 2015) when i plugin EarPods, in input it shows External Microphone and on Outputs it shows Headphones (as it should).
Output devices:
The problem is i don’t know what pinconfig should i make for ExtMic as the only option is MicIn or LineIn from documentations available, is it supposed to be left as micIn and then specify it on layout**.xml file > Inputs > ExtMic ? Or is there a ExtMic pin value ? If i leave both inputs from both jacks as LineIn, one of them won’t work, no input reception. I tried to leave the pinconfig value of one of the jacks as MicIn and add the ExtMic on one of the layout.xml but i get no external microphone listed for that input and the menu bar icon stays greyed out for like 1 min after i boot into desktop, so i will have no audio for that 1 min period until the configuration loads. |
In my experience, it only works when the microphone is the second device in auto switch mode. Regarding microphone on TRRS jacks. The VREF of the second device (in our case the external microphone) in switch mode is always 0V (ground) however VREF 80% is required, a workaround would be a binary patch, which changes VREF to 80 |
Use forums for discussion. |
Update MuteGPIO and AMP Values ALC255 layoutID = 21 by Andres ZeroCross