Loopback vs USB audio gadget for CamillaDSP

In the past I had some trouble using loopbacks, due to (I believe) running them in virtual machines. My solution at the time was to set up a raspberry Pi as a USB audio gadget, to offer the system some direct hardware access. Now, however, I have abandoned the VM and will be running my media directly on the machine's native operating system (likely linux, maybe windows), which would make loopbacks a possibility again - and save fiddling about with a headless raspberry machine.

But.. I have it in mind that the USB audio gadget still had some advantages, I just can't recall what! It may have been lower latency, and/or perhaps it was that the source PC could set the gadget's sample-rate more easily, for example. Though I was comparing to loopbacks that may not be representative due to the VM.

Could anyone suggest what they have found a usb audio gadget's advantages to be? I already have both a Pi v4 and v5 so there is not a cost issue, but obviously (with another machine involved) more work would be needed for build and maintenance, running costs etc. TBH I've not found Pis to be especially nice or easy to use without additional customisation, so I would certainly want to put some effort into that if I were to go there again; things like automatic safe shutdown on power off etc.

Thanks,
Kev
 
Aha! Looking back, a key thing that interested me about the audio-gadget was to have a dedicated little crossover/EQ box for the speakers, making them somewhat separate to (or independent of) the specific media PC/laptop etc. So it might have been that there was actually no other benefit compared to loopbacks on the media PC, other than these weren't working well in my VM.

Though just looking at CharlieLaub's recent post on his Gstreamer method, I can also envisage the exact same Pi being useful in a network/LAN configuration too. So going the Pi-route could add some flexibility, and likely also more interest than just playing direct from the media-PC.
 
Last edited:
I have experimented with a few members of the Pi platform in the past using my GSASysCon app to stream PCM audio via RTP over my LAN (sorry for the acronym word salad!). This can of course work, but I found that the onboard WiFi of the Pi was not quite as great as I thought it would be. Of course that could be due to the myriad changes and updates to the WiFi and networking in its OS. Definitely works great over Ethernet, and is certainly passable via WiFi. Have not tried the Pi 5 in this role, so maybe things are now better.
 
a key thing that interested me about the audio-gadget was to have a dedicated little crossover/EQ box for the speakers, making them somewhat separate to (or independent of) the specific media PC/laptop etc. So it might have been that there was actually no other benefit compared to loopbacks on the media PC,
That is the main benefit, and imho it's a quite big one. My crossover is running on a Pi4 in gadget mode, and isn't affected by anything that happens to the PC that plays music and/or video. So if I for some reason need to reinstall the operating system, dual boot another, or whatever else, the crossovers will still just work.
 
Thank you, Henrik. Yes, that is still quite appealing, so I think I shall go with a Pi after all. Before my plans (i.e. the VM approach) changed, I did invest a little bit in the Pi system, so in a way I'd be foolish not to still make good use of it.

For some things a mini-PC might be more convenient, but the gadget-mode has been so well worked out for the Pi that I chose it instead. It is still capable of whatever else I might need though, so no problem at all; I just need to turn it into a more complete/functional machine, to make it nice to use.
 
I've been wondering about going with an old/used mini-PC for the crossover/dsp, as I think these are a more complete solution and probably better value than raspberry Pi's for many uses. But I originally bought into the Pi system because the USB audio-gadget mode works so well with it; that would still be nice to have as an option, and doesn't preclude using it with CharlieLaub's network approach either, so a Pi would be quite flexible.

So, I dug out the Pi 5 and some bits that I got for it previously. I'd forgotten that I'd headed so far in this direction already, before abandoning my VM approach. I already have a small geekworm UPS for the Pi that was intended to provide automatic safe shut-down on power off, and (if possible) auto start up on power on. A few leads and converters and a (slightly excessive) meanwell power supply. I really just need a case, a quiet/silent cooling fan or heatsink and (sadly rather precious) time to make it come together.

I quite like the streamers that one sees built around Pis, with fancy touch-screens etc. and it would be easy to get carried away. But I think this use-case only needs a simple blank box; maybe with an on/off button at most. It probably wouldn't benefit massively from running off an SSD (as the Pi5 now can), so I'll keep my micro-sd card and just make images of it for if/when replacement is needed. I can also plug the pi into my KVM switch, so won't have to worry about headless access over USB or LAN connections.
 
I've been running my sound system on RPis for many years. Currently an RPi4 with RaspberryPI OS on a fairly quick USB drive. I use CharlieLaub's LADSPA modules for crossover and Eq. It is a gadget for TV sound, and I run Audacious to play music stored on the SD card. It is successful in both modes; by using some amps with the TAS series chips the sound is as clear as anything I've used previously. My music preferences are Orchestral, Choral and Chamber.
 
  • Like
Reactions: Kev06
RPi is only one of many ARM devices which have the USB device interface, no need to be restricted to RPi. Tiny ARM boards like Radxa Pi S or Orange Pi Zero 2 https://www.audiosciencereview.com/...ualizer-between-usb-source-and-usb-dac.53750/ can be powered via the gadget USB port, and run CamillaDSP very good.

Also Intel Atom CPUs include the dwc3 USB OTG IP and some inexpensive x86 tablets can have one of their USB ports switched to the gadget mode (though it may take some untrivial bios configuration). Both of my x86 tablets could be switched so, though the one with USB-As only requires a non-standard cable USB-A <-> USB-A.
 
  • Like
Reactions: Kev06
RPi is only one of many ARM devices which have the USB device interface, no need to be restricted to RPi. Tiny ARM boards like Radxa Pi S or Orange Pi Zero 2 https://www.audiosciencereview.com/...ualizer-between-usb-source-and-usb-dac.53750/ can be powered via the gadget USB port, and run CamillaDSP very good.

Also Intel Atom CPUs include the dwc3 USB OTG IP and some inexpensive x86 tablets can have one of their USB ports switched to the gadget mode (though it may take some untrivial bios configuration). Both of my x86 tablets could be switched so, though the one with USB-As only requires a non-standard cable USB-A <-> USB-A.
That ASR thread is very interesting; thank you for the link, Phofman. RAndyB is correct that I already have the RPi5, but yes; I might make different choices these days, so it is nice to see some alternatives.

I mostly chose the RPi5 (at the time) because the usb audio device mode was known to work with the RPi4 and there were even guides available for setting it up (in both cases, partly thanks to yourself - which I very much appreciate, thank you!). It looked like the RPi5 would follow in this respect, and I believe it now has done. Conversely a lot of devices that should in theory be capable of this mode of operation either didn't properly support it or else required software tinkering/hacking beyond my limited ability. It is nice to see that there are now other good/better options.

Anyway, the Pi5 is what I have, and I'm probably content enough to use it here. The main thing: it is still (just about) possible to run it passively for this kind of modest application, or certainly inaudibly without much effort, so I don't think it should be a problem.
 
Last edited: