Author Topic: determining headset topology programatically  (Read 10573 times)

rebar

  • Member
  • ***
  • Posts: 17
determining headset topology programatically
« on: April 08, 2013, 07:16:02 pm »
I’m working on a test program, that among other things tests to see if a headset correctly follows one of the topologies listed in section 7 of the “USB Audio Device Class Specification for Basic Audio Devices”, e.g., HS1, HS2, etc.

I know how to read the configuration descriptor to do this manually, but I’m not sure about programming a test to do this. Can I assume that all of the terminal IDs, UIDs, SIDs, etc. that make up the configuration to determine if the criteria is met for the above topologies are contained in interface 0? I don’t see where this is stated, but it appears to be the case.

I can read the configuration descriptor and parse it ok, but I need to know when to stop reading/parsing it.

Thx for any help that you can offer.

rob

Tsuneo

  • Frequent Contributor
  • ****
  • Posts: 145
Re: determining headset topology programatically
« Reply #1 on: April 08, 2013, 11:12:49 pm »
Described in this USB Audio spec.

Universal Serial Bus Device Class Definition for Audio Devices
http://www.usb.org/developers/devclass_docs/audio10.pdf

3.7.1 AudioControl Interface
The AudioControl interface is the single entry point to access the internals of the audio function. All requests that are concerned with the manipulation of certain audio Controls within the audio function’s Units or Terminals must be directed to the AudioControl interface of the audio function. Likewise, all descriptors related to the internals of the audio function are part of the class-specific AudioControl interface descriptor.

AudioControl interface is not always interface 0 ;-)
Pick it up by the interface class triad (class, subclass, protocol), while you are traversing a config descriptor set.

Tsuneo
« Last Edit: April 08, 2013, 11:23:04 pm by Tsuneo »

rebar

  • Member
  • ***
  • Posts: 17
Re: determining headset topology programatically
« Reply #2 on: April 09, 2013, 02:05:04 pm »
Thx Tsuneo - I wasn't able to figure out that detail!