Problem with usb composite driver while installing audio driver.

Hi All,

I have written my own usb composite driver for a composite device. My Composite device is also having 3 audio interfaces. As to combine audio interfaces IAD has to be there , for IAD device descriptors should have bDeviceClass 0xEF, bDeviceSubClass 0x02, bDeviceProtocol 0x01 resp. As given in this link:
http://msdn.microsoft.com/en-us/library/ff540054(VS.85).aspx

But my device does not have these values in device descriptors. So in my composite i am only combining those interfaces by checking following conditions:

1.All interfaces in the interface collection must be consecutive. In other words, the interfaces must be adjacent to one another in firmware memory.

2.All interfaces in the interface collection must belong to the audio device class. The device manufacturer specifies that an interface belongs to the audio device class by assigning a value of 0x01 to the bInterfaceClass field of the interface descriptor.

3.Each interface in the interface collection must have a different subclass from the first interface in the collection.The bInterfaceSubClass field of the interface descriptor specifies the device subclass of the interface

ref:
http://msdn.microsoft.com/en-us/library/ff537105(v=VS.85).aspx

After combining these interfaces ,i am enumerating it as one pdo. But when i try to install audio driver over it usbaudio.sys , its giving code 10 in device manger.

Please let me know if any one is having idea about it.

Have you traced the pnp and internal ioctls, esp submit urb, sent to the pdo and logged which ones you completed successfully and with failure?

d

dent from a phpne with no keynoard

-----Original Message-----
From: xxxxx@gmail.com
Sent: September 08, 2010 7:02 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Problem with usb composite driver while installing audio driver.

Hi All,

I have written my own usb composite driver for a composite device. My Composite device is also having 3 audio interfaces. As to combine audio interfaces IAD has to be there , for IAD device descriptors should have bDeviceClass 0xEF, bDeviceSubClass 0x02, bDeviceProtocol 0x01 resp. As given in this link:
http://msdn.microsoft.com/en-us/library/ff540054(VS.85).aspx

But my device does not have these values in device descriptors. So in my composite i am only combining those interfaces by checking following conditions:

1.All interfaces in the interface collection must be consecutive. In other words, the interfaces must be adjacent to one another in firmware memory.

2.All interfaces in the interface collection must belong to the audio device class. The device manufacturer specifies that an interface belongs to the audio device class by assigning a value of 0x01 to the bInterfaceClass field of the interface descriptor.

3.Each interface in the interface collection must have a different subclass from the first interface in the collection.The bInterfaceSubClass field of the interface descriptor specifies the device subclass of the interface

ref:
http://msdn.microsoft.com/en-us/library/ff537105(v=VS.85).aspx

After combining these interfaces ,i am enumerating it as one pdo. But when i try to install audio driver over it usbaudio.sys , its giving code 10 in device manger.

Please let me know if any one is having idea about it.


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

Hi Doron,

Is it the right way of combining audio interfaces , which i am doing.?

I am receiving Get device Desc , Get Config Desc and Select Config URBs from audio pdo in my composite device, which i am completing successfully with required info.
After i am receiving NULL config Desc in Select Config URB. And code 10 is coming.

Amit

Amit Samel wrote:

Is it the right way of combining audio interfaces , which
i am doing.?

I don’t really understand what you have or what you’re trying to do, based on your original post. First you say that you have a composite device, but then you say you group all the interfaces together into one PDO. Which one is it? I think you need to post the descriptors for your device, along with the way you want them grouped.

Ultimately, how you group the interfaces is your decision, but realize that usbaudio.sys will probably fail to load if it does not “see” what it wants when it asks for your PDO, which is probably what is happening here.

xxxxx@gmail.com wrote:

I have written my own usb composite driver for a composite device.

Why?

My Composite device is also having 3 audio interfaces. As to combine audio interfaces IAD has to be there , for IAD device descriptors should have bDeviceClass 0xEF, bDeviceSubClass 0x02, bDeviceProtocol 0x01 resp. As given in this link:
http://msdn.microsoft.com/en-us/library/ff540054(VS.85).aspx

But my device does not have these values in device descriptors.

The standard composite driver will happily handle audio devices without
an IAD. The IAD concept was invented long after Audio Class. As long
as you have an Audio Control interface with a number of Audio Streaming
interface, usbccgp.sys will correctly gather them all together and hand
them to usbaudio.sys. Just have your INF file match the Audio Control
interface (that is, VID_xxxx&PID_xxxx&MI_00).

So in my composite i am only combining those interfaces by checking following conditions:

1.All interfaces in the interface collection must be consecutive. In other words, the interfaces must be adjacent to one another in firmware memory.

2.All interfaces in the interface collection must belong to the audio device class. The device manufacturer specifies that an interface belongs to the audio device class by assigning a value of 0x01 to the bInterfaceClass field of the interface descriptor.

3.Each interface in the interface collection must have a different subclass from the first interface in the collection.The bInterfaceSubClass field of the interface descriptor specifies the device subclass of the interface

After combining these interfaces ,i am enumerating it as one pdo. But when i try to install audio driver over it usbaudio.sys , its giving code 10 in device manger.

How are you doing the enumeration? How are you creating the device ID?
Are you rewriting the configuration descriptors so that usbaudio.sys
ONLY sees the audio descriptors?


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

Hi Tim,

Why?

I have written my own composite as we require to combine few interfaces which usbccgp.sys does not do in xp.

How are you doing the enumeration? How are you creating the device ID?
Are you rewriting the configuration descriptors so that usbaudio.sys
?ONLY sees the audio descriptors?

After combining required interfaces i am creating config desc respective to that PDO. Means child pdo will get expossed to only its interfaces not other.

When i receive get config desc in composite i send that pdo specific config desc, which i have created for each pdo. So USBaudio…sys will get only audio descriptors.

I could able to install other drivers e.g. modem, device management,over their respective pdos.

Amit

Amit Samel wrote:

After combining these interfaces ,i am enumerating it as one
pdo. But when i try to install audio driver over it usbaudio.sys
, its giving code 10 in device manger.

Have you considered finding the checked build of usbaudio.sys and seeing if it throws any trace output when it fails to start? (Note that you may need to change the logging mask via an exported symbol via WinDBG.)