IAtaman
Major Contributor
- Joined
- Mar 29, 2021
- Messages
- 2,515
- Likes
- 4,562
For roughly $30, half an hour of your time and some opensource freeware, you can get a USB in USB out digital equalizer that you can use with any digital source and DAC.
There are quite a few options out there for hardware and software choices, but the one I personally find most convenient and easy is OrangePi Zero2, Armbian, CamillaDSP combination. Here is a rough reference guide on how to make that combination work.
@DeLub has written a very nice guide as to how to use RPi for the same purpose, and this reference is very much inspired by that guide. The reasons why I prefer Orange Pi Zero2 to RPI alternatives are:
A few disclaimers before we finally get started so that I don't get Tektoned later on:
Back to the topic on hand...
Hardware
For starters, you will need an Orange Pi Zero2 and a Micro SD card.
Aliexpress link I used to buy the OrangePi Zero2 is here. You can use that or search on the site - there might be better offers at the time you are buying. Amazon might be offering Zero2 where you live as well. Please note this is tested with Zero2 only, and might not work with Zero2W, on the account that Zero2W does not seem to have OTG support. Here is a reference image of what you want to buy for sake of good measure.
For micro SD card, anything larger than 4Gb should do the trick I think. I use SanDisk 32Gb ones for these tasks as they are easy to find and cheap - even cheaper than lower capacity ones currently. They are $7 a piece on Amazon now.
You will also need a cable to connect your source to Pi Zero2, and another cable to connect Pi Zero2 to your DAC. I am assuming the DAC cable came with the DAC, and you'll have a USB A to USB-C cable lying around anyway. If not, you need to buy them as well.
You might also need a micro SD Card reader if your computer does not have one. Any reader that is compatible with the computer you use will be fine.
Finally, you will need to use the screen for the inital config of Armbian, and you will need a mini HDMI to HDMI (or DP if that is what your monitor uses) cable to be able to connect the Zero2 to a monitor. This will only be required once during install time, and maybe later on if for a reason Zero2 is no longer connected to your Wifi. Otherwise everything else can be done via ssh from your main computer, be it Mac, PC or Linux.
Optionally, you can also get a tiny aluminum heatsink for the tiny H616 SoC. You don't need to as we will not be even close to sweating the processor, but you can If you want. Dimensions of the SoC is 14x14mm (that is 0.55x0.55 in freedom units). Here is a link to a random one on Amazon.
And that is pretty much all the hardware required..
Software
For this to work, you will basically need 3 pieces of software - a stable operating system, a DSP software and a way to control the DSP.
For operating system, I used Armbian available at the link here. It is a recent kernel at the time of writing (6.6.16), work headlessly (is that a word?) and is quite lightweight. I use Jammy. Bookworm should also be fine.
You will need to download and expand the image, and burn it on the micro SD card. I personally use BalenaEtcher to do that, but any software will do fine.
Once the image is on the SD card, plug it into Zero2, connect it to HDMI, to your keyboard and to power, and boot it up. Once you configure some basic info, Armbian should be good to go. It will also help you connect to your WiFi so make sure you got your WiFi password ready. Once its all configured, check your ip address with
Edit Note:
With CamillaNode v2, there is a much simpler way to do do all these to install both CamillaNode and CamillaDSP. Check out this post from later down the thread.
For DSP, I am using the wonderful CamillaDSP. There are other options out there, but none better I think.
@mdsimon2 has a amazing tutorial on how to install CamillaDSP on RPi4. Here is the link to that. I would recommend you to read that as it is a great reference for anyone who is interested in these topics.
For the rest of this basic reference, I will explain what I did to make CamillaDSP and CamillaNode work. I will bulldoze over and omit many details and options to make reference as simple as possible. If you want to make different choices, please ask and I, and most likely others, will try and help as much as we can.
Before I forget, CamillaNode is written by me. It is one, a non-offical way to control CamillaDSP, specifically built to function somewhat similarly to Peace. CamillaDSP also has an official UI which mdsimon2 expalains how to install as well, if that is what you prefer. For my use case, I obviously prefer CamillaNode.
Enabling USB Audio Gadget
Open modules file with the text editor with
Create a text file with
That's it. Reboot and check if all is fine with
Installing CamillaDSP
Create a camilladsp folder, download the app and extract it to common binaries folder:
Important! Currently, CamillaNode does not support CamillaDSP v2.x. I will update it so that it will in the future. As I prefer to use CamillaNode as the control interface, I am still using 1.x version of CamillaDSP. If you do not intend to use CamillaNode, I recommend you to use the latest version, which is 2.0.3 at the time of writing this. In that case replace the URL for
Create a camilladsp.service file to start CamillaDSP at boot time:
Copy paste the below text. Do not forget to change the USERNAME with the username you have created when installing Armbian.
Enable the service so that it automatically starts at boot time by
This assumes you have a default.yml file in /home/USERNAME/camilladsp folder which will be the config file on startup. It enables the websocket server on port 1234, and binds it to all network interfaces so that you can access it via your home network as well. It also creates a log file called camilladsp.log so you can check what is the problem if something goes wrong, and starts CamillaDSP with -6dB volume filter, because we all forget the bring the volume down when we turn off stuff at times.
You can find more info on what each parameter does on the CamillaDSP github page linked.
Default config file can be created with
One thing you will need to change (unless you are using D30 Pro that is) is the
Connect your DAC to the Zero2 via USB, make sure DAC is on and USB input is selected. Then check the device name with
Mine looks like this:
I used Pro as that is the name of the device in my system. Use whatever is the name of your DAC in yours in
Installing CamillaNode
First thing first - make sure you have npm installed. You can check that by typing
First run
For reference, npm is the Packet Manager for Node.js.
Once that is done, create a camillanode folder in your home folder, that is, /home/USERNAME/camillanode. Change to that directory and do the following:
It will work if you have git installed (you most likely will). If not install it with
This will download and install CamillaNode to your computer.
To make sure it runs at start-up, you will have to create a service. You can do that by creating a service text file with
Again, do you forget to change USERNAME to the username you chose when configuring Armbian.
Enable the service so that it starts automatically on start up time by
That's it. You are done. Congratulations! If everything worked as intended, you should be able use your EQ solution now.
I'd do the following to make sure all is well:
Check camilladsp log with
Open a webrowser and type IP address of your Zero2 to see if you can access the webserver. Make sure you type ot with http, as in, if the IP address of Zero2 is 192.168.0.100, you type
Rest should be easy.
Hope this was helpful to you and if any questions, please don't hesitate to ask.
Links shared throughout the document
https://www.audiosciencereview.com/...between-an-usb-source-ipad-and-usb-dac.25414/
https://www.aliexpress.com/item/1005006168374134.html
https://www.amazon.com/SanDisk-128GB-microSDXC-Memory-Adapter/dp/B08GY9NYRM/
https://www.amazon.com/Heatsink-8-8x8-8x5mm-0-35x-035x0-2-Conductive-Dissipation/dp/B07ZC68LNM/
https://www.armbian.com/orange-pi-zero-2/
https://etcher.balena.io/
https://github.com/HEnquist/camilladsp
https://www.audiosciencereview.com/forum/index.php?threads/rpi4-camilladsp-tutorial.29656/
https://www.audiosciencereview.com/...ternative-to-control-camilladsp-as-peq.44745/
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-2.html
There are quite a few options out there for hardware and software choices, but the one I personally find most convenient and easy is OrangePi Zero2, Armbian, CamillaDSP combination. Here is a rough reference guide on how to make that combination work.
@DeLub has written a very nice guide as to how to use RPi for the same purpose, and this reference is very much inspired by that guide. The reasons why I prefer Orange Pi Zero2 to RPI alternatives are:
- its much cheaper, more readily available and much less of an overkill than both RPi 4 or RPi 5.
- it does not require any additional hardware to seperate power and data in as it can be powered by the digital source it is connected.
- it is relatively smaller, consuming less space on the desk physically.
A few disclaimers before we finally get started so that I don't get Tektoned later on:
- I am not a Linux expert. Not even close. If you can think of a better way of doing something, please let me and others know. No offense taken.
- All of this is provided as-is without any guarantees, try it at your own risk.
- I do not have any affiliation with any ecommerce platform and the links are NOT affiliate links. I refered to Aliexpress and Amazon as they are readily available and widely used all around. Feel free to buy the hardware wherever you want.
Back to the topic on hand...
Hardware
For starters, you will need an Orange Pi Zero2 and a Micro SD card.
Aliexpress link I used to buy the OrangePi Zero2 is here. You can use that or search on the site - there might be better offers at the time you are buying. Amazon might be offering Zero2 where you live as well. Please note this is tested with Zero2 only, and might not work with Zero2W, on the account that Zero2W does not seem to have OTG support. Here is a reference image of what you want to buy for sake of good measure.
For micro SD card, anything larger than 4Gb should do the trick I think. I use SanDisk 32Gb ones for these tasks as they are easy to find and cheap - even cheaper than lower capacity ones currently. They are $7 a piece on Amazon now.
You will also need a cable to connect your source to Pi Zero2, and another cable to connect Pi Zero2 to your DAC. I am assuming the DAC cable came with the DAC, and you'll have a USB A to USB-C cable lying around anyway. If not, you need to buy them as well.
You might also need a micro SD Card reader if your computer does not have one. Any reader that is compatible with the computer you use will be fine.
Finally, you will need to use the screen for the inital config of Armbian, and you will need a mini HDMI to HDMI (or DP if that is what your monitor uses) cable to be able to connect the Zero2 to a monitor. This will only be required once during install time, and maybe later on if for a reason Zero2 is no longer connected to your Wifi. Otherwise everything else can be done via ssh from your main computer, be it Mac, PC or Linux.
Optionally, you can also get a tiny aluminum heatsink for the tiny H616 SoC. You don't need to as we will not be even close to sweating the processor, but you can If you want. Dimensions of the SoC is 14x14mm (that is 0.55x0.55 in freedom units). Here is a link to a random one on Amazon.
And that is pretty much all the hardware required..
Software
For this to work, you will basically need 3 pieces of software - a stable operating system, a DSP software and a way to control the DSP.
For operating system, I used Armbian available at the link here. It is a recent kernel at the time of writing (6.6.16), work headlessly (is that a word?) and is quite lightweight. I use Jammy. Bookworm should also be fine.
You will need to download and expand the image, and burn it on the micro SD card. I personally use BalenaEtcher to do that, but any software will do fine.
Once the image is on the SD card, plug it into Zero2, connect it to HDMI, to your keyboard and to power, and boot it up. Once you configure some basic info, Armbian should be good to go. It will also help you connect to your WiFi so make sure you got your WiFi password ready. Once its all configured, check your ip address with
ip a
and you can disconnect the keyboard and HDMI. Rest can be done via ssh from your main computer.Edit Note:
With CamillaNode v2, there is a much simpler way to do do all these to install both CamillaNode and CamillaDSP. Check out this post from later down the thread.
For DSP, I am using the wonderful CamillaDSP. There are other options out there, but none better I think.
@mdsimon2 has a amazing tutorial on how to install CamillaDSP on RPi4. Here is the link to that. I would recommend you to read that as it is a great reference for anyone who is interested in these topics.
For the rest of this basic reference, I will explain what I did to make CamillaDSP and CamillaNode work. I will bulldoze over and omit many details and options to make reference as simple as possible. If you want to make different choices, please ask and I, and most likely others, will try and help as much as we can.
Before I forget, CamillaNode is written by me. It is one, a non-offical way to control CamillaDSP, specifically built to function somewhat similarly to Peace. CamillaDSP also has an official UI which mdsimon2 expalains how to install as well, if that is what you prefer. For my use case, I obviously prefer CamillaNode.
Enabling USB Audio Gadget
Open modules file with the text editor with
sudo nano /etc/modules
and add g_audio
to the end of it it before saving and closing. Basically this will ensure that g_audio module will be loaded at boot time.Create a text file with
sudo nano /etc/modprobe.d/usb_g_audio.conf
, add options g_audio c_srate=48000 c_ssize=4
and save and close it. This sets the sampling rate to 48KHz and bit depth to 32bits.That's it. Reboot and check if all is fine with
arecord -l
. You should see something like this:
Bash:
**** List of CAPTURE Hardware Devices ****
card 0: UAC2Gadget [UAC2_Gadget], device 0: UAC2 PCM [UAC2 PCM]
Subdevices: 0/1
Subdevice #0: subdevice #0
Installing CamillaDSP
Create a camilladsp folder, download the app and extract it to common binaries folder:
Bash:
mkdir camilladsp
cd camilladsp
wget https://github.com/HEnquist/camilladsp/releases/download/v1.0.3/camilladsp-linux-aarch64.tar.gz -P ~/camilladsp/
sudo tar -xvf ~/camilladsp/camilladsp-linux-aarch64.tar.gz -C /usr/local/bin/
Important! Currently, CamillaNode does not support CamillaDSP v2.x. I will update it so that it will in the future. As I prefer to use CamillaNode as the control interface, I am still using 1.x version of CamillaDSP. If you do not intend to use CamillaNode, I recommend you to use the latest version, which is 2.0.3 at the time of writing this. In that case replace the URL for
wget
above, with the URL below:
Bash:
https://github.com/HEnquist/camilladsp/releases/download/v2.0.3/camilladsp-linux-aarch64.tar.gz
Create a camilladsp.service file to start CamillaDSP at boot time:
Bash:
sudo nano /etc/systemd/system/camilladsp.service
Copy paste the below text. Do not forget to change the USERNAME with the username you have created when installing Armbian.
Rich (BB code):
[Unit]
Description=CamillaDSP Daemon
After=syslog.target
StartLimitIntervalSec=10
StartLimitBurst=10
[Service]
Type=simple
ExecStart=camilladsp /home/USERNAME/camilladsp/default.yml -g-6 -a 0.0.0.0 -o /home/USERNAME/camilladsp/camilladsp.log -p 1234
Restart=always
RestartSec=3
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=camilladsp
User=root
Group=root
CPUSchedulingPolicy=fifo
CPUSchedulingPriority=10
[Install]
WantedBy=multi-user.target
Enable the service so that it automatically starts at boot time by
systemctl enable camilladsp
This assumes you have a default.yml file in /home/USERNAME/camilladsp folder which will be the config file on startup. It enables the websocket server on port 1234, and binds it to all network interfaces so that you can access it via your home network as well. It also creates a log file called camilladsp.log so you can check what is the problem if something goes wrong, and starts CamillaDSP with -6dB volume filter, because we all forget the bring the volume down when we turn off stuff at times.
You can find more info on what each parameter does on the CamillaDSP github page linked.
Default config file can be created with
sudo nano /home/USERNAME/camilladsp/default.yml
and contains the following text:
Rich (BB code):
devices:
samplerate: 48000
chunksize: 4096
enable_rate_adjust: true
capture:
type: Alsa
channels: 2
device: hw:UAC2Gadget,0
format: S32LE
playback:
type: Alsa
channels: 2
device: hw:Pro
format: S32LE
One thing you will need to change (unless you are using D30 Pro that is) is the
device: hw:Pro
part in playback section.Connect your DAC to the Zero2 via USB, make sure DAC is on and USB input is selected. Then check the device name with
aplay -l
Mine looks like this:
Bash:
**** List of PLAYBACK Hardware Devices ****
card 0: UAC2Gadget [UAC2_Gadget], device 0: UAC2 PCM [UAC2 PCM]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Pro [D30 Pro], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
I used Pro as that is the name of the device in my system. Use whatever is the name of your DAC in yours in
device: hw:DEVICENAME
format.Installing CamillaNode
First thing first - make sure you have npm installed. You can check that by typing
npm
in command line. If you got an error message saying npm: command not found
, you don't have npm installed.First run
sudo apt update
and sudo apt upgrade
then run sudo apt install npm
to install npm.For reference, npm is the Packet Manager for Node.js.
Once that is done, create a camillanode folder in your home folder, that is, /home/USERNAME/camillanode. Change to that directory and do the following:
Bash:
git init
git pull https://github.com/ismailAtaman/camillaNode.git
npm install
It will work if you have git installed (you most likely will). If not install it with
sudo apt install git
, and run the commands above.This will download and install CamillaNode to your computer.
To make sure it runs at start-up, you will have to create a service. You can do that by creating a service text file with
sudo nano /etc/systemd/system/camillanode.service
, pasting below text into it and saving it.
Rich (BB code):
[Unit]
Description=camillaNode Service
After=network.target
[Service]
User=root
Group=nogroup
ExecStart=/usr/bin/node /home/USERNAME/camillanode/index.js
WorkingDirectory=/home/USERNAME/camillanode/
Environment=PATH=/home/USERNAME/camillanode/
Restart=always
[Install]
WantedBy=multi-user.target
Again, do you forget to change USERNAME to the username you chose when configuring Armbian.
Enable the service so that it starts automatically on start up time by
systemctl enable camilladsp
That's it. You are done. Congratulations! If everything worked as intended, you should be able use your EQ solution now.
I'd do the following to make sure all is well:
Check camilladsp log with
cat /home/USERNAME/camilladsp/camilladsp.log
for errors.Open a webrowser and type IP address of your Zero2 to see if you can access the webserver. Make sure you type ot with http, as in, if the IP address of Zero2 is 192.168.0.100, you type
http://192.168.0.100
. If you don't, modern browsers defaults to https.Rest should be easy.
Hope this was helpful to you and if any questions, please don't hesitate to ask.
Links shared throughout the document
https://www.audiosciencereview.com/...between-an-usb-source-ipad-and-usb-dac.25414/
https://www.aliexpress.com/item/1005006168374134.html
https://www.amazon.com/SanDisk-128GB-microSDXC-Memory-Adapter/dp/B08GY9NYRM/
https://www.amazon.com/Heatsink-8-8x8-8x5mm-0-35x-035x0-2-Conductive-Dissipation/dp/B07ZC68LNM/
https://www.armbian.com/orange-pi-zero-2/
https://etcher.balena.io/
https://github.com/HEnquist/camilladsp
https://www.audiosciencereview.com/forum/index.php?threads/rpi4-camilladsp-tutorial.29656/
https://www.audiosciencereview.com/...ternative-to-control-camilladsp-as-peq.44745/
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-2.html
Last edited: