cancel
Showing results for 
Search instead for 
Did you mean: 

USB audio device descriptor with different audio channels configurations (wChannelConfig values)

EvgenS Po
Associate II

Hello! I'm making an USB sound card and I need that it would have several audio channels configurations like at picture below.

0690X0000098OymQAE.png My thoughts about USB device topology:

IT (1) - --------------- | --- SelectorUnit - FeatureUint - OT

IT (2) - MixerUnit - |

As a test I made USB descriptor for IT1 with 4 channels and IT2 with 2 channels. In device manager new device appears under sound devices with exclamation mark. But USB descriptor dump unility does not detect any errors in descriptor.

Do I understand correct that to have multiple audio channels configurations one needs to realize USB device topology with several Input Terminals and Selector Unit?

Please, could someone point out mistake in descriptor (attached)?

2 REPLIES 2

USB hosts are picky about the topology described in audio-class USB devices. No wonder - they have to map it into their internal representation of sound device, which is usually very different from the USB Audio Class notion of topology; and they all do it in a different way. Any unusual topology usually gets either rejected or behaves unexpectedly. It's best to stick to topologies described in the Basic Audio Devices document https://www.usb.org/sites/default/files/BasicAudioDevice-10.zip or topologies from existing soundcards, and then carefully derive from that.

Don't forget, that you need to implement also the requests associated with the units you add to your topology. An USB bus analyzer is usually of much help here.

JW

EvgenS Po
Associate II

Thanks for reply, waclawek.jan . I have read documents you refferenced before trying to make descriptor (and several times while making), but have not found out it is possible to use multiple IT of audio streaming type and multiple corresponding OT of type speaker or it is not possible and how to have multiple audio channel configurations. If I change type of one IT to other than audio streaming, for example to Microphone and make necessary modifications to OT and endpoint, the device is recognized by OS as expected: one speaker and one microphone, and device works fine. If one IT type is SPDIF, then also everything is alright. OS does not recognize the device correctly only if both ITs are of type audio streaming and OTs are speakers. I didn't manage to find any information about such a case: is it actually real to have multiple OTs of speaker type to provide for user possibility of selecting audio channel configuration?

I tired using descriptor from existing soundcard but everything I got was blue screen and system crash sourced from USB.sys.

But thanks a lot anyway.