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.
- 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.