Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

PC Based Computer music servers, crossovers, and equalization

using a Raspberry Pi 4 as a USB DSP-DAC
using a Raspberry Pi 4 as a USB DSP-DAC
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 30th August 2019, 09:46 PM   #71
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Also, just out of curiosity... is anyone planning to try this?

Darn, I hate when my post become the first one on a new page. The poor guy is so lonely and isolated here!!!
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 31st August 2019, 04:07 PM   #72
kampfameise is offline kampfameise
diyAudio Member
 
Join Date: Oct 2015
Quote:
Originally Posted by CharlieLaub View Post
Here is an amazon seller link to the 8-channel HDMI audio extractor HAT that I use in this project and that supplies power to the PI via the GPIO pins so that you can use the USB-C port as a OTG ethernet gadget:
https://www.amazon.com/WINGONEER-WX6.../dp/B06XCFBTVW
The 5V 4A external power supply you will need is also available on that page under the heading "Frequently bought together".

Click the image to open in full size.

Since the Pi 4 has micro HDMI ports and the HDMI input to the X6000 board is full size you will need an adapter cable or a standard HDMI cable plus an M-F adapter like this one:
https://www.amazon.com/GearIt-Micro-...66/ref=sr_1_11
Is there a DSP-Chip on the wx6000-board, that you can control over the GPIO from the Pi? Would be nice: plug any hdmi-source (LPCM7.1) to it, make all dsping over pi and then to the hdmi-out to an reciever.
  Reply With Quote
Old 31st August 2019, 04:12 PM   #73
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by kampfameise View Post
Is there a DSP-Chip on the wx6000-board, that you can control over the GPIO from the Pi? Would be nice: plug any hdmi-source (LPCM7.1) to it, make all dsping over pi and then to the hdmi-out to an reciever.
No. It's just an HDMI audio extractor. The DSP must be performed upstream from the WX6000 and sent to it over HDMI.

The WX6000 is just a convenient DAC and power via GPIO for the Pi-4. I need both in this application.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 2nd September 2019, 12:25 AM   #74
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
After some more experimenting, I was able to successfully initiate the USB ethernet gadget connection from a type A USB port (it often looks like this):

Click the image to open in full size.

...to the USB-C port on the Pi 4. To do this I had to buy an adapter: one was used on the end of a USB type A male to mini female cable and was mini A to USB-C. The other was a male type A USB to USB-C female adapter, with a USB-C cable.

I was only able to get the connection to work when I was using a USB 3.x port on the host (e.g. laptop #2). The connection could not be initialized properly when using a USB 2 port, instead it tried to become a USB serial gadget. Plugging the cable into the USB 3 port resulted in the RNDIS driver installing correctly.

Oddly enough, on the laptop that had been using up to this point (laptop #1) from its USB-C port, when I used the adapter dongle and connected the cable via USB 3.0 type A port, it would not work. It only seems to work when the connection is made to the USB-C port on this machine. It could be that the RNDIS driver is somehow bound to a particular port, which ever one you use first. Not sure. Maybe phofman has some insight into this behavior?
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins

Last edited by CharlieLaub; 2nd September 2019 at 12:34 AM.
  Reply With Quote
Old 2nd September 2019, 08:16 AM   #75
phofman is online now phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
I have absolutely no insight on windows RNDIS behavior :-) But I know that enumerating USB devices in windows is PITA, not only due to that stupid caching we hit in the usb-audio gadget case. My 2cents it will behave differently on another windows laptop :-)
  Reply With Quote
Old 2nd September 2019, 07:57 PM   #76
Dave Bullet is offline Dave Bullet  New Zealand
diyAudio Member
 
Join Date: Jan 2002
Location: Wellington, New Zealand
@Charlie, I've been following your various posts with interest.

My ultimate plan is to have the following sources:
- Sony Android TV - I'm hoping this can output digital audio somehow - ideally USB out
- Streaming service (radio / spotify etc...)
- Local SSD media - FLAC/MP3

All feeding into a Pi operating the following:
- Dynamically selected EQ or crossover when local SSD media is being played
- 8-channel DAC
- Digital volume control
optional:
- Volume level normalisation
- "Bit perfect / pure mode"

I can physically connect the Pi to the sources - so am not required to WiFi /bluetooth or otherwise stream wirelessly

the dynamic EQ / crossover is required currently as some music I like does not sound good on my speakers.

I currently have alsaeq (?) running on an Archlinux based distro called Archphile outputting to your conventional 2-channel HAT DAC feeding an analogue chain and passive speakers (and dynamically selected EQ works listening to track changes on MPD.

I've been reading your excellent ACD LADSPA plug in tutorials and playing around with the view for my next speaker being fully active.
__________________
"Usual diyaudio train wreck of dubious drivers and just the crossover to sort out. Well, how are you on crossovers and modelling? Pretty green, I reckon" - system7 (Steve)
  Reply With Quote
Old 3rd September 2019, 04:13 PM   #77
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
I have posted my initial release of the scripts used to stream audio from the host PC to the Pi, and an installation/directions/HOW-TO. These documents are attached.

It would be great for someone to try this out and then post here about it. If any problems arise please let me know.


.
Attached Files
File Type: zip Playback Windows Audio on a Pi4 over USB ver1.zip (6.4 KB, 85 views)
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 4th September 2019, 07:20 PM   #78
JukkaM is offline JukkaM
diyAudio Member
 
Join Date: Jun 2017
Hi Charlie!

I've also been planning on almost exactly the same as you. I downloaded the zip, I may be able to give it a try on my RPI4 over the weekend.

It's a shame that g_audio doesn't work with Windows, it would be a necessity for me. UAC is a future proof way to deal audio streaming, since usb-audio has gained much popularity over the years. I wouldn't be surprised if usb replaced spdif as digital audio interconnect over short distances. That in mind RPI4 with working UAC would be pluggable to other such devices.

The world is full of streaming software for multiple platforms. If g_audio isn't working as expected, wouldn't it really be easier to use ethernet through LAN? Wouldn't that also make it easier to stream audio from multiple sources, like mobile devices?
  Reply With Quote
Old 4th September 2019, 09:16 PM   #79
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Hi Jukka!

Quote:
Originally Posted by JukkaM View Post
I've also been planning on almost exactly the same as you. I downloaded the zip, I may be able to give it a try on my RPI4 over the weekend.
Yes, please try it. Let me know how it works out for you, if you have any trouble, etc. I would like to know.

Quote:
Originally Posted by JukkaM View Post
It's a shame that g_audio doesn't work with Windows, it would be a necessity for me. UAC is a future proof way to deal audio streaming, since usb-audio has gained much popularity over the years. I wouldn't be surprised if usb replaced spdif as digital audio interconnect over short distances. That in mind RPI4 with working UAC would be pluggable to other such devices.
I agree, if g_audio would work perfectly I would focus my effort on that. Phofman and I tried a few simple modifications to the code but there were still some problems. He is trying to see if anyone at alsa-devel can help him figure out how to implement some fixes in the UAC2 kernel module, etc. I am hopeful that sometime in the future, this will be the better way to go. For now, at least under Windows, it is not working and so my approach is the only viable one.

Quote:
Originally Posted by JukkaM View Post
The world is full of streaming software for multiple platforms. If g_audio isn't working as expected, wouldn't it really be easier to use ethernet through LAN? Wouldn't that also make it easier to stream audio from multiple sources, like mobile devices?
Well, what I am doing is exactly that: streaming over ethernet. It's just that the particular ethernet connection I am using happens to be via the USB ethernet gadget.

Let me give you the background: I like to do DSP under Linux using LADSPA and Gstreamer. I wrote a complicated helper app for Gstreamer (it's a large script) that constructs pipelines based on used input files. It can stream to multiple locations and can implement DSP at the endpoints, e.g. on other small Linux boxes a la Raspberry Pi and that kind of thing. I have always wanted to do something similar under Windows, but my helper app is a bash script. Since I wanted to be able to playback audio locally, the WSL (Ubuntu under Windows) isn't helpful because you do not have any access to audio devices. Many people are comfortable with the concept of a DAC - an external USB device to which they send audio from their computer. When I learned that the Pi 4 could implement the USB ethernet gadget I thought "why not connect the Pi 4 like a DAC, stream audio to it, and do DSP on it before the D-to-A conversion?". That was the idea behind this project.

The nice thing is that what I have come up with can ALSO be used to stream over your LAN. It makes no difference to Gstreamer whether it is streaming over a local USB-ethernet connection, or to some other IP address of a machine on your LAN. As long as you can supply a fixed IP address, Gstreamer will send the audio there. On the RX machine, the exact same bash script can be used to receive the audio. Also, if you want to send from the Windows machine to multiple endpoints, and keep them in sync, it is a simple matter to add more endpoint IP addresses to the Gstreamer command. My Gstreamer helper app does all of this automatically, but it is not too difficult (once you understand Gstreamer) to hand write the pipeline to do what you want.

There are also other variation that I hope to explore in the near future. One of these is to set up Gstreamer's input to be a uPnP endpoint. You can then discover this on your LAN, e.g. from your phone or other device, and send audio to it. Gstreamer would turn around and stream it out over your LAN to the endpoint(s) that you give it. There are many interesting possibilities!
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 5th September 2019, 01:21 PM   #80
mhelin is offline mhelin
diyAudio Member
 
Join Date: Apr 2003
Location: Tampere Finland Europe
Does RPi HDMI really support 24-bit audio? Last time (Oct-2018) I asked the answer was no. Apparently the HDMI audio could on Pi could really support 24-bit PCM and some their developer wrote on github issue that they had added it but later removed because of some incompatibility issues with some device.

At least in 4.19 there isn't support for 24-bit format:
linux/bcm2835-pcm.c at rpi-4.19.y * raspberrypi/linux * GitHub
(they have oddly moved the driver under vc04_services).

This may be too early for 5.3:
linux/bcm2835-pcm.c at rpi-5.3.y * raspberrypi/linux * GitHub

No 24-bit support (yet).

There is this issue:
Alsa driver limited to 16-bit / 48kHz audio files * Issue #494 * raspberrypi/linux * GitHub

Last edited by mhelin; 5th September 2019 at 01:33 PM.
  Reply With Quote

Reply


using a Raspberry Pi 4 as a USB DSP-DACHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DAC for Raspberry Pi LaxAnErde Digital Line Level 41 5th October 2020 06:22 AM
My DAC for the Raspberry Pi usul27 Digital Line Level 157 16th July 2020 12:17 PM
SRC hat for Raspberry Pi DRONE7 PC Based 2 26th March 2019 06:46 PM
I2s DAC + XLR for Raspberry pi? JonesySA PC Based 6 6th May 2018 11:01 PM
DSP for the Raspberry Pi usul27 Digital Line Level 39 30th August 2016 07:29 AM


New To Site? Need Help?

All times are GMT. The time now is 07:18 AM.


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