[wdmaudiodev] Re: Interfacing Audio Driver From USER MODE

  • From: swapnil kamble <swap.kamble@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Tue, 3 Feb 2009 10:53:23 +0530

Hi Karthik,
                Have you changed GUID and device id from MSVAD ( Simple )? I
think that MSVAD GUID and Bluetooth software's virtual driver could also be
based on MSVAD, having same GUID, and they might have changed name of device
but not its GUID. Here in this case you also haven't changed GUID, so
updated device name associated with GUID is getting reflected on MSVAD too.
This could be the reason of change of device name. So try changing GUID from
MSVAD inf and device id.

 Hope this solves your problem.


On Tue, Feb 3, 2009 at 10:34 AM, <karthiksharmasg@xxxxxxx> wrote:

> Hi all
>       I am not sure that this issue will fit as an Audio driver problem or
> an yet another bug in XP.
>
>    1. I installed MSVAD(simple) (Original code)
>    2. In control panel the msvad (simple) shows as normal,
>     3. Now i installed an bluetooth dongle software (any one of WIDDCOM ,
> BLUESOIL etc) since these will also contain Virtual audio drivers, the
> problem will arise now.
>     4. In Control panel the name of MSVAD(Simple) will be renamed to some
> other name in my case it is (BT AUDIO)
>
>  If it is bug in windows XP i am not going to be in problem,
> But the real worry is i a have developed an virtual audio driver based on
> MSVAD, and if that will cause any problem due to this i ll be in big
> trouble.
>
> Regards,
> karthik SG
>
>
> -----Original Message-----
> From: Tim Roberts <timr@xxxxxxxxx>
> To: wdmaudiodev@xxxxxxxxxxxxx
> Sent: Tue, 3 Feb 2009 12:28 am
> Subject: [wdmaudiodev] Re: Interfacing Audio Driver From USER MODE
>
>
>
> Vipin Kumar wrote:
>
>> thanks tim,
>>
>>   But Mr. Mathew told me
>>                if you want to handle IRP_MJ_DEVICE_CONTROL,  you will
>> have to handle the MJ_CREATE & MJ_CLOSE.
>>
>
> I *believe* he said that before we all knew that you were working with a
> port-class driver.
>
>
>  i just want some data to be passed from user mode to the audio driver,
>> and i really don't want to make a mess out of the driver by putting
>> highly complicated code.
>>
>
> Audio drivers are complicated.  There's just no way around it.
>
>
>  i have registered my driver, using ioregisterinterface and  then
>>
>> IoSetDeviceInterfaceState(&InstanceString,TRUE);
>>
>> I use   SetupDiEnumDeviceInterfaces,
>> SetupDiGetDeviceInterfaceDetail         to get my instance in user
>>
> mode.
>
>>
>> but createfile returns me Filenotfound err code 2.
>>
>
> Right.  This is probably because the port class driver is already
> defining and maintaining its own device interfaces, using the kernel
> streaming standards.  Device interfaces are just aliases; when you open
> that driver, the request goes to the same set of dispatch handlers that
> port class defines for regular audio device use.  The file name in your
> open request is, apparently, not in the format that port class wants.
>
>
>
>>
>> now let me try your approach, Kernel streaming one
>>
>> Now, i have opened up msvad simple, and i would like receive some
>> data( 2KB)  from the user mode,
>> So my questions are,
>>      (i) Any samples available to transfer data from usermode to
>> kernel mode.please point me
>>
>
> MSVAD already has a large number of property handlers, as do all of the
> AVStream samples in the DDK.  Further, the DDK documentation on defining
> and handling properties is pretty good.
>
>
>       (ii)  Do i have to define a new KSPROPERTY
>>
>
> Yes.  You should create a new KSPROPERTYSET for your custom properties,
> then add individual KSPROPERTY definitions as you need additional
> interfaces.
>
>
>      (iii) How to do the user mode part  , what should be done from
>> user mode to send the calls?
>>
>
> I believe I have already said this at least twice in this thread.
> Instead of using SetupDi, you will use the "system device enumerator"
> (CLSID_SystemDeviceEnum and ICreateDevEnum) to enumerate through the
> list of audio devices and find your own.  When you find it, you will use
> IMoniker::BindToObject to get an IBaseFilter that represents your
> driver.  There are lots of samples on the web (and in the DirectShow
> SDK) that describe this process.  It's the same process you use to find
> a video camera in a capture application.
>
> One you have an IBaseFilter, you just fetch an IKsControl interface from
> it:
>   CComQIPtr<IKsControl> pKsControl( myFilter );
>
> Then, you just use pKsControl->KsProperty to send the property requests,
> exactly like calling DeviceIoControl with a file handle.
>
> --
> 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
>
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.com/
>
>
> ******************
>
> 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
>
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.com/
>
>


-- 
...Swapnil

|| Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
|| Hare Rama    Hare Rama   Rama   Rama    Hare Hare ||

Other related posts: