USBCCGP Not loading for composite audio device

Hi,

I am using virtual bus driver for enumerating devices on win 7. For non composite devices it works fine, but when i connect usb audio device(composite device), its crashing. I realized that usbccgp.sys is not loading, where as i am returning "composite id " from IRP_MN_QUERY_ID field .

hardware string is " U.S.B..C.l.a.s.s..0.1.&.S.u.b.C.l.a.s.s..0.1.&.P.r.o.t..0.0…U.S.B.
.C.l.a.s.s.
.0.1.&.S.u.b.C.l.a.s.s..0.1…U.S.B..C.l.a.s.s..0.1…U.S.B..C.O.M.P.O.S.I.T.E"

USBaudio.sys driver is directly loading. where as i have seen that in case of composite usbccgp loads first then it loads usbaudio.sys driver.

My Stack goes like that (Bus driver gets following calls)

…Initial calls –> virtual bus driver handles
IRP_MN_Query_Id call –> multiple times for h/w id, compaible id –> Virtual bus driver sending strings
IRP_MN_Query_Id call –> for container id –>Virtual bus driver returning as unsupported
IRP_MN_Query_Resource_Requirement –> virtual bus driver handles
IRP_MN_Query_Bus _Info –> virtual bus driver handles
IRP_MN_Query_Resource –> virtual bus driver handles

now PNP call comes with Minor code 0x19(undocumented) –> dnt know what to return here so just completing Request.

Now usbaudio.sys drivers get loaded…(expecting usbccgp.sys)

Pls tell me if i am missing anything and how to support composite audio device.

Thank you

Are the hw and compat ids you are reporting exactly the same and in the same order that the physical usbhub driver does?

d

debt from my phone


From: xxxxx@gmail.com
Sent: 5/30/2012 7:50 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] USBCCGP Not loading for composite audio device

Hi,

I am using virtual bus driver for enumerating devices on win 7. For non composite devices it works fine, but when i connect usb audio device(composite device), its crashing. I realized that usbccgp.sys is not loading, where as i am returning "composite id " from IRP_MN_QUERY_ID field .

hardware string is " U.S.B..C.l.a.s.s..0.1.&.S.u.b.C.l.a.s.s..0.1.&.P.r.o.t..0.0…U.S.B.
.C.l.a.s.s.
.0.1.&.S.u.b.C.l.a.s.s..0.1…U.S.B..C.l.a.s.s..0.1…U.S.B..C.O.M.P.O.S.I.T.E"

USBaudio.sys driver is directly loading. where as i have seen that in case of composite usbccgp loads first then it loads usbaudio.sys driver.

My Stack goes like that (Bus driver gets following calls)

…Initial calls –> virtual bus driver handles
IRP_MN_Query_Id call –> multiple times for h/w id, compaible id –> Virtual bus driver sending strings
IRP_MN_Query_Id call –> for container id –>Virtual bus driver returning as unsupported
IRP_MN_Query_Resource_Requirement –> virtual bus driver handles
IRP_MN_Query_Bus _Info –> virtual bus driver handles
IRP_MN_Query_Resource –> virtual bus driver handles

now PNP call comes with Minor code 0x19(undocumented) –> dnt know what to return here so just completing Request.

Now usbaudio.sys drivers get loaded…(expecting usbccgp.sys)

Pls tell me if i am missing anything and how to support composite audio device.

Thank you


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thank You for ur quick reply Doron.

How can i check that what usbhub.sys is returning…(any way of putting filter over that.)i read that usbhub.sys works as a bus driver. i put breakpoint also on pnp call of usbhub.sys but i am getting hundreds of calls continously so its difficult to track.

is there any way to track(via filter or any tool) native usb bus driver calls??

No need to this in a driver. Plug in the device and then open the properties of the composite device in device manager on which usbccgp loads (view by connection). On the properties page, look at the details tab, it will have the hw and compat ids

d

debt from my phone


From: xxxxx@gmail.com
Sent: 5/30/2012 8:06 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] USBCCGP Not loading for composite audio device

Thank You for ur quick reply Doron.

How can i check that what usbhub.sys is returning…(any way of putting filter over that.)i read that usbhub.sys works as a bus driver. i put breakpoint also on pnp call of usbhub.sys but i am getting hundreds of calls continously so its difficult to track.

is there any way to track(via filter or any tool) native usb bus driver calls??


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

xxxxx@gmail.com wrote:

I am using virtual bus driver for enumerating devices on win 7. For non composite devices it works fine, but when i connect usb audio device(composite device), its crashing. I realized that usbccgp.sys is not loading, where as i am returning "composite id " from IRP_MN_QUERY_ID field .

hardware string is " U.S.B..C.l.a.s.s..0.1.&.S.u.b.C.l.a.s.s..0.1.&.P.r.o.t..0.0…U.S.B.
.C.l.a.s.s.
.0.1.&.S.u.b.C.l.a.s.s..0.1…U.S.B..C.l.a.s.s..0.1…U.S.B..C.O.M.P.O.S.I.T.E"

USBaudio.sys driver is directly loading. where as i have seen that in case of composite usbccgp loads first then it loads usbaudio.sys driver.

This depends in part on your operating system version. In USB audio and
video class, multiple interfaces are “associated” together and treated
as one device. In the normal usbccgp case, each interface is doled out
to one driver. In the audio and video cases, multiple interfaces are
assigned to a single driver. If there are no interfaces other audio
control and audio streaming, then there is nothing for usbccgp to do.

Doron’s advice is good, as always. Check the device ID lists in Device
Manager and make sure the list exactly matches yours.

My Stack goes like that (Bus driver gets following calls)

now PNP call comes with Minor code 0x19(undocumented) –> dnt know what to return here so just completing Request.

It certainly is documented. Where did you look?
#define IRP_MN_DEVICE_ENUMERATED 0x19

Now usbaudio.sys drivers get loaded…(expecting usbccgp.sys)

Not necessarily.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thank you Tim for ur reply.

I am using my virtual bus driver for usb over ip. When i connect USB audio device physically in windows then
usbccgp loads first then usbaudio.sys, However when usb is connected to client side then i am not able to load usbccgp.sys . So in my case i believe usbccgp should load (it should behave like usb device connected locally)

I checked h/w string and compatible strings in device manager–> rightclick on audio driver –>details tab.

when i connect usb composite device physically then strings in compatible device are
“USB\Class_01&SubClass_01&Prot_00
USB\Class_01&SubClass_01
USB\Class_01”

It doesnt show “USB/COMPOSITE” string.

when i enumerate device thru my virtual driver i do get “USB/COMPOSITE” string

is this behaviour correct??

  1. As per windows document “After retrieving the hardware and compatible IDs for the new PDO, the operating system searches the INF files. If one of the INF files contains a match for the device ID, Windows loads the driver that is indicated by that INF file and the generic parent driver does not come into play. If no INF file contains the device ID, and the PDO has a compatible ID, Windows searches for the compatible ID. This produces a match in Usb.inf and causes the operating system to load the USB Generic Parent Driver (Usbccgp.sys).”

if device id matches then windows will not load usbccgp.sys…is device id and hardware id are different for composite devices??

What hardware or compatible id match was made to load usbccgp? That is also a property on the details page

d

debt from my phone


From: xxxxx@gmail.com
Sent: 6/1/2012 8:07 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] USBCCGP Not loading for composite audio device

Thank you Tim for ur reply.

I am using my virtual bus driver for usb over ip. When i connect USB audio device physically in windows then
usbccgp loads first then usbaudio.sys, However when usb is connected to client side then i am not able to load usbccgp.sys . So in my case i believe usbccgp should load (it should behave like usb device connected locally)

I checked h/w string and compatible strings in device manager–> rightclick on audio driver –>details tab.

when i connect usb composite device physically then strings in compatible device are
“USB\Class_01&SubClass_01&Prot_00
USB\Class_01&SubClass_01
USB\Class_01”

It doesnt show “USB/COMPOSITE” string.

when i enumerate device thru my virtual driver i do get “USB/COMPOSITE” string

is this behaviour correct??

  1. As per windows document “After retrieving the hardware and compatible IDs for the new PDO, the operating system searches the INF files. If one of the INF files contains a match for the device ID, Windows loads the driver that is indicated by that INF file and the generic parent driver does not come into play. If no INF file contains the device ID, and the PDO has a compatible ID, Windows searches for the compatible ID. This produces a match in Usb.inf and causes the operating system to load the USB Generic Parent Driver (Usbccgp.sys).”

if device id matches then windows will not load usbccgp.sys…is device id and hardware id are different for composite devices??


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

xxxxx@gmail.com wrote:

I am using my virtual bus driver for usb over ip. When i connect USB audio device physically in windows then usbccgp loads first then usbaudio.sys, However when usb is connected to client side then i am not able to load usbccgp.sys . So in my case i believe usbccgp should load (it should behave like usb device connected locally)

I checked h/w string and compatible strings in device manager–> rightclick on audio driver –>details tab.

when i connect usb composite device physically then strings in compatible device are
“USB\Class_01&SubClass_01&Prot_00
USB\Class_01&SubClass_01
USB\Class_01”

It doesnt show “USB/COMPOSITE” string.
when i enumerate device thru my virtual driver i do get “USB/COMPOSITE” string
is this behaviour correct??

I believe this is actually special-case code in the USB hub driver. If
there is a group of associated interfaces (which means either an audio
class control interface plus its associated streaming interfaces, or a
video class control interface plus its associated streaming interfaces,
or a group of interfaces wrapped with an IAD), then the hub driver
treats them as a single interface. If doing that means the device now
has only one interface, then it’s no longer a composite device and it
won’t expose USB/COMPOSITE.

So, say the descriptors show this:

IF 0 = Audio Control
IF 1 = Audio Streaming (associated with AC 0)
IF 2 = Audio Streaming (associated with AC 0)

In that case, the hub driver will expose interface 0 as a single
interface device, not a composite device.

To put it another way, Audio Streaming and Video Streaming interfaces do
not count as interfaces when you are trying to decide whether a given
device is composite or not.

  1. As per windows document “After retrieving the hardware and compatible IDs for the new PDO, the operating system searches the INF files. If one of the INF files contains a match for the device ID, Windows loads the driver that is indicated by that INF file and the generic parent driver does not come into play. If no INF file contains the device ID, and the PDO has a compatible ID, Windows searches for the compatible ID. This produces a match in Usb.inf and causes the operating system to load the USB Generic Parent Driver (Usbccgp.sys).”

if device id matches then windows will not load usbccgp.sys…is device id and hardware id are different for composite devices??

Well, sort of. Here are a couple of examples. Say that I have a device
with VID=1234 and PID=5678. Say that it has three interfaces that are
not audio or video. The USB hub driver will expose two IDs (plus the
class ID, whatever that was):
USB\VID_1234&PID_5678
USB\COMPOSITE

If there is no match on the specific one, then usbccgp.sys will match
the generic one. It will then create:
USB\VID_1234&PID_5678&MI_00
USB\VID_1234&PID_5678&MI_01
USB\VID_1234&PID_5678&MI_02

which will go search for interface-specific IDs.

In the case of the device I showed above, the hub driver should instead
create
USB\VID_1234&PID_5678
USB\CLASS_01&SUBCLASS_xx

Here, there is no composite ID, so the system will find a match for
USB\CLASS_01 in the USB audio INF. Usbaudio.sys knows that, when it is
assigned ownership of interface 0, that it also has ownership of any
streaming interfaces that belong to that control interface.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.