Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to play the same sound over several USB audio devices in sync. Last time I tried something like this was about 2001 and it was successful -- and the pair of Griffin iMics I used back then still work in that usage, but I want more channels now.

I'm having trouble getting this to work with more recent USB Audio devices. I have some devices with C-Media chips, which creates a lot of crackles and pops and drift out of sync relative to the iMics; another device with a TI chip doesn't crackle but still drifts out of sync.

According to my understanding of how USB audio works, the sync problems would be consistent with the iMics using Synchronous clocking and the others using Asynchronous clock.

Now, when I do lsusb -v I see that each of my devices exposes multiple endpoints, some Synchronous, some Asynchronous, and some Adaptive. So I need some way to instruct the audio driver to use the synchronous endpoint. That's where I'm stuck.

  • How can I tell which endpoints are being used? lsof reports a /dev/snd/pcmXXXXX are in use, but I'm not sure whether that corresponds to any particular endpoint. I can see information about endpoints in /sys/bus/usb but I don't know how to tell of any of the endpoints are active.
  • How can I change which endpoint is used, by configuring ALSA or some other library? I've tried looking through the ALSA sources but haven't found any parts that tell how it selects which endpoint to use.
share|improve this question

1 Answer 1

The USB specification defines three synchronization modes for isochronous endpoints: synchronous, asynchronous, and adaptive.

Nobody uses synchronous. For playback endpoints, adapative means that the device runs at exactly the speed at which the PC decides to sends data; asynchronous means that the device tells the PC how fast it should send data (this is done through a second endpoint in the other direction).

An asynchronous device typically has three isochronous endpoints: one asynchronous output endpoint for playback samples, one input endpoint for playback frequency feedback data, and one asynchronous input endpoint for capture samples. It might also have interrupt and bulk endpoints for mixer control, MIDI, and vendor-specific stuff.

The USB audio driver prefers an adaptive endpoint over an asynchronous endpoint, if possible. (But I don't know of any current device that actually has different endpoint types for the same output; the C-Media CM66xx chips certainly don't.)

So if you want to run multiple devices at the same speed, you cannot affect anything with software configuration; you must use devices that you know support adaptive mode.

share|improve this answer
    
Thanks, that makes more sense. On closer inspection the iMic was defining adaptive outputs and async inputs, and I wan't noticing which was in and out. However, I'm a little surprised that the iMic and the TI chip, both adaptive, would go out of sync with each other. –  crowding Jun 12 '14 at 6:03
    
Were they connected to the same bus? –  CL. Jun 12 '14 at 6:41
    
Yes, both through the same hub. –  crowding Jun 12 '14 at 6:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.