Author Topic: Distorted audio after sleep on Snow Leopard - need developer help  (Read 2701 times)

0 Members and 1 Guest are viewing this topic.


  • Entrant
  • Posts: 1
Distorted audio after sleep on Snow Leopard - need developer help
« on: September 24, 2009, 11:38:52 AM »

I know there is another bug report about distorted audio under Leopard and a workaround exists that involves unloading and re-loading the driver but that hack does not seem to work under Snow Leopard.

So I had a look at the original FreeBSD hdac code (on which voodooHDA is based). Part of the resume process in the FreeBSD code is to re-start the audio channels - something the voodooHDA driver does not do. Someone has ported the necessary code into voodooHDA but it is never called. So I tried it by making the call in the resume() function in voodooHDAdevice.cpp (shown below). Unfortunately this causes the machine to hang on resume.  Since I am not set-up for remote debugging and walking through the code did not highlight anything - does someone with a debugger want to see if this really is the problem?

bool VoodooHDADevice::resume()

.......... snip .........

//      VoodooHDAEngine *engine;

        for (int i = 0; i < mNumChannels; i++) {
                if (!(mChannels.flags & HDAC_CHN_SUSPEND)) {
                        errorMsg("warning: found non-suspended channel during resume action\n");

                mChannels.flags &= ~HDAC_CHN_SUSPEND;
               channelStart(&mChannels, false);
//              engine = lookupEngine(i);
//              if (engine) {
//                      engine->resumeAudioEngine();
//                      engine->takeTimeStamp(false);
//              }


        logMsg("Resume done.\n");

        return true;