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 10th September 2019, 05:16 PM   #91
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by JukkaM View Post
Okey, here's an update.

I found a script called alsa-capabilities and it reported the following for my dac:
Code:
 1) USB Audio Class Digital alsa audio output interface `hw:1,0'
 - device name       = Audio
 - interface name    = USB Audio
 - usb audio class   = 2 - isochronous asynchronous
 - character device  = /dev/snd/pcmC1D0p
 - encoding formats  = S24_3LE
 - monitor file      = /proc/asound/card1/pcm0p/sub0/hw_params
 - stream file       = /proc/asound/card1/stream0
If I put "S24_3LE" to the Pi script, it will print "action: gstreamer pipeline launched at 09/10/19 18:57:22" in a loop and no sound. Reverted back to "S24LE".

Using lower than "96000" in sample rate results in "slowmotion" playback. This is the same wheter I put any default sample rate into settings of the Windows default playback device (mobo integrated soundcard). I restarted the Windows script in between and made no changes to it. Again no difference between "plughw:" and "hw:" prefixed audio devices. If I set Windows playback rate to any and pi rate 96k, the pace of the music normal, but original no bass, pan to right problems are still in effect. Maybe the Windows configs are not correct/don't change as they should?
The loop is Gstreamer failing because you tell it to use a format that is not known, and the script restarting it over and over. Gstreamer does not know the format "S24_3LE". Like I explained above, you must use the Gstreamer equivalent of S24LE in the Pi script.

You can check the supported sample rates for your DAC by typing:
Code:
aplay -D hw:1,0 --dump-hw-params /dev/zero
You will see info about supported rates and formats. Please post the output here.

What playback device is the default one under Windows? What is the format you selected for it? This video has an example of how to select the playback format:
YouTube
If the playback software can change the sample rate and audio format, perhaps to the native format of the file to be bit perfect, the audio will not sound correct.

Please, on your Windows machine, install VB-Cable and configure that as your default playback device. See:
VB-Audio Virtual Apps
Set both recording and playback of VB-Cable to the one you want (e.g. 24/96).

Also, plughw: allows ALSA to resample or reformat the audio that is being sent to the DAC by Gstreamer. That's is not needed, or wanted. I would instead stream in a format that the DAC already supports and use hw: instead.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 31st March 2020, 04:31 PM   #92
b_force is offline b_force  Europe
diyAudio Member
 
Join Date: Jan 2004
I was wondering if this project is still being kept active?

Lately I have been looking for a solution to use this solution (or similar) for bidirectional audio.
Essentially just 2 pairs audio in and 2 pairs audio out.

I was wondering if the audio part also works for Mac.
Also, is there some kind of easy manual somewhere?
I have been reading and digging through a lot of pages, but it's a little bit difficult to understand what exactly is possible and what not.
Besides bidirectional audio, is it also possible to send mutli-channel to be separated and send to other pi's as well?

Last edited by b_force; 31st March 2020 at 04:36 PM.
  Reply With Quote
Old 31st March 2020, 05:03 PM   #93
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by b_force View Post
I was wondering if this project is still being kept active?

Lately I have been looking for a solution to use this solution (or similar) for bidirectional audio.
Essentially just 2 pairs audio in and 2 pairs audio out.

I was wondering if the audio part also works for Mac.
Also, is there some kind of easy manual somewhere?
I have been reading and digging through a lot of pages, but it's a little bit difficult to understand what exactly is possible and what not.
Besides bidirectional audio, is it also possible to send mutli-channel to be separated and send to other pi's as well?
I don't think bi-directional audio is possible. Not sure, because that is outside the scope of the project and I never thought to try it.

Forum member phofman could give you a better answer. He has more experiences with the USB-OTG interface in general and is familiar with the driver code.

Not to steer you elsewhere, but why not just buy a USB pro-audio interface? This will have very good recording and playback capabilites. Most modern ones are full duplex (can simultaneously record and play back audio).
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 31st March 2020, 05:39 PM   #94
b_force is offline b_force  Europe
diyAudio Member
 
Join Date: Jan 2004
Quote:
Originally Posted by CharlieLaub View Post
I don't think bi-directional audio is possible. Not sure, because that is outside the scope of the project and I never thought to try it.

Forum member phofman could give you a better answer. He has more experiences with the USB-OTG interface in general and is familiar with the driver code.

Not to steer you elsewhere, but why not just buy a USB pro-audio interface? This will have very good recording and playback capabilites. Most modern ones are full duplex (can simultaneously record and play back audio).
Thanks
Yeah, I am (well) aware of these USB interfaces.
The idea is to make something similar from scratch (just for fun) that's a bit more capable.
So this whole project basically ticks all the marks.

Another way would be using an audio over ethernet solution.
With a 100mbit port there is plenty over bandwidth.
I am not quite sure yet how virtual cable (and the like) will handle that.
Plus practically it will like the same; usb to ethernet adapeter -> ethernet cable -> ethernet port.

That's why I thought gadget mode option would be a little easier.

I worked out pretty much every alternative as well, but these two (ethernet and gadget mode) are what I keep coming back to over again.
  Reply With Quote
Old 31st March 2020, 09:34 PM   #95
phofman is online now phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
The UAC2 gadget is duplex, each direction is basically independent (any samplerate/channels, formats).

Current status - fixed maximum throughput in both directions. I am not sure my patches are already included, the linux-usb mailing list has a bit unusual policy for picking patches compared to the very organized alsa-devel.

The remaining issues (nice handling of the alsa devices and async mode) are still on my TODO list. Perhaps the async mode could be implemented by a very capable driver professional, I will have to revive the discussion 'Re: usb:gadget:f_uac2: EP OUT is adaptive instead of async' - MARC
  Reply With Quote
Old 3rd April 2020, 06:27 PM   #96
b_force is offline b_force  Europe
diyAudio Member
 
Join Date: Jan 2004
Quote:
Originally Posted by phofman View Post
The UAC2 gadget is duplex, each direction is basically independent (any samplerate/channels, formats).

Current status - fixed maximum throughput in both directions. I am not sure my patches are already included, the linux-usb mailing list has a bit unusual policy for picking patches compared to the very organized alsa-devel.

The remaining issues (nice handling of the alsa devices and async mode) are still on my TODO list. Perhaps the async mode could be implemented by a very capable driver professional, I will have to revive the discussion 'Re: usb:gadget:f_uac2: EP OUT is adaptive instead of async' - MARC
Thanks, what about latency?
  Reply With Quote
Old 3rd April 2020, 06:56 PM   #97
phofman is online now phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Latency is related to three alsa interfaces in the chain instead of just one. It is not for tasks where jackd would normally be used.

On the other hand, people voluntarily use 0.7s hardware FIFOs (all the RPi "improvers") and are happily paying for it.
  Reply With Quote
Old 30th April 2020, 06:01 AM   #98
phofman is online now phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Gadgets based on RPi really gain momentum. Here is a driver for USB-display gadget out of RPi from yesterday

Generic USB Display Driver Published For Linux - Allowing Nifty Possibilities With Raspberry Pi, Etc - Phoronix
  Reply With Quote
Old 2nd July 2020, 05:46 AM   #99
b_force is offline b_force  Europe
diyAudio Member
 
Join Date: Jan 2004
Quote:
Originally Posted by phofman View Post
Gadgets based on RPi really gain momentum. Here is a driver for USB-display gadget out of RPi from yesterday

Generic USB Display Driver Published For Linux - Allowing Nifty Possibilities With Raspberry Pi, Etc - Phoronix
Is this also going to work when using Windows (or Mac)?
  Reply With Quote
Old 2nd July 2020, 06:21 AM   #100
phofman is online now phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
IMO the protocol is not standardized and the patch includes only linux host driver Generic USB Display driver [LWN.net]
  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 10:33 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