2

When I connect several USB audio devices using the default drivers I usually end up with some kind of friendly device description like "nn- USB Audio codec" or something else, so I have currently no unique property which refers to a specific hardware the e.g. manufacturer ID. I would like to ensure that in case of re-enumerating or replugging the hardware to a different port that my software will automatically identify the changed windows audio device which maps to this hardware. I there a possibility to gather further windows audio device information which can be used to determine the physical hardware ?

Maybe a little clarification is needed:

I have two or more USB audio devices, not necessarily same product or manufacturer. The audio connections have different purposes, so I want to ensure that I my software uses constantly the same physical audio devices for different tasks. This sometimes fails when a re-enumeration occurs ( sometimes without changing the physical USB port connections, it's a windows thing...)

Ideally I would distinguish them by an individual serial number, which usually is only available with storage devices. But what I can retrieve is the "physical" USB topology when I'm looking at the device with a tool such as USBDeview from Nir Sofer. There I have a property like "Hub 3, Port1". If I could map this to a sound device I get from audio audio api like "nn- USB Audio codec" as seen in the sound control panel I would be perfectly happy.

Edit2:

May be this[1] post helps here, but I still have to figure out how to get a USB Port <-> Windwos Sounddevice mapping.

[1]: Can the physical USB port be identified programatically for a device in Windows? "

4
  • Where exactly are you getting this string from? The "Setup API" allows you to get low-level USB properties down to the serial number. But your hardware is probably lacking a serial number, considering that you are complaining about re-enumerating and replugging.
    – MSalters
    Dec 4, 2015 at 13:29
  • I'm getting the string usually from the AudioAPI using e.g. PortAudio. The string depends on the used AudioAPI (e.g. MME, DirectSound, WASAPI...). The SetupAPI gives me a hardware or USB identifier, but I need a mapping of this to a dedicated windows audio device. If the SetupApi would provide that mapping, it would be sufficient enough but I don't think that is the case. Dec 8, 2015 at 13:58
  • The SetupAPI is generic, and doesn't know anything about audio. (It doesn't know anything about video cards either, or joysticks, or webcams, or ...) SetupAPI certainly doesn't know anything about all those Audio API's you mentioned and the pseudonyms they use. SetupAPI does understand USB bus relations, PCI buses, vendor IDs and product IDs, etcetera. Plug&Play is handled at this level.
    – MSalters
    Dec 8, 2015 at 15:42
  • Well, that's actually my problem. How can I get a relationship from a Windows Audio Device that I retrieve through any audio API to its physical hardware ( if one exists ) ?. Any suggestions are very appreciated. Dec 8, 2015 at 16:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.