diyAudio

diyAudio (https://www.diyaudio.com/forums/index.php)
-   PC Based (https://www.diyaudio.com/forums/pc-based/)
-   -   using a Raspberry Pi 4 as a USB DSP-DAC (https://www.diyaudio.com/forums/pc-based/341590-using-raspberry-pi-4-usb-dsp-dac.html)

CharlieLaub 21st August 2019 11:57 AM

Quote:

Originally Posted by phofman (https://www.diyaudio.com/forums/pc-based/341590-using-raspberry-pi-4-usb-dsp-dac-post5891165.html#post5891165)
Most networks have a DHCP server. Why not using some zeroconf solution (avahi), like daphile and other players do? RPi would be accessed by under name e.g. xover.local.

Because I need a fixed (numbered) IP address for the RTP over UDP.

phofman 21st August 2019 03:28 PM

Why can it not use DNS, instead of plain IP address?

CharlieLaub 21st August 2019 04:24 PM

Quote:

Originally Posted by phofman (https://www.diyaudio.com/forums/pc-based/341590-using-raspberry-pi-4-usb-dsp-dac-post5891600.html#post5891600)
Why can it not use DNS, instead of plain IP address?

Can you be more specific with your question?

This needs to function properly even if there is no network available...

phofman 21st August 2019 06:15 PM

In https://www.diyaudio.com/forums/pc-b...ml#post5889569 you talk about the need for knowing the IP of your xover RPi. With avahi (zeroconf) the xover.local would be resolved automatically, independently of network setup. You should be able to use that instead the specific IP address. On any network, without the dedicated USB-ethernet segment.

But it requires a network though. Just a network cable should do.

CharlieLaub 21st August 2019 06:45 PM

Quote:

Originally Posted by phofman (https://www.diyaudio.com/forums/pc-based/341590-using-raspberry-pi-4-usb-dsp-dac-post5891831.html#post5891831)
In https://www.diyaudio.com/forums/pc-b...ml#post5889569 you talk about the need for knowing the IP of your xover RPi. With avahi (zeroconf) the xover.local would be resolved automatically, independently of network setup. You should be able to use that instead the specific IP address. On any network, without the dedicated USB-ethernet segment.

But it requires a network though. Just a network cable should do.

To initiate a Gstreamer RTP-over-UDP stream using the element udpsink you must provide the destination IP address, because that is how the element has been written. There might be other apps that are able to stream RTP audio data to a zeroconf type address, but I am not familiar with them.

Remember, one point of this project is to use the USB gadget connection. Sure that is "ethernet" it its protocol but it is not part of a network by design. The connection is "plug and play" like USB. In the last couple of days I wrote a small script that runs on the Pi. It continually pings the IP of the USB gadget and when that it up, it launches the Gstreamer pipeline. If script was run at start-up the entire Pi side would be a headless, black box. On the host PC a similar script is executed via a batch file, so the user has to only click on it to start sending audio data. It's pretty fault tolerant, as I have discovered. With everything up and audio playing, I can unplug the cable, wait a few minutes. The Gstreamer pipelines keep running and complain about buffer overruns. As soon as I plug it back in, audio playback resumes.

I don't really see a problem with the IP address approach. It's something that you set up one time on the PI and in Windows RNDIS and then forget about it unless you needed to change something about the setup. The Pi itself never needs to be connected to the internet.

CharlieLaub 22nd August 2019 12:26 AM

Once I have the scripts finalized, I will post a HOW-TO.

The 8-channel HAT and PS only cost about US$65 via Amazon while supplies last. Combined with a Pi4 for $35 your $100 gets you an 8-channel DSP/DAC system that you can plug into a Windows or Linux machine via USB.

carlthess40 22nd August 2019 01:34 AM

Quote:

Originally Posted by CharlieLaub (https://www.diyaudio.com/forums/pc-based/341590-using-raspberry-pi-4-usb-dsp-dac-post5892174.html#post5892174)
Once I have the scripts finalized, I will post a HOW-TO.

The 8-channel HAT and PS only cost about US$65 via Amazon while supplies last. Combined with a Pi4 for $35 your $100 gets you an 8-channel DSP/DAC system that you can plug into a Windows or Linux machine via USB.



Question
After you write the code for this, and post the parts list and the scripts. I could use this for a car dsp or a home dsp system setup without a pc hooked up to the PI4 ?
Iím a newbie with these PI boards
Iím also a hands on learner, lol so yes I was horrible in school but great in any of my shop classes

dtaylo3 22nd August 2019 03:52 AM

A bit over my head, but will look forward to a How To. I use a TinkerBoard rather than Pi for running Volumio into my dac. Works great. Would love to be able to do crossovers in DSP on the TB. As a 62 year old dude this stuff blows my mind vs. my first HK receiver from Sam Goody's into EPI 100 speakers off of BIC turntable in 1974.

CharlieLaub 22nd August 2019 12:01 PM

Quote:

Originally Posted by carlthess40 (https://www.diyaudio.com/forums/pc-based/341590-using-raspberry-pi-4-usb-dsp-dac-post5892214.html#post5892214)
Question
After you write the code for this, and post the parts list and the scripts. I could use this for a car dsp or a home dsp system setup without a pc hooked up to the PI4 ?
I’m a newbie with these PI boards
I’m also a hands on learner, lol so yes I was horrible in school but great in any of my shop classes

How would you get audio into the Pi without the PC, e.g. in the car setting???

The whole point of this project is to make the Pi into an accessory for the PC that is a DAC wtih DSP capability.

If you want to do that "standalone" then you will need to use some kind of audio device (e.g. USB audio interface) that also has input. That would be a different project alltogether, and it has been done many, many times already. Look into ecasound and e.g. ASUS Xonar U7. You will need a PS for the Pi that works from the car DC power...

CharlieLaub 22nd August 2019 12:08 PM

Quote:

Originally Posted by dtaylo3 (https://www.diyaudio.com/forums/pc-based/341590-using-raspberry-pi-4-usb-dsp-dac-post5892288.html#post5892288)
A bit over my head, but will look forward to a How To. I use a TinkerBoard rather than Pi for running Volumio into my dac. Works great. Would love to be able to do crossovers in DSP on the TB. As a 62 year old dude this stuff blows my mind vs. my first HK receiver from Sam Goody's into EPI 100 speakers off of BIC turntable in 1974.

This arrangement only works for systems that have USB OTG hosts. It looks like that Tinkerboard does have an OTG host but I don't have any experience using it for this application. I do have a TB lying around here somewhere (the original one) so I could give it a try but that will take some time.

Can you check into that for your board?

Also, if you are already using Volumio on the TB for playback, then you don't need this setup - it's only for playback from another (host) computer via the Pi to the DAC. Instead you can just connect the HDMI HAT to the HDMI output as a standalone accessory (not as a HAT) and then you will get 8 channels of up to 24/192 audio. You just need a program like ecasound to implement the DSP, and an audio loopback (e.g. snd-aloop in ALSA) or other means to direct the Volumio output to the input of ecasound.


All times are GMT. The time now is 11:18 PM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 17.65%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright ©1999-2020 diyAudio

Wiki