[wdmaudiodev] Re: WaveRT MiniportDriver receiving IRP_MJ_CREATE in D3

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 22 Jul 2014 10:06:46 -0700

Surabhi Ghaisas wrote:
> In WaveRT miniport driver I am exposing one device interface for use
> by custom application by means of IoRegisterDeviceInterface. I want to
> handle the IRPs that come for this interface in miniport driver
> itself. For the same I have registered my own handlers for
> What I am observing is when there is no activity for my device my
> driver enters D3 state as expected. After which when I launch my
> custom application I receive calls to IRP_MJ_CREATE and then
> IRP_MJ_DEVICE_CONTROL for registered interface as expected but all
> this time  driver state remains D3. I do not get a call to change
> driver state to D0 before receiving these IRP calls. Is this expected
> behaviour?

Yes.  It is up to the driver to decide when the device has to power up. 
For KS requests, the port driver has that knowledge.  When you bypass
the port driver, you have to do it.

By the way, you have opened a real can of worms here.  There are a large
number of players involved (KS, Port class, Miniport, Bus), and each one
of them thinks they own a piece of the power management pie.

I'm a little surprised your device goes into D3.  I didn't know the
WaveRT port driver would do that.

> Should miniport driver make call to PoSetPowerState for IRPs that are
> not passed on portclass?

Do your IRPs require the device to be in D0?  If so, then you need to
send an IRP_MJ_POWER with IRP_MN_SET_POWER.  One of the existing drivers
will call PoSetPowerState.  I don't have any clue whether this will
actually work.  The port driver thinks it is managing the power policy.

Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.


WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx


Other related posts: