Message: 1
Date: Sun, 11 Oct 2009 12:15:25 -0700
From: Jeff Moore <
email@hidden>
Subject: Re: Recommended way to handle suspend/resume on notebooks
To: CoreAudio API <
email@hidden>
Message-ID: <
email@hidden">
email@hidden>
Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes
The HAL doesn't do anything special to handle sleep/wake. It just
happens. The HAL treats it just like any other large discrepancy in
time. Generally, the HAL notices it when it does the first overload
check after waking up. Ultimately, it depends on what was going on
when sleep happened as to when the HAL will first notice the
discontinuity. The result is that the HAL re-synchs the IO thread's
time line with the hardware's time stamps.
For a piece of hardware, sleep generally means that things like DMAs
are turned off and what not. So while the HAL is sorting out it's own
issues, the driver is also contending with restarting itself. In
practical terms, this usually means that the driver's time stamps will
either re-start back at 0 or have some other large discontinuity in
both the sample and host time.
At any rate, I would expect that the result of all this re-synching
might result in a few overloads in a row (two or three seem likely for
a lot of cases where the interruption might happen). But I would not
expect that there would be an endless stream of them followed by the
hardware stopping.
A couple of questions come to mind:
- What hardware/OS are you using?