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 18th August 2019, 07:36 AM   #11
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Very well, you have made great progress.

IMO the USB-audio path is more logical and therefore better. The gadget driver was developed by/for Samsung, very likely for Android. They probably care about optimal quality, not about consumer audio standards.

No surprise the windows driver got stuck, quite typical for that OS. You may be able to find some logs, why it happened, maybe. Perhaps 96k/32bits is not supported by the windows driver, who knows. What does lsusb -v say?

Switching samplerate is not implemented, the driver is more like a proof of concept. But adding such feature would be VERY useful. Maybe you could ask the author of the module (in the source code).
  Reply With Quote
Old 18th August 2019, 09:03 AM   #12
DRONE7 is offline DRONE7  New Zealand
diyAudio Member
 
Join Date: Aug 2008
Quote:
Originally Posted by CharlieLaub View Post
I followed the Adafruit guide. I made some good progress and then started to hit some serious snags when I tried to set up a fixed IP address for the USB Ethernet gadget connection. I need to do this so that I can ssh into the Pi from another computer. If you do not set up a fixed IP address at boot time, the Pi will assign a random address in the 192.254.X.X range. This address will change after each boot, so you would not be able to know it in advance. The IP address is needed to ssh into the Pi (I can't use Bonjour) and unless, like I was, you were also logged into the machine with keyboard mouse and screen all connected this might create an impasse.
arpscan ? or are you wanting discovery to be completely automated ?
or could you not set a reserved address rather than static ?
  Reply With Quote
Old 18th August 2019, 01:11 PM   #13
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by phofman View Post
Very well, you have made great progress.

IMO the USB-audio path is more logical and therefore better. The gadget driver was developed by/for Samsung, very likely for Android. They probably care about optimal quality, not about consumer audio standards.

No surprise the windows driver got stuck, quite typical for that OS. You may be able to find some logs, why it happened, maybe. Perhaps 96k/32bits is not supported by the windows driver, who knows. What does lsusb -v say?

Switching samplerate is not implemented, the driver is more like a proof of concept. But adding such feature would be VERY useful. Maybe you could ask the author of the module (in the source code).
As part of my experimentation and troubleshooting of the audio gadget problems I came across a feature request for the support of multiple sample rates. I too thought that perhaps 32/96 might be a problem so I tried it again with 16/44.1 and the problem remained. Without much further info to go on, I gave up and switched to the ethernet gadget mode.

I agree that the audio gadget mode would be simpler and more in the vein of what I am trying to accomplish, even if there is only one format and rate supported. Any help on this would be appreciated. I do not really know how to get detailed info out of Windows about this problem. I might look into it again today and see if I can find any tips on the web.

Edit: The link below is a post about the same problem I am experiencing. It seems to Windows specific:
linux audio gadget (USB audio class 2) not completing enumeration on Win 10 Creator's Edition?
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins

Last edited by CharlieLaub; 18th August 2019 at 01:18 PM.
  Reply With Quote
Old 18th August 2019, 01:14 PM   #14
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by DRONE7 View Post
arpscan ? or are you wanting discovery to be completely automated ?
or could you not set a reserved address rather than static ?
The way the ethernet gadget is set up now, it is assigned a static IP address, etc. Each time I boot, and then run ifconfig or fire up the GUI desktop, the wired ethernet would have an IP in the 192.254.x.x range, even if the usb gadget had not yet been connected. My guess is that there cannot be two concurrent networks with very different IP ranges.

I did not figure out a way to have the Pi's networking sort this out.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 18th August 2019, 01:30 PM   #15
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
I found this bug report that describes a problem with the Linux UAC2 driver:
UAC2 gadget not recognized on Windows 10 — Linux USB
The problem occurred under kernel 4.9.68. Maybe kernel 5.x.x has a fix.

The quote below describes the source of the driver error:

Quote:
Apparently there is an issue with the Linux UAC 2.0 driver that was identified early last year (2018) but has not been fixed yet.

Basically, as quoted:

an isochronous OUT ep with asynchronous synchronization is required
(at least by Microsoft) to have a feedback IN ep, to be able to report
to the host the rate so no under- or overrun condition occurs.


The Linux UAC2 driver does not provide this and hence the Microsoft driver will not start. So until the Linux UAC2 developers make some changes your Linux UAC2 gadget will not speak to a Windows 10 machine. It doesn't appear to have been any work on this for over a year.
The gadget will reportedly work under other OSes, e.g. Mac or Linux.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 18th August 2019, 01:34 PM   #16
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
My 2 cents Network Manager is switching your interfaces. You might want to avoid NM for your fixed ethernet (with fixed configuration in /etc/network/interfaces) and let NM handle only the dynamically added USB-ethernet. Or avoid NM altogether so that it does not get under your hands.
  Reply With Quote
Old 18th August 2019, 01:40 PM   #17
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by phofman View Post
My 2 cents Network Manager is switching your interfaces. You might want to avoid NM for your fixed ethernet (with fixed configuration in /etc/network/interfaces) and let NM handle only the dynamically added USB-ethernet. Or avoid NM altogether so that it does not get under your hands.
The ethernet USB gadget connection must be assigned a fixed ip address at boot. How do you suggest doing that?

I tried adding lines for that into /etc/network/interfaces (following the Adafruit tutorial) and then later as an entry in /etc/dhpcp.conf following another page. Both produced the same behavior. In the end I deduced what was going on (to the best of my ability) and then booted up with all interfaces disconnected. When I plugged in the ethernet gadget to a host, it worked.

It might be just be a matter of configuration for dual networks on the Pi.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 18th August 2019, 01:46 PM   #18
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Ad usb-audio gadget. While the requirement for feedback in async mode in general is understandable, it is also understandable linux/osx drivers do not require it. For capture (data being transfer from the device to the host) the feedback has no use - data transfer is timed by the device side and all data coming in are processed, no reason for the device to signal the exact rate to the host, host is sending no audio data. Clearly linux/OSX are reasonable, MS as always is making troubles.

I do not think that endpoint is already implemented History for drivers/usb/gadget/function/f_uac2.c - torvalds/linux * GitHub
  Reply With Quote
Old 18th August 2019, 02:10 PM   #19
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
PROBLEM SOLVED!

Well, the problem with the ethernet gadget at least...

I discovered some useful info on this page:
networking - Can I prevent a default route being added when bringing up an interface? - Unix & Linux Stack Exchange

Adding "nogateway" as the last line in my static route declaration in /etc/dhcpc.conf file for the usb0 interface solved the problem. The Pi now can boot up with the wired ethernet connected and both it and the USB gadget are correctly configured and work perfectly.

So, the USB ethernet gadget connection option is looking more promising now. Since the USB audio gadget connection doesn't work under Windows I will put that aside for now.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 18th August 2019, 03:05 PM   #20
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Two default gateways is a very common problem when two DHCP-configured interfaces are used. Good luck with your endeavour.
  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 40 15th May 2019 04:00 AM
SRC hat for Raspberry Pi DRONE7 PC Based 2 26th March 2019 07:46 PM
I2s DAC + XLR for Raspberry pi? JonesySA PC Based 6 7th May 2018 12:01 AM
My DAC for the Raspberry Pi usul27 Digital Line Level 156 30th April 2017 12:10 AM
DSP for the Raspberry Pi usul27 Digital Line Level 39 30th August 2016 08:29 AM


New To Site? Need Help?

All times are GMT. The time now is 11:39 AM.


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