Sherlocks Posted October 14, 2013 Share Posted October 14, 2013 Quoting myself here... Well, I felt like having another kext in the system is pretty pointless, considering I already have a kext that is able to determine power state transitions.. and it just happens to be opensource. So I went ahead and modified it, so no more IOAudioFamily sources are required and no hassle for me after every updated (you don't generally update your PS/2 kexts that often, do you?). The kext is made configurable and can handle both speaker and headphone nodes if they are defined properly. You still need to have the EAPD codec verb in your pinconfig for sound to be enabled upon boot though. My codec only has EAPD on speaker node 0x14 (20) so I can't test headphones alone or headphones plus speakers for EAPD command verb updating. People who are using RehabMan's VoodooPS2Controller can give this a go, I've documented the settings I've added (as well what has been modified from RehabMan's sources) in the readme: https://github.com/Dolnor/VoodooPS2Controller_EAPD_Handler Cheers! - Dolnor a.k.a TimeWalker really thanks how can i download kexts? Link to comment Share on other sites More sharing options...
EMlyDinEsH Posted October 14, 2013 Author Share Posted October 14, 2013 Quoting myself here... Well, I felt like having another kext in the system is pretty pointless, considering I already have a kext that is able to determine power state transitions.. and it just happens to be opensource. So I went ahead and modified it, so no more IOAudioFamily sources are required and no hassle for me after every updated (you don't generally update your PS/2 kexts that often, do you?). The kext is made configurable and can handle both speaker and headphone nodes if they are defined properly. You still need to have the EAPD codec verb in your pinconfig for sound to be enabled upon boot though. My codec only has EAPD on speaker node 0x14 (20) so I can't test headphones alone or headphones plus speakers for EAPD command verb updating. People who are using RehabMan's VoodooPS2Controller can give this a go, I've documented the settings I've added (as well what has been modified from RehabMan's sources) in the readme: https://github.com/Dolnor/VoodooPS2Controller_EAPD_Handler Cheers! - Dolnor a.k.a TimeWalker Great! Thanks for your idea on this and I'll update this on my Elan touchpad as well. Link to comment Share on other sites More sharing options...
Dolnor Posted October 15, 2013 Share Posted October 15, 2013 If it is possible, can you consider making it a separate kext? As an owner of a laptop with an Elan touchpad, I can't use PS2 controller without kext conflicts. I've considered.. it's a debug version for now. This kext is also made configurable ... you need to set make and model for your custom profile. For Chameleon open up your DSDT and look up at the top: "DELL ", "QA09 " Make: DELL Model: QA09 For Clover the kext will display it in IOLog: kernel[0]: CodecCommander::init: DMI Vendor DELL kernel[0]: CodecCommander:init:: DMI Board 0YW3P2 Make: DELL Model: 0YW3P2 Config for my laptop looks as follows: By default EAPD updating will be off (for this test I've set it to YES and 20 for speaker node as it's most common). Node numbers are set in decimal .. so if you have EAPD on node 0x14 you need to specify 20 inside the plist. You should see this in the log upon boot (DMI bits will be there only if using Clover bootloader): kernel[0]: CodecCommander::init: Initializing kernel[0]: CodecCommander::init: DMI Vendor DELL kernel[0]: CodecCommander:init:: DMI Board 0YW3P2 kernel[0]: CodecCommander::probe: Probing kernel[0]: CodecCommander::start: Starting kernel[0]: CodecCommander: power is on This will appear upon sleep: kernel[0]: CodecCommander: power is off And something like this upon wake: kernel[0]: Wake reason: PWRB (User) kernel[0]: 116.938186: performCountryCodeOperation: Not connected, scan in progress[0] kernel[0]: RTC: PowerByCalendarDate setting ignored kernel[0]: No interval found for . Using 8000000 kernel[0]: RTC: PowerByCalendarDate setting ignored kernel[0]: CodecCommander: power is on kernel[0]: Previous Sleep Cause: 5 kernel[0]: USBF: 116.955 AppleUSBEHCI: setPowerState - PCI device still has PMS status bit set. PMCSR is 0x8000 kernel[0]: The USB device HubDevice (Port 1 of Hub at 0x1a000000) may have caused a wake by issuing a remote wakeup (2) kernel[0]: USBF: 116.956 AppleUSBEHCI: setPowerState - PCI device still has PMS status bit set. PMCSR is 0x8000 kernel[0]: The USB device HubDevice (Port 1 of Hub at 0x1d000000) may have caused a wake by issuing a remote wakeup (2) kernel[0]: CodecCommander: sending codec verb command 1470c02 kernel[0]: CodecCommander: command sent Debug version of the kext is attached. CodecCommander.kext.zip 1 Link to comment Share on other sites More sharing options...
smeisner777 Posted October 16, 2013 Share Posted October 16, 2013 I've considered.. it's a debug version for now. Thanks! It works for me with 10.8.5 patched AppleHDA for ALC269VC. Great interim (maybe even permanent) solution. I can't wait for EMlyDinEsH to update the Elan touchpad with it. All I have left to get working is HDMI audio and I'll have this ASUS Q500A ready for an install guide. Link to comment Share on other sites More sharing options...
Dolnor Posted October 16, 2013 Share Posted October 16, 2013 Here's a release version of my kext with debug messages turned off. I've added missing dependency (thanks to slice for pointing that out to me) and now the kext initializes with IOAudioFamily (which wasn't really an option with VoodooPS2 implementation as Keyboard Device needs to be initialized very early in the boot process and it can't wait for IOAudioFamily to start right before DSMOS arrives), so having EAPD codec verb in your pinconfig is no longer a requirement. I should point out that there won't be any console messages coming from the kext. p.s. sources are posted over at git release_CodecCommander.kext.zip 1 Link to comment Share on other sites More sharing options...
EMlyDinEsH Posted October 16, 2013 Author Share Posted October 16, 2013 Here's a release version of my kext with debug messages turned off. I've added missing dependency (thanks to slice for pointing that out to me) and now the kext initializes with IOAudioFamily (which wasn't really an option with VoodooPS2 implementation as Keyboard Device needs to be initialized very early in the boot process and it can't wait for IOAudioFamily to start right before DSMOS arrives), so having EAPD codec verb in your pinconfig is no longer a requirement. I should point out that there won't be any console messages coming from the kext. p.s. sources are posted over at git release_CodecCommander.kext.zip Thanks for your kext and Idea. Me also developed a kext(https://osxlatitude.com/index.php?/topic/3084-eapd-fix-in-a-standalone-kext-no-need-ioaudiofamily-patching/ )similar to yours but its based on IOAudioFamily patch i used and it has a workaround for the issue I've in my ALC269 which is Jack sense and Audio is not working after sleep if there is no Audio stream within 30 sec. So, my workaround sends a mute/un-mute notification which generates a pop sound to start the audio stream. If you have no problem and wish your kext also to be uploaded at the first post then I would like to do it. Link to comment Share on other sites More sharing options...
Dolnor Posted October 16, 2013 Share Posted October 16, 2013 sure, why not Link to comment Share on other sites More sharing options...
Sherlocks Posted October 16, 2013 Share Posted October 16, 2013 Here's a release version of my kext with debug messages turned off. I've added missing dependency (thanks to slice for pointing that out to me) and now the kext initializes with IOAudioFamily (which wasn't really an option with VoodooPS2 implementation as Keyboard Device needs to be initialized very early in the boot process and it can't wait for IOAudioFamily to start right before DSMOS arrives), so having EAPD codec verb in your pinconfig is no longer a requirement. I should point out that there won't be any console messages coming from the kext. p.s. sources are posted over at git release_CodecCommander.kext.zip perfect working really appreciate Link to comment Share on other sites More sharing options...
Dolnor Posted October 16, 2013 Share Posted October 16, 2013 Not so perfect, I've found a requirement as outlined by intel that I wasn't setting: - Offset 68h: Immediate Command Status - 16 bit register Bit 0 - Immediate Command Busy (ICB): This bit is a 0 when the controller can accept an immediate command. Software must wait for this bit to be 0 before writing a value in the ICW register. Bit 1 - Immediate Result Valid (IRV): This bit is set to a 1 by hardware when a new response is latched into the IRR register. Software must clear this bit before issuing a new command by writing a one to it so that the software may determine when a new response has arrived. I wasn't doing the last part in bold and this appears to be the culprit to jack sensing and audio not working after sleep because previously issued command (on boot) hasn't cleared IRV field. So the command that has been issued after wake was stalling the codec, as Intel says "undefined behavior will result". I've changed this and now even after 3 minute delay after waking the machine if there is no audio stream present sound and jack sensing remains functional. commander_debug+release.zip Link to comment Share on other sites More sharing options...
ninggu2008 Posted October 16, 2013 Share Posted October 16, 2013 Not so perfect, I've found a requirement as outlined by intel that I wasn't setting: I wasn't doing the last part in bold and this appears to be the culprit to jack sensing and audio not working after sleep because previously issued command (on boot) hasn't cleared IRV field. So the command that has been issued after wake was stalling the codec, as Intel says "undefined behavior will result". I've changed this and now even after 3 minute delay after waking the machine if there is no audio stream present sound and jack sensing remains functional. commander_debug+release.zip It works in 10.9GM with patched applehda 2.5.2fc2 and original ioaudioFamily 1.9.4fc11. But I got a much larger 'pop' before the sound comes out after sleep. Anyway, thanks very much. Link to comment Share on other sites More sharing options...
Recommended Posts