• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Managing Power for PCI Audio Device Driver
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Managing Power for PCI Audio Device Driver


  • Subject: Re: Managing Power for PCI Audio Device Driver
  • From: Mark Cookson <email@hidden>
  • Date: Mon, 30 Sep 2002 15:12:03 -0700

On Thursday, September 26, 2002, at 09:40 AM, Dirk Musfeldt wrote:

I'm having trouble to get the power management right for my driver.

It works well if I do my own setPowerState() but then the Mac won't wake up
after going to sleep, possibly due to a kernel panic which I can't observe
because the screen is still powered down.

If I leave everything to the system software like in PhantomAudioDriver I
get a kernel panic when I do kextload, apparently from
IOAudioDevice::setPowerState().

Any ideas?
Is there any sample code for this matter?
What do I have to watch for when powering down a PCI audio device?

AppleOnboardAudio implements setPowerState(), as does the AppleUSBTrinityAudioDevice object in AppleUSBAudio.

You should definitely not panic when this call is made into your driver. When you don't implement this function at all you panic when loading? What kind of power management features does your device have? Will it cause your driver to panic if the hardware is off and you try to read/write it? If you don't implement setPowerState(), then it is assumed that your device is always on.

With respect to powering down a PCI card, all you have to do is implement the needed calls in setPowerState() so that your card turns off when told to go to sleep and turns back on when told to wake. If these functions take a while (analog parts settling, etc.), then you will want to do that work on a separate thread so that you don't stall the power manager when the system wakes from sleep. If you stall on that thread, then all waking of devices stalls until you return. It's acceptable to stall for a few microseconds, but not for a millisecond or more.

--
Mark Cookson
Engineering Droid
Apple Computer, Inc.
Core Audio CPU Software
6 Infinite Loop MS 306-2CW
Cupertino, CA 95014
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Managing Power for PCI Audio Device Driver
      • From: Michel <email@hidden>
References: 
 >Managing Power for PCI Audio Device Driver (From: Dirk Musfeldt <email@hidden>)

  • Prev by Date: Re: Synchronization problem in 10.2
  • Next by Date: Re: Managing Power for PCI Audio Device Driver
  • Previous by thread: Managing Power for PCI Audio Device Driver
  • Next by thread: Re: Managing Power for PCI Audio Device Driver
  • Index(es):
    • Date
    • Thread