Okay, so I’ve been pulling my hair out over this for the past 6 months. My situation: I have 2 computers, call them A and B, that both run linux that are physically far away from each other. I want to have the audio of A on B. Due to the constrains of reality I have to run any cables right next to power which leads to heavy distortion and interference if I use regular analogue audio cables.
My intend: I would like to transfer the audio from A to B without it ever turning analogue on the way. However neither A nor B have TOS-link and for security reasons I am strongly discouraged from pulse/pipewire-ing it over the network.
What Im looking for is something like a usb c to c cable where the usb controller pretends to be a mic and speaker to the connected devices.
So when I plug one end into A, the controller tells A its a speaker and when I tell the other end into B it tells B its a microphone.
If A now sends the audio to the speaker the controller just pretends like it did the Digital to Analogue conversion and instead passes the digital data over the cable to the other end.
The other end now pretends like it did the Analogue to digital conversion and takes the signal passes the digital signal to B as Microphone input
However I cannot find anything even remotely resembling this. Granted that it doesnt help that google and reddit are completely worthless, since any useful potentially results are completely drowned out by SEO, usb-c phone DAC questions and mountains audiophile digital cable snakeoil.
Does this really not exist? At all? Has anyone solved that issue before?
(Contrary to the thread title I dont actually care about it being specifically c to c it could also be any permutation of a and c)
I doubt you’ll be able to find something which is just USB. I think your best option would be to look for a USB SPDIF output device then either a USB SPDIF input device at the other end or convert it to analog at the receiving end so the analog connection is short.
I think, even with a non-standard or self build solution you’ll run into limitations with USB. USB length becomes a issue greater than 10m even on low speeds and USB non standard lenght cable gets expensive really fast
The cheapest solution is to get USB-Toslink out for PC-A and a USB-TOSlink-in for PC B and route a fibre TOS-cable to the other PC.
The length is about 10m and I know usb will work because I have a usb run to it already with does storage, keyboard and mouse its even decently fast, so as long as I can find literally anything that will do it over usb its going to be okay.
I had a quick look around and those are about 20-25 bucks, so doing the usb->tos->usb would set me back 50 bucks+toslink cable, which is a little steep for something like that
I doubt you’ll be able to find something which is just USB.
is there a technical reason for that? Im genuinely baffled at how backwards this entire experience of trying to get audio from A to B has been so far x.x
I don’t think USB does host to host connections, not without something in the middle. Could someone make some kind of host to hose cable that acts as a digital audio interface? Probably. Have they? I very much doubt it.
I’m not sure what the security concerns with sending the audio over the network are but wouldn’t you be able to address them with the firewall?
Could someone make some kind of host to hose cable that acts as a digital audio interface? Probably. Have they? I very much doubt it.
So it would seem, I guess Im mostly just stunned that Im apparently among the first to think about that.
I’m not sure what the security concerns with sending the audio over the network are but wouldn’t you be able to address them with the firewall?
its a long story, that involves a qubes-ish setup consisting of several VMs and a controller VM that manages who gets what from the host on A and B. If you now read this and think to yourself “wow but doesnt that make network management absolutely atrocious?” you’d be 100% correct. which is why I’d very much like a usb solution if at all possible
I assumed your PCs are more than 10m away. Personally I have some experience with medical equiment and the shenanigans sourrounding it - some use USB sensors powered and connected over USB, often connected with 10+ meter USB cable and these are more or less dumb serial devices, but the cable length begining with 10m is problematic.
You could also use a USB or PCIe-NIC and make a private network between these PCs for only audio piping. But this is most likley as expensive as using dedicated audio hardware and might be a no-go if these PC are not supposed to talk to each other.
I think thats because there are 100 other established ways to transfer audio. If you wanted a approximination to your solution, one could do following.
PC A > 5m USB cable > cheap DAC with sound out > 0,5mm audio cable > cheap DAC with line-in > 5m USB cable > PC B. This should reduce the “attack surface” for noise while not costing much.
You can do this over wired or wireless network. If you must have a USB cable, then there are programmable fake-HID devices that could present as line-out/line-in – note line level, not mic/speaker level.
But if you want to adopt existing audio streaming protocols:
PulseAudio and PipeWire both send and receive streams. See, for example the Arch Linux wiki on Pipewire using PulseAudio’s network routing and ZeroConf to publish and discover. NetJACK is also available if you’re using JACK.
AirPlay has its fans, Shairport Sync is the better of Linux ecosystem’s reimplementation of Apple Airplay 2. Airplay 1 casts data and can have poor lag between start and stop while Airplay 2 has latency management built into the protocol.
Pipewire and Pulseaudio both have plugins for replicating AirPlay, Pipewire’s RAOP Discover will add sources to send audio, and Shairport Sync, now forked & improved as RPiPlay, is available for receiving.
in the industry audio over ethernet is often used. to plug 32 inputs into a mixer without running 32 cables. You can have a look at dante audio over ethernet protocol.
Personally i would use a usb → toslink and then a toslink input usb device. Because i know that works without fiddling and those adapters are realtively cheap.
I guess I should have been a little more exact, sorry about that. So far I’ve gotten really lucky with my cables.
PC A > 5m USB cable > cheap DAC with sound out > 0,5mm audio cable > cheap DAC with line-in > 5m USB cable > PC B.
Also thought about that, the thing Im scared about with that is when I go analogue and then convert it back I get quality losses from DAC+noise over the smaller analogue run+ADC, and the more inexpensive the DACs are the more that compounds. Im not sure how much of a problem that actually is but then again prior to this I thought I could just run the aux cable and have audio so things just cant be that easy.
You can do this over wired or wireless network. If you must have a USB cable, then there are programmable fake-HID devices that could present as line-out/line-in – note line level, not mic/speaker level.
Yeah I thought about DIYing something like that myself, too. I wasnt aware you could usb present as line in and out direcly so that would be interesting.
My network setup is pain, so Im hesitant to go for the ethernet route but maybe this is just kind of the only, well physically, easy option for this. Guess the most actionable thing for me rn is to look into that
Then you have to make your choice in the cost - performance - stability triangle. At one point you have take money in your hands, even if you create a 100% custom solution (tools + material cost money and your time is most likley is also limited).
For the conversion process, if the hardware is half-decent you shouldn’t notice any loss.
I for example use a hdmi capture card and the line-in of a second PC to play my old Pentium area games on the original machines (and stream the output to a live preview in OBS). I don’t notice any sound degration - that said, the sample quality (except cd-music) wasn’t that high in this aera of PC gaming.
Cheap DACs might be a mixed bag nowadays. They certainly were better 10 years ago. In 2009 most of these were made of c-media chipsets and these still produce suprisingly high quality output. The ones I bought the last few years for some projects don’t measure up. In the worrst case you are out 5 - 20 Euros (or your regional equivalent),.