How redirect Audio from PC to Raspberry Pi

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hey everybody,

I'm looking to one up my system by integrating a Raspberry Pi and using it for room correction and as active crossover. Similar to here Tutorial: Raspberry Pi as Music Server, DSP, and Crossover, I want to use the HDMI output to get the signal to my receiver.
However I don't want the Pi as only possible signal source, I also want it to be able to accept an input signal from my pc and process it. This seems to be trickier than initially thought, as I want all audio from the pc to be routed through the pi, not just some applications (otherwise a simple network player probably would do the trick). Preferably with low latency.

There are some possible approaches I have thought of so far, but none of them is really optimal:

1. pc hdmi out -> hdmi audio extractor with spdif out -> cheap usb sound card with spdif in (like this) -> raspberry pi
-
This just seems like a lot of unneccessary conversions, and even though its all digital I assume it won't be optimal for the quality. I'm not an expert, but I'm guessing there will be different clocks involved?

2. pc line out -> usb sound card line in -> rasperry pi
-
A little less complex, but involing an uneccesarry d/a and a/d conversion, which can't be good.

3. configuring and connecting the raspberry pi as a bluetooth speaker
-
probably not the best quality + probably this will lead to a rather big delay

4. Some software stream over wifi solution like SWYH
-
While they are able to stream all audio, they don't fully integrate themself into the system as virtaul audio driver/output device. But thats more of a beauty error I could live with. Whats way worse is the huge lag that will make it impossible to use for anything but music.


The most ideal thing would be to somehow connect the Raspberry Pi to the pc via usb and have it act like a usb sound card. But appearently the Raspberry Pi 3 (which I intend to use) does not support usb device mode (e.g. can only act as a usb host).

I am sure that there a lot of other people out there who use a Pi as a dsp/active crossover, and I wonder how they solved that problem?

Edit: I just realized I forgot a to in the title, but I don't know how to change that, so if any mod stumbles accross this, please feel free to fix that :)
 
Last edited:
Is this strictly stereo audio, or also potentially multichannel e.g. surround sound when listening to movies?

You could duplicate stereo audio to an SPDIF output and use a DIGI I/O HAT from HiFiBerry to receive the spdif stream. The Pi could then process it and output it thru another device (e.g. multichannel USB DAC).

There is also the possibility of streaming the audio to the Pi over a LAN cable or WiFi (cable would be better).
 
For now its strictly stereo only, although the output from the Rasperry to the receiver will have more channels (since its used as active crossover). Which is also why I can't (or better: would like to avoid to) go from the pc to the receiver directly, since then I would have to set up all the processing on the pc as well. (Also I hope to set up Alexa on the Pi, so that I can switch presets for the listening position for the room correction via voice command. "Computer, set listening position bed." How cool would that be :) ) (Maybe in the even further future measure the room in a somewhat tight grid of positions, set up two cameras to track my current position and dynamically select the closest filter, but now I'm daydreaming...)

To duplicate the the output to an spdif output I would again have to use one of these cheap sound cards so it would be pc -> usb -> spdif -> usb -> pi (the second usb could be avoided with the hifiberry, but then again its pretty expensive, I'm a broke student :p) I guess its possible, but I'm unsure about if these many conversions will introduce some nasty side effects.
Do you know of any lan (in this case it would actually be wifi, since its a laptop) streaming solutions that integrate themself as audio device into windows, and about the achievable latency? (I might have read somewhere in a half sentence that gstreamer might achieve decent latency, but I have to read up on that)
 
Sorry, nothing comes for free!

Does your PC motherboard have an SPDIF output? You try to buy a cheap PCIe soundcard or something like that.

MiniDSP sells a USB device called the "miniStreamer". Cost is only $35 IIRC. It has coax SPDIF input and output.

Since I assume your PC has an ethernet jack, the cheapest would be to stream over the LAN. You only need some free software for that. With a wired connection the latency can be quite low for stereo audio. Then you need a soundcard for the Pi that has enough output channels. Again, not free, but you can get a super cheap one for as little money as 20 Euros. With a USB soundcard, you could "upgrade" it later by buying a different (more expensive) one and all the processing stays the same.
 
Ok, then I guess I will try the network solution first, and if the latency is too much connect them via spdif.
I've taken a first look at netJack, and it seems promising.
I'll let you know how it worked out, but it might take a while, exams are coming up in a couple of weeks...
 
If you only want to play 2-channel to the RPi, then install Dietpi OS and select DLNA from the menu. Then play music from Jriver on your PC. This is a DLNA endpoint. Use Ethernet or WIFI. If you want a direct connection, you can try a crossover Ethernet cable.

If you want a music server, then install Roon Server by selecting it from the Dietpi menu.
 
the main problem in a software solution is stability. with some of them you end up in a stable state. but beware shutting the box down afterwards because maybe you didnt save your configuration hell or stuff like that :) its often very problematic if you restart one of the boxes.

i once had some zita solution running, i think it is called zita-njbridge. it was working stable but i didnt test latency. it is a linux only jack client though.

good luck
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.