-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Bad distortion through headphones with AppleALC and alc_fix #75
Comments
I have a similar problem. The audio randomly cuts at times and the only thing that solves it is going to System Preferences > Sound > Input and switching from Line In to Built-In Microphone. Then, after a few seconds, it cuts again. Happens with both loudspeakers and headphones, but I can't find the exact steps to reproduce it. |
Yeah, I just found out yesterday that I can fix my issue by selecting “line in” in the same settings panel so our issues are probably related. Mine seems to stay working after changing the setting but I haven’t done any real testing. |
I have experienced the same problem as @notthebee several times, after sleep. It doesn't happen every-time however. |
Same problem on T490 platform. Seems like problem with interrupts |
I have both headphone interference and audio cuts on a T480. It seems to happen only after waking up from sleep but not immediately, it takes like 1 hour or so to stop working. The built in mic also stops working. Restarting solves the problem.
Keep System Preferences open at the Input submenu. That'll make the output keep working as far as you keep System Preferences open. Still not a great solution but can help you in case you can't restart immediately. Offtopic: I love your videos. I decided to get a T480 just because of your advices, best laptop I've ever had, so far 👍. |
It may be the same problems like those which are solved here: acidanthera/AppleALC#571 (comment) I've asked for some help/advise :) |
Got much help from @fewtarius and have a test-build with a maybe fixed layout 21 for you. He, the magician of ALC-codecs, throwed some voodoo on it and it may be fixed and could work natively now. I would love to get some testing and feedback from you before posting a merge request to http://github.com/acidanthera/AppleALC. So: If you are brave enough, simply take the build attached to this post, remove every alc_fix, CodecCommander or similar, set your LayoutId to 21 and do some testing! If it succeeds or fails, please report back! |
I'll test it later today. I've already replaced AppleALC.kext and layout-id on config.plist but I can't restart right now. I'm I missing anything? I have a T480 and I'm using EETagent's EFI. |
@TheQuetz if you don't have any additional tools in place to fix audio, thats it. If you are on Catalina a "sudo kextcache -i /" to rebuild the kextcache won't hurt, but may be unnecessary. |
@benbender Just swapped out my AppleALC with the fixed one this morning. No issues so far! Seems to be working! |
@benbender Removed ALCPlugFix and tested your AppleALC, no problems so far after 3-4 sleep cycles. I think after a few more days, it'll be safe to say that the changes can be made into a PR upstream. Meanwhile I'll push your kext into the repo and advise to remove existing ALCPlugFix. Thank you @fewtarius for helping out! |
It switches output automatically too once headphones are plugged, that's awesome! Do you guys still have the instructions/steps? If possible, I'd like for that to be posted here in case someone else stumbles onto this issue with a different audio layout. |
I have saved the conversation. If it's fine for @fewtarius, I'll give it to you. But it surely will need some serious edit to be helpful. |
If you're curious, as to how we resolved this, here's what we did. We started by downloading the AppleALC source code and making sure we could do a test build. Next we looked at your codec dump, specifically your headphone jack input and output and your internal speaker out. We wanted to verify that the output supported EAPD, and the input supported JackSense. We confirmed both. The outputs supported EAPD (EAPD Detect), and the jack mic supported JackSense (In Detect).
Once we had this data, we inspected the pin config data in AppleALC for ALC285 layout 21 (AppleALC/Resources/PinConfigs.kext/Contents/Info.plist) with ProperTree and learned that the EAPD signal was only being sent to the internal speakers, and no pin widget control signal was being sent to the jack mic. This means the jack was not being put into the proper state after a wake event. To remedy this we needed to update the ConfigData and the WakeConfigData to send the proper signals. Original ConfigData:
Original WakeConfigData:
Each of the bytes above represent a pin complex, you can break the pin complex down like this:
Each of the verbs that can be sent to the codec are documented in the Intel HDA specification manual, but we know that the EAPD verb is 70C and the Pin Widget Control verb is 707. Looking at the data above we can quickly see that we're missing both the pin widget control verb and EAPD on the headphone switch. To correct this we simply add the verbs to the configuration data, and recompile AppleALC. To correct EAPD, we add 02170C02 which sends the EAPD enable signal to node 21. To correct the jack mic, we add 01970725 which sends the Pin Widget Control signal to node 19. We add the EAPD verb to both the ConfigData, and the WakeConfigData and the Pin Widget Control signal to the WakeConfigData. ConfigData is used by AppleALC on initialization, and WakeConfigData is used on each wake event. We used ProperTree to update the data. Corrected ConfigData:
Corrected WakeConfigData:
After we've updated the pin config for this codec and layout, we simply compile and test to ensure everything works on wake. We also want to make sure that we remove VerbStub, CodecCommander, ALCWakeFix, and any other helper that may be installed as those helpers can clobber the fix. |
I was already typing it up. :) |
Additional links for in depth documentation/learning:
|
If you want to make that PR now, I'll go ahead and endorse it on the ticket. |
Glad to hear the patch is working out for you all. 👍 |
I'll do as soon as I finished my other small Hackintosh project. Thanks again everyone - especially @fewtarius. It was a pleasure! |
PR on the way: acidanthera/AppleALC#612 |
The eagle has landed: acidanthera/AppleALC@4110602 👍 |
I haven't tried any patches yet but just asking, is there a similar fix for a T480? ALC 257? |
Describe the bug
After sleep audio through the headphone jack its muted and distorted. I'm using AppleALC.kext and alc_fix from the patches directory. I just ran the install.sh. I'm assuming that's all you have to do for it to work. I've tried using alcid 11, 21, and 31 with no change. I checked the pin config in Hackintool and it matches yours so I don't think there should be an issue there.
alc_fix seems to be working
To Reproduce
Steps to reproduce the behavior:
Note: Consistently repeatable. Audio gets messed up every time after first sleep following boot.
Expected behavior
Undistored audio through headphones
The text was updated successfully, but these errors were encountered: