Supporting USB audio Pro interfaces #336
Replies: 19 comments 99 replies
-
I also did a test with a Presonus StudioLive 24R, which is a 64 channel interface. Had to increase But after that results in the same problem:
|
Beta Was this translation helpful? Give feedback.
-
Circle supports only USB audio interfaces with 2 channels and 16-bit sample size. Your interfaces are much above this. I will see, if I can scale this up now. This will take some time. We have to test, if the USB isochronous bandwidth, which is provided by the Circle xHCI driver, is sufficient for so many channels. |
Beta Was this translation helpful? Give feedback.
-
Hi Rene,
I figured as much. The babyface pro does seem to have a 2 channel interface as well, but probably 24 bit only. I imagine many of the pro audio interfaces have 24bit support only. I can perform tests!
Kind regards,Nick
|
Beta Was this translation helpful? Give feedback.
-
The updated source code is on the branch usbaudio-24bits. If an USB audio interface with 24 bits sample size is going to be used, the option |
Beta Was this translation helpful? Give feedback.
-
did some testing this morning. The Babyface Pro stops at an assertion, and the zoom r8 also doesn't work but doesn't kill the kernel. Here is the output:
|
Beta Was this translation helpful? Give feedback.
-
There is an update on the usbaudio-24bits branch, which may fix the problem with the RME Babyface Pro. Of course I cannot test it here. There was a problem in a descriptor for the output terminal "Speaker", which references a source ID (2), which does not exist. I found a similar issue here. Now you should get a warning "Source entity not found (2)", but the USB audio streaming driver should load. I'm not totally sure, if it will work then, because the feedback endpoint specifies an interval of 4, and I can only test 1 here, but please test it with the Babyface Pro. |
Beta Was this translation helpful? Give feedback.
-
Thanks for testing. I did find two problems in lib/sound/soundbasedevice.cpp, which should be responsible for the drops with WRITE_FORMAT set to 2 (sample/34-sounddevices). This should be fixed now on the branch usbaudio-24bits. I don't know, if this also helps for the problems with your modified sample/42-soundinput (may be). |
Beta Was this translation helpful? Give feedback.
-
I have to admit, that the RME Babyface Pro is the first high-speed USB device, which uses an asynchronous data endpoint with a feedback endpoint, which is tested with Circle. I only had a full-speed device with this configuration here, which is different. Thus beside the 24-bit sample size, there are additional questions to answer for implementing the driver. This may require many tests. I want to give you a warning, because this may be a long and sometimes frustrating process. And if we have this device working to some degree, there remain more open questions, like how the headphone jack can be switched on with it. Currently I have no idea, why these error messages in class 2.0 compliant mode with the ZOOM R8 occur. These devices seem to be different, even when they are compliant with the USB audio class specification. That's why the question arises, if it is worth all the effort to get it working? My approach to deal with this problem was, that I limited the number of supported devices to those with 16-bit sample size and two channels, which are often relatively simple full speed devices, which should work with Circle. I cannot say, how long it will take, before one or more Pro interfaces are really working successfully and if a specific interface can be supported. There is a small fix on the branch usbaudio-24bits. I'm afraid, this won't be enough to get the RME Babyface Pro working, but I'm not sure. So if you want to test it, please do. |
Beta Was this translation helpful? Give feedback.
-
Happy new year to all! Hi Nick, I did recognize, that the ASUS Xonar U5, which I have here, has a very similar endpoint configuration for input like the RME Babyface Pro (2 channels with 24 bit resolution, 3 bytes per sample, isochronous asynchronous data endpoint, interval 1). When I build the sound-controller tool with this Config.mk:
and enter at the command prompt:
I get a clean sound on the 3.5" headphone jack on the RPi board. Can you please try this. If this works, but not, when the output is via the Babyface Pro itself, there may be some interference between the USB input and output direction. Another reason for the "mini" drops in the audio may be, that the USB receiver cannot provide enough data on input for the USB transmitter on output over the time. Perhaps this can be checked, when the test above would be OK, by starting the transmitter after the receiver with:
You can also increase the parameter |
Beta Was this translation helpful? Give feedback.
-
The branch usbaudio-24bits has been merged to develop. The harmonic distortion I noticed earlier, was caused by damaged headphones, how it turned out. This was not the final step for audio development. Next planned is scaling up the number of supported channels from Stereo. |
Beta Was this translation helpful? Give feedback.
-
This took a while, but now there is support for up to 32 audio (aka sound) channels on the branch sound-more-channels. For USB audio streaming devices you have to configure the expected number of channels for output and input with the option The program test/sound-controller can be used for test. The other samples have not been updated yet. You should set the value |
Beta Was this translation helpful? Give feedback.
-
I will try this tomorrow evening with my Presonus StudioLive 24R, but I suspect it will not work because the Presonus only has a 64 channel interface in the usb descriptor last time we checked. It's because it's a Dante device, which is a network protocol for audio transport. I don't really know if all Dante devices always expose 64 channels, or if it's specific to the StudioLive series products. The Babyface pro also had a 12 channel interface, but i think it contains 8 ADAT channels. I don't have any other adat devices, so I might not be able to verify that. Anyway, i'll give it a shot. I'll let you know! |
Beta Was this translation helpful? Give feedback.
-
Hi Rene, Thank you for your hard work on adding USB audio support, it cannot have been easy! I've been testing it with the Dirtywave M8 tracker. The M8 is an interesting device - it is a pocket synthesizer/sequencer with USB audio input and output as well as USB MIDI. It also has analog audio in/out and TRS minijack MIDI, and all can be used together at the same time. I believe it is based on a Teensy microcontroller and using its USB stack. It provides CDC and MIDI USB functions in addition to audio; CDC is used for firmware updates. Attaching it to a RPi via USB and using MIDI to control mt32-pi, for example, and have the RPi send the audio back digitally all via one cable would be very cool. Currently this device fails to initialize because:
If I comment out the So far I've tested this on a CM4 with I/O board and using the I'm not sure what it would take to support it, but here is a Cheers 🙂 Circle 34-snddevices log
Dirtywave M8 lsusb dump
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately I noticed a severe problem in the USB audio streaming support. Even the version released with Circle 45.1 does not work reliable any more with my test devices. I believed, I had tested this sufficiently and don't understand this at the moment. Unfortunately it does not make sense to continue with USB audio support from here, before this is sorted out. |
Beta Was this translation helpful? Give feedback.
-
@nickverlinden @dwhinham Hi Nick and Dale, I would like to do a test now with your device(s) and sample/34-sounddevices and/or test/sound-controller with the source code from the branch sound-more-channels. This works on the RPi 4B and CM4 here with my own devices. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
Hi Dale, here comes the patch for creating a trace using sample/34-sounddevices with the M8 Tracker. Please clone the latest version on the branch sound-more-channels and apply the patch in the attached archive using The program runs 10 seconds, the sound stops then and the 500 trace events/lines are written to the logger. Please add the option Because the trace events are generated immediately before the sound stops, the sound should show the wrong behavior at that moment, so that I can see, what happens there. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
-
@nickverlinden Hi Nick, I hope you are still tuned. After sorting out some problems with Dale, with using the Dirtywave M8 device, and after doing a number of modifications to the USB audio streaming support, it would be great to know, if it still works with your own devices (ZOOM R8, Babyface Pro, more?). The code is still on the branch sound-more-channels and all samples and tests should work. I will merge the branch to develop, when you confirm it working. I think the test with test/sound-controller, that we did before, should be sufficient. Thank you in advance! |
Beta Was this translation helpful? Give feedback.
-
The recent improvements for USB audio streaming are in Circle 45.2 now. Thank you again for your valuable help! |
Beta Was this translation helpful? Give feedback.
-
@rsta2 I finally got my hands on a Tascam Model 12, which has 12 outputs and 10 inputs. It's a fantastic mixer/interface/recorder all in one. I did some tests with the latest main branch of circle, but am getting an error. Circle crashes on a specific line which you can see in the output of the sound-controller test app. And on the display of the Tascam the message 'USB Fs mismatch' appears. cmdline.txt soundopt=24 usbsoundchannels=10,12 stdout Sound Shell
Enter "help" for help!
logger: Circle 45.2 started on Raspberry Pi 4 Model B
00:00:00.66 timer: SpeedFactor is 1.51
00:00:00.73 pcie: Link up, 5.0 Gbps x1
00:00:01.14 usbdev1: Device ven2109-3431, dev9-0-1 found (HS)
00:00:01.14 usbdev1: Product: USB2.0 Hub
00:00:01.19 usbdev1: Interface int9-0-0 found
00:00:01.19 usbdev1: Using device/interface int9-0-0
00:00:01.86 usbdev1-1: Device ven644-805f, devef-2-1 found (HS)
00:00:01.86 usbdev1-1: Product: TASCAM Model 12
00:00:01.91 usbdev1-1: Interface int1-1-20 found
00:00:01.91 usbdev1-1: Using device/interface int1-1-20
00:00:01.91 usbdev1-1: Interface int1-2-20 found
00:00:01.91 usbdev1-1: Using device/interface int1-2-20
00:00:01.91 usbdev1-1: Cannot initialize function
00:00:01.91 usbdev1-1: Interface int1-2-20 found
00:00:01.91 usbdev1-1: Using device/interface int1-2-20
00:00:01.91 usbdev1-1: Alternate setting 2 ignored
00:00:01.91 usbdev1-1: Interface int1-2-20 found
00:00:01.91 usbdev1-1: Using device/interface int1-2-20
00:00:01.91 usbdev1-1: Cannot initialize function
00:00:01.91 usbdev1-1: Interface int1-2-20 found
00:00:01.91 usbdev1-1: Using device/interface int1-2-20
00:00:01.91 usbdev1-1: Alternate setting 2 ignored
00:00:01.91 usbdev1-1: Interface int1-1-0 found
00:00:01.91 usbdev1-1: Using device/interface int1-1-0
00:00:01.91 usbdev1-1: Interface int1-3-0 found
00:00:01.91 usbdev1-1: Using device/interface int1-3-0
00:00:02.07 usbdev1-3: Device ven712-9 found (FS)
00:00:02.08 usbdev1-3: Product: WaveShare WaveShare
00:00:02.13 usbdev1-3: Interface int3-0-2 found
00:00:02.13 usbdev1-3: Using device/interface int3-0-2
00:00:02.29 usbdev1-4: Device ven18a5-245 found (HS)
00:00:02.30 usbdev1-4: Product: Verbatim STORE N GO
00:00:02.35 usbdev1-4: Interface int8-6-50 found
00:00:02.35 usbdev1-4: Using device/interface int8-6-50
00:00:02.35 uaudio1-1: Input Terminal type(s): 0x201 (12 * 24 bits)
00:00:02.35 uaudio1-1: Supported sample rate(s): 44100, 48000 Hz
00:00:02.35 uaudio1-2: Output Terminal type(s): 0x301 (10 * 24 bits)
00:00:02.35 uaudio1-2: Supported sample rate(s): 44100, 48000 Hz
00:00:02.36 usbhub: Port 1: Device configured
00:00:02.36 usbhub: Port 3: Device configured
00:00:02.56 umsd: Capacity is 14800 MByte
00:00:02.57 usbhub: Port 4: Device configured
00:00:02.57 xhciroot: Port 1: Device configured
00:00:02.57 kernel: Compile time: Aug 12 2023 11:25:20
00:00:02.57 kernel: Using serial interface
Sound Shell
Enter "help" for help!
Sound IO> start sndusb io
00:00:10.58 usbsoundbasedevice.cpp(378) |
Beta Was this translation helpful? Give feedback.
-
I tested Circle 45 with the RME BabyFace Pro in Class Compliant mode, but ran into some trouble.
First, I had to change this, because else i got an assertion:
usbaudiofunctopology.h:line 44
Then, when running sample 34-sounddevices, i get this:
Looking at the warnings and the code inside usbaudiostreaming.cpp, I imagine the Babyface Pro does not support 16bit audio. What do you think?
Beta Was this translation helpful? Give feedback.
All reactions