• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Using a Raspberry Pi as equaliser in between an USB source (iPad) and USB DAC

Hey guys just wanted to pop in and say thank you to @DeLub @phofman @HenrikEnquist for the work on gadget mode. I followed the instructions in this post to upgrade the Raspberry Pi OS kernel to 5.18 and implement gadget mode with CamillaDSP. Works great using a 2015 MacBook Pro.

Michael
 
I'm using this setup with my Windows PC for a while now but constantly get pops and clicks. I tested different sample rates, chunksizes and reducing a few dB of volume in EQ Apo but nothing solves this issue.
This also happens rather unpredictably. I sometimes don't get any clicks but have constant clicks and pops other times.

I also loose connection for a few seconds to the Pi on some occasions. The output will then switch to my other DAC and back to the Pi in that case.

I never get any pops and clicks when streaming to the Pi via Shairport (airplay 1) or Librespot (spotify connect) directly so it has to be a Windows or UAC Gadget issue.

Any ideas what I could do about it?
 
One of my USB cables causes constant clicks/delivery problems with USB2 devices (USB1 running OK). The other cables are OK. I would suggest to try a different cable.

What is the audio buffer size in the host and gadget?

What RPi version do you use?
 
One of my USB cables causes constant clicks/delivery problems with USB2 devices (USB1 running OK). The other cables are OK. I would suggest to try a different cable.

What is the audio buffer size in the host and gadget?

What RPi version do you use?
Rpi4 with the newest version of Ubuntu Server.
I‘m not sure about the buffer sizes. I‘ll try a few different cables.
 
I would recommend to try raspbian. IIRC Ubuntu server uses vanilla kernel. Raspbian kernel uses e.g. modified RX buffer size for the gadget, to fit maximum USB isochronous packet size. There may be more differences.

The buffer/period sizes are important. On the gadget size they are derived from chunksize in CDSP (buffer size = 2x chunksize, period = buffer / 8 fixed). The longer the better. On windows - depends on your player - what SW chain do you have?
 
I also bought this thingie:

View attachment 144819
Hi
I am struggling to find this in my regular pi shops in EU. Either don't have it or it is out of stock. Can someone point me in the direction of an Ali or Amazon alternative likely to work? Thanks.

edit: ok, found one in ali. Crossing fingers it doesnt burn something:
 
Last edited:
Hi
I am struggling to find this in my regular pi shops in EU. Either don't have it or it is out of stock. Can someone point me in the direction of an Ali or Amazon alternative likely to work? Thanks.
At the moment you can’t really get a RPi anywhere. There are some alternative SBCs like the Orange Pi or Banana Pi which should work as a DSP machine as well but probably don’t allow for USB inputs.
If you find the pi available somewhere it’ll probably be 120€+
 
At the moment you can’t really get a RPi anywhere. There are some alternative SBCs like the Orange Pi or Banana Pi which should work as a DSP machine as well but probably don’t allow for USB inputs.
If you find the pi available somewhere it’ll probably be 120€+
Hi Julian,
I was referring to the usb-c data/power splitter. I see now that the picture wasn't copied to my post, only the link to it. Sorry for that.
Are you using the same than in post #1?
 
Hi Julian,
I was referring to the usb-c data/power splitter. I see now that the picture wasn't copied to my post, only the link to it. Sorry for that.
Are you using the same than in post #1?
Oh okay. I recently bought this one on berrybase which is apparently out of stock now. I guess any other usb c power splitter should work
 
  • Like
Reactions: MCH
rise from your grave

can something similar be done using normal analog audio? maybe a cheap usb "microphone" card to capture the audio using p2 or rca and outputting from the p3 jack? (i got a pi3a, that smaller version)

capture the audio, enable that funcion that let's you hear the microphone (windows has this, linux must have it too) but equalize the global output, therefore, equalizing whatever is being captured
 
rise from your grave

can something similar be done using normal analog audio? maybe a cheap usb "microphone" card to capture the audio using p2 or rca and outputting from the p3 jack? (i got a pi3a, that smaller version)

capture the audio, enable that funcion that let's you hear the microphone (windows has this, linux must have it too) but equalize the global output, therefore, equalizing whatever is being captured
You mean take one of the audio interfaces with both ADC and DAC like the ones from Focusrite, MOTU, Behringer etc. using the ADC for the CamillaDSP input and the DAC for the output? It certainly ought to work - I'm not sure if it's been explicitly covered in one of the other threads or not.
 
You mean take one of the audio interfaces with both ADC and DAC like the ones from Focusrite, MOTU, Behringer etc. using the ADC for the CamillaDSP input and the DAC for the output? It certainly ought to work - I'm not sure if it's been explicitly covered in one of the other threads or not.
i mean:

plug a generic usb audio adapter thingy that has audio input, to the raspberry pi (that hopefully raspberryPi OS detects, OTG won't even be necessary)
plug an audio source into it (my phone, my computer, whatever, using a P2 cable)
then use software like pulse effects or whatever works on arm, listening to that audio input and equalizing the sound
outputting that audio through the AV jack so i can connect it to my amplifier
 
Last edited:
i mean:

plug a generic usb audio adapter thingy that has audio input, to the raspberry pi (that hopefully raspberryPi OS detects, OTG won't even be necessary)
plug an audio source into it (my phone, my computer, whatever, using a P2 cable)
then use software like pulse effects or whatever works on arm, listening to that audio input and equalizing the sound
outputting that audio through the AV jack so i can connect it to my amplifier
Yes, it should be possible. I don't think anyone has written about that exact combination in any of the camilladsp threads so you will probably need to make some changes, not just follow the instructions. Some threads that might help:
As the input and output have different clocks you will need some sample rate conversion somewhere. CamillaDSP can do this on its input.
 
Is there a way to configure one of the USB A ports on Rpi4B as a USB inlet instead of the TypeC port?
 
Unfortunately that is not possible. The USB-C is connected to an OTG USB controller dwc2 built into the broadcom system-on-chip which can be switched between USB Host Controller (UHC) and USB Device Controller (UDC) modes. The USB-A ports are connected to an add-on PCI-e UHC VL805 which does not have the UDC funcionality.
 
Unfortunately that is not possible. The USB-C is connected to an OTG USB controller dwc2 built into the broadcom system-on-chip which can be switched between USB Host Controller (UHC) and USB Device Controller (UDC) modes. The USB-A ports are connected to an add-on PCI-e UHC VL805 which does not have the UDC funcionality.
Got it. Thank you.
 
Unfortunately that is not possible. The USB-C is connected to an OTG USB controller dwc2 built into the broadcom system-on-chip which can be switched between USB Host Controller (UHC) and USB Device Controller (UDC) modes. The USB-A ports are connected to an add-on PCI-e UHC VL805 which does not have the UDC funcionality.
They can be used as a USB host though. For example it is possible to connect a USB record player to the USB A port.
 
They can be used as a USB host though. For example it is possible to connect a USB record player to the USB A port.
Yes - the point is that those ports can only be host ports, unlike the USB-C one.
 
Does anyone know where to config the gaudio_ctl? I tried the config in the thread. And camilladsp does not seem to work after reboot. But if I modified the ExecStart line in /etc/systemd/system/camilladsp.service, (remove the gaudio_ctl"" part and keep what's inside the ""), camilladsp start without problem.
If I input what's in the ExecStart in the command line, it pops out the following:
Code:
sarieri@raspberrypi:~/gaudio_ctl$ gaudio_ctl -y "/usr/local/bin/camilladsp --loglevel error --port 1234 /usr/local/etc/camilladsp-96000.yml"

Ctl 'Playback Rate' not found, will not start playback exec

So I guess I might need to config the gaudio_ctl module a bit?
 
Back
Top Bottom