Jump to content

EAPD/Jack sense Fix (No sound and jack sense issue after sleep)


EMlyDinEsH

Recommended Posts

ok guys, i've found a more easy solution for my dv6821el... just unload and reload applehda after sleep and voilà, it works!!

 

Its known fix and not a good solution as we need to manually do this or use script after sleep. My kext fixes automatically and also other issues many faces.

Link to comment
Share on other sites

Hey, long time not spoken to you. 

I'm trying to resolve EAPD issues on an Asus 1201N laptop, which has ALC269. It has EAPD on 0x14 (sp) and 0x15 (hp).. but as I have discovered EPAD on 0x15 powers on by itself .. I can just use AppleHDA with no extra verb in pinconfig and it gets enabled. Speakers on 0x14 on the other hand refuse to start regardless of timing and other stuff I have played with. What I have discovered is that querying response from IRR register always return 0 (even when audio is playing and sound works!), no matter how long you wait. By the way, the Asus has MCP79 nvidia chipset, so HDEF device location is @8, no default @1B. I was wondering if you could add the ability to specify device address (location) and not just say "HDEF not found". I bet you this would come handy for someone at one point ... I'm just curious to try your kext, because with my Commander that properly works on my Dell I can't seem to make this Asus work. It works at cold boot, but not after fugue sleep or actual sleep ..

 

I recall I had similar issues when I had taken your AppleHDA from your Asus and adapted it for my Dell.. I had constant problems with enabling EPAD on speaker node. I then have taken my kext from 10.7 and repatched it to 10.9 and it worked a treat and still does .. flawlessly. Now, this Asus is really and I mean really stubborn.

Link to comment
Share on other sites

Okay, it seems like consecutively sending multiple verbs to the pipe doesn't work on MCP chipset while it works on Intel and you can spam it heavily.

 

On this Asus you can't be reading the latch response from IRR the moment after you have pushed the verb (so I can't monitor EAPD state and IOAudioEngine state at the same time.. but it looks like its not even needed because audio remains working even after a single PIO). You can't send two consecutive verbs to enable speaker and headphone either.. there has to be a descent pause. The situation is actually kind of funny. I can send a single EAPD enable verb for node 0x15 (headphones) and speaker EPAD gets enabled, but I loose jack sense right away... While sending just the verb for node 0x14 doesn't enable speaker.. Go figure, Asus...

 

send for 0x14 0x15 - no sound from speaker after sleep, because can't send two verbs

send for 0x14 - no sound from speaker at boot and working sound from headphones / working sound from speaker and headphones after wake

send for 0x15 - sound from speaker at boot, sound from speaker at wake, no sound from headphones.. 

 

workaround for fugue sleep when codec looses power:

- define 01470c02 in pinconfig to enable EAPD on 0x14 at boot

- update 0x15 at fugue wake using CodecCommander

... after machine is properly put to sleep sound doesn't resume... so its either ACPI bug or the kext is very picky and has to be patched in some weird way ...

Link to comment
Share on other sites

Hey, long time not spoken to you. 

I'm trying to resolve EAPD issues on an Asus 1201N laptop, which has ALC269. It has EAPD on 0x14 (sp) and 0x15 (hp).. but as I have discovered EPAD on 0x15 powers on by itself .. I can just use AppleHDA with no extra verb in pinconfig and it gets enabled. Speakers on 0x14 on the other hand refuse to start regardless of timing and other stuff I have played with. What I have discovered is that querying response from IRR register always return 0 (even when audio is playing and sound works!), no matter how long you wait. By the way, the Asus has MCP79 nvidia chipset, so HDEF device location is @8, no default @1B. I was wondering if you could add the ability to specify device address (location) and not just say "HDEF not found". I bet you this would come handy for someone at one point ... I'm just curious to try your kext, because with my Commander that properly works on my Dell I can't seem to make this Asus work. It works at cold boot, but not after fugue sleep or actual sleep ..

 

I recall I had similar issues when I had taken your AppleHDA from your Asus and adapted it for my Dell.. I had constant problems with enabling EPAD on speaker node. I then have taken my kext from 10.7 and repatched it to 10.9 and it worked a treat and still does .. flawlessly. Now, this Asus is really and I mean really stubborn.

 

I've uploaded new version with a option in plist to choose the HDEF address. 

Link to comment
Share on other sites

No dice...

It seems like 0x15 EAPD is just supplemental and is used to prevent audio from popping too loud (which happens on my Dell where there's no EAPD on speaker node). If you don't send verb for 0x15 the audio in headphones works at wake, but is considerably less loud, compared to loudness level at cold boot. 

 

Investigating the issue of constantly getting status read 0 from IRR when audio is functional has lead me to finding a piece of information that some codecs may use inverted logic, as in, bit mask 00 enables the amp and bit 01 disabled the amp. I've tried inverting the logic on Asus with no success, unfortunately. 

 

There are codecs that use internal pull-down resistor to prevent EAPD from drifting high *by accident*. Some codecs need compliant driver to reset this resistor, but some use additional pull-up resistor, which when codec resets power (power lost -> power restored) pulls EAPD leg on the codec chip high and it can be enabled programmatically. What drives me insane though is that I'm seeing reports from the past that patched IOAudioFamily was working to enable EAPD after sleep in 10.7 ... perhaps I should start there. Or, like I said before, It's the AppleHDA that is improperly patched and does all sorts of random stuff at wake. But I have revised it and found no obvious mistakes, at least from my point of view.

Link to comment
Share on other sites

No dice...

It seems like 0x15 EAPD is just supplemental and is used to prevent audio from popping too loud (which happens on my Dell where there's no EAPD on speaker node). If you don't send verb for 0x15 the audio in headphones works at wake, but is considerably less loud, compared to loudness level at cold boot. 

 

Investigating the issue of constantly getting status read 0 from IRR when audio is functional has lead me to finding a piece of information that some codecs may use inverted logic, as in, bit mask 00 enables the amp and bit 01 disabled the amp. I've tried inverting the logic on Asus with no success, unfortunately. 

 

There are codecs that use internal pull-down resistor to prevent EAPD from drifting high *by accident*. Some codecs need compliant driver to reset this resistor, but some use additional pull-up resistor, which when codec resets power (power lost -> power restored) pulls EAPD leg on the codec chip high and it can be enabled programmatically. What drives me insane though is that I'm seeing reports from the past that patched IOAudioFamily was working to enable EAPD after sleep in 10.7 ... perhaps I should start there. Or, like I said before, It's the AppleHDA that is improperly patched and does all sorts of random stuff at wake. But I have revised it and found no obvious mistakes, at least from my point of view.

 

If patched IOAudioFamily works then standalone kext we use should work too. May be you have something else is wrong like your ACPI, AppleHDA patching etc., Did you try using old versions of AppleHDA/different boot loaders/OSX versions?so you confirm the problem. Let me see your codec dump and ioreg plz for any ideas.

Link to comment
Share on other sites

I was swapping my HDDs today to preserve 10.9 and install 10.7 for testing (I didn't want to use USB because laptop can't wake with USB HDDs) and damaged my touchpad flex cable. Now it doesn't work and keyboard is not being initialized by voodoops2 either (at least keyboard works in windows, sigh). Guess I will need to hook up external peripherals now in order to investigate further ... will keep you posted.

Link to comment
Share on other sites

So, just an update to the story .. fighting through the installers with a broken touchpad and thus semi-dead PS/2 controller I managed to jump away from 10.9 for testing. I have installed 10.8.3 for now (had the MAS .app backed up from back in the day and never updated it to 10.8.5) and CodecCommander properly wakes EAPDs after sleep ... not seeing bezel popping though, but I guess I just need a higher stream delay, since it's an Atom-based laptop ..

 

I will update to see if audio breaks somehow (similar to what happens in 10.9) and report once more.. 

 

P.S. Even though EAPD is active I'm still getting 0 from IRR register getStatus .. so MCP chipset definitely acts different.

Link to comment
Share on other sites

Updated to 10.8.5 and it stopped working, same scenario as in 10.9.x ...

So I immediately recalled the chit-chatting about this we had with @tluck over at InsanelyMac. His T420 has had the same problem happen after 10.8.5 rolled out.

 

The problem is related to an ACPI bug introduced with 10.8.5, it was discovered by RehabMan and a fix is included in his repository for laptop patches. After implementing the fix EAPD now resumes properly .. the IRR register, like I said, still returns 0 instead of 1, even though EAPD is set high ..

Link to comment
Share on other sites

Updated to 10.8.5 and it stopped working, same scenario as in 10.9.x ...

So I immediately recalled the chit-chatting about this we had with @tluck over at InsanelyMac. His T420 has had the same problem happen after 10.8.5 rolled out.

 

The problem is related to an ACPI bug introduced with 10.8.5, it was discovered by RehabMan and a fix is included in his repository for laptop patches. After implementing the fix EAPD now resumes properly .. the IRR register, like I said, still returns 0 instead of 1, even though EAPD is set high ..

 

Can you provide the system log with my kext for the audio playback pause/play for 5 times with 5 sec interval between each? Just wanted to see what my kext doing with this.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...