Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fix sleep/wake.
Browse files Browse the repository at this point in the history
Only tested on 64-bit 10.7.1 with a Phase 22 card.
  • Loading branch information
fredemmott committed Aug 26, 2011
1 parent 6b9f2be commit 88153ef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions AudioDevice.cpp
Expand Up @@ -431,17 +431,19 @@ IOReturn Envy24HTAudioDevice::performPowerStateChange(IOAudioDevicePowerState ol
IOAudioDevicePowerState newPowerState,
UInt32 *microsecondsUntilComplete)
{
//IOLog("Envy24HTAudioDevice::performPowerStateChange!, old = %d, new = %d\n", oldPowerState, newPowerState);
IOLog("Envy24HTAudioDevice::performPowerStateChange!, old = %d, new = %d\n", oldPowerState, newPowerState);

if (newPowerState == kIOAudioDeviceSleep) // go to sleep, power down and save settings
{
IOLog("Envy24HTAudioDevice::performPowerStateChange -> entering sleep\n");
}
deactivateAllAudioEngines();
}
else if (newPowerState != kIOAudioDeviceSleep &&
oldPowerState == kIOAudioDeviceSleep) // wake from sleep, power up and restore settings
{
IOLog("Envy24HTAudioDevice::performPowerStateChange -> waking up!\n");
card_init(card);
card_init(card);
createAudioEngine();
}

return kIOReturnSuccess;
Expand Down

0 comments on commit 88153ef

Please sign in to comment.