[wdmaudiodev] Re: Msvad stalling after resume from sleep

  • From: ambrish dantrey <a4ambrish@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx, davidx.m.jolly@xxxxxxxxx
  • Date: Fri, 29 Mar 2013 00:12:54 +0530

You may want to consider implementing IPowerNotify for your miniport driver:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff536949%28v=vs.85%29.aspx

This way you wouldn't have to rely on application to PAUSE the stream
before going to sleep. You can do this in driver itself.

~Ambrish

On Thu, Mar 28, 2013 at 9:26 PM, Jolly, DavidX M
<davidx.m.jolly@xxxxxxxxx>wrote:

>  Hi,****
>
> ** **
>
> I have implemented a virtual audio driver, based on the MSVAD simple
> example in the SDK.****
>
> ** **
>
> Everything seems to be working well, unless I go into a sleep state while
> streaming audio in any player other than WMP. In this case, when the
> computer resumes from sleep, the audio panel volume control will be frozen,
> and the entire driver appears to be stalled. The computer has to be
> restarted in order to fix this problem.****
>
> ** **
>
> After looking into the problem more, I’m seeing that the computer is going
> to sleep without first placing the stream into a pause or stop state. This
> causes the stream to resume from sleep in a running state. The reason WMP
> doesn’t cause this issue is because it proactively pauses and stops the
> stream. Furthermore, in this bad state, the computer does attempt to pause
> the stream immediately after we wake up. For example, a good sleep
> transition will look like this: RUNNING -> PAUSE -> [SLEEP/WAKE] -> PAUSE
> -> RUNNING; while a bad sleep will look like this: RUNNING -> [SLEEP/WAKE]
> -> RUNNING -> PAUSE (from before the sleep) -> FROZEN.****
>
> ** **
>
> It seems like either the portcls or the miniport are preventing the OS
> from setting the proper stream state. I’ve tried everything I can think of
> to resolve this issue, with no luck. If anyone could lend me some advice,
> I’d greatly appreciate it.****
>
> ** **
>
> ** **
>
> Thanks,****
>
> ** **
>
> David****
>

Other related posts: