[wdmaudiodev] Re: Interfacing Audio Driver From USER MODE

  • From: Vipin Kumar <vipin@xxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Mon, 2 Feb 2009 09:51:19 +0530

    thanks tim.

   i wrote a few drivers for file system filter(before minifilter was given
say year 2002), so i would prefer IOCTL method than KS Property.After almost
6 yrs, i am writing once again a driver( audio)

This is my first audio driver so i am confused.

yes, i am adding IOCTL after PcInitializeAdapter.

Since, right now i am not handling MJ_CREATE correctly, i am just dbgprint
fileobject to look at irp_INFO, for some calls it's NULL,

I am still not able to open it using createfile( though i get an MJ_CREATE
but file object is NULL)

So what to do ??  a  code sample demonstrating MJ_CREATE & MJ_CLOSE handling
would be a great help for newbies (like me).

Thanks for your precious time.


On Mon, Feb 2, 2009 at 7:22 AM, <timr@xxxxxxxxx> wrote:

> On Sat, Jan 31, 2009 at 06:18:35PM -0800, Vipin Kumar wrote:
> >
> > i am using a  MSVAD Simple as a base,( so portcls wavecyclic is the
> > type).
> >
> > Moreover, as i have told earlier, i have already done
> >    DriverObject->MajorFunction [IRP_MJ_DEVICE_CONTROL] =
> > IoCtlHandler;
> >
> > for IRP_ MJ_CREATE,
> How did you do that?  The DriverEntry for MSVAD, like all port class
> devices, calls PcInitializeAdapter.  THAT routine sets up all of the
> dispatch entry points for you.  Port class is ALREADY handling
> You can't just override it, because you'll lost the class driver support.
> This is a kernel streaming driver.  The KS framework is already opening
> and closing your driver, and sending you specially formatted ioctls to
> handle the KS interfaces.  You need to work within that framework.
> The RIGHT way to do this is to add another custom property to handle
> your unique needs.  Then, your application can use CLSID_SystemDeviceEnum
> to find your driver and get the IBaseFilter interface.  From there, you can
> fetch an IKsControl interface, and send property requests to your heart's
> content.
> Before I get a possible/impossible reply, I will state that it is possible
> for you to intercept IRP_MJ_DEVICE_CONTROL requests on your own, after
> port class has done its setup.  You have to save the original
> IRP_MJ_DEVICE_CONTROL handler, so you can forward to it any requests that
> you don't recognize.  You still have the problem of how to open the device,
> given the KS framework.  Overall, I have to think it would be better for
> you to do this through properties.
> --
> Tim Roberts, timr@xxxxxxxxx
> Providenza & Boeklheide, 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
> http://www.wdmaudiodev.com/

Other related posts: