• 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!

RPi4 + CamillaDSP Tutorial

OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
Could you post a link to the default CamillaDSP config file?

There is no such thing as a default configuration.

You can try the attached configuration file. All I did was take a MOTU M4 streamer configuration and change the playback channels from 4 to 2 and the playback device to hw:Flex. You will need to remove the .txt from the end of the file.

Good luck!

Michael
 

Attachments

  • Flex_streamer_44c_96p_02072023.yml.txt
    1,009 bytes · Views: 39

Spezialtrick

Member
Joined
Jan 8, 2022
Messages
21
Likes
2
There is no such thing as a default configuration.

You can try the attached configuration file. All I did was take a MOTU M4 streamer configuration and change the playback channels from 4 to 2 and the playback device to hw:Flex. You will need to remove the .txt from the end of the file.

Good luck!

Michael
Now it's working somehow with "plughw:CARD=Flex"... But i've got big problems to get more than two output channels on my Flex to realize a 2.1 system. Do you have any idea?
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
Now it's working somehow with "plughw:CARD=Flex"... But i've got big problems to get more than two output channels on my Flex to realize a 2.1 system. Do you have any idea?

As mentioned previously to a USB host the Flex is a 2 channel playback device. If you want a 2.1 system you need to send 2 channels to the Flex and implement the channel routing / x-over in the Flex itself.

Michael
 

Spezialtrick

Member
Joined
Jan 8, 2022
Messages
21
Likes
2
As mentioned previously to a USB host the Flex is a 2 channel playback device. If you want a 2.1 system you need to send 2 channels to the Flex and implement the channel routing / x-over in the Flex itself.

Michael
So in summary the MiniDSP Flex is not useable with CamillaDSP, if you want to correct a 2.1 System or more.
 
Joined
Jan 9, 2023
Messages
87
Likes
30
I use a Hifiberry DAC+ ADC Pro HAT f...using an ALSA Loopback as the CamillaDSP capture device.

Michael
It may interest you to know I use Camilla with 2 OSes and 2 different DAC.
Henryk's DSP has been an eye opener both for monitoring on speakers and for headphones.

(It makes an old senn HD414, sound better than most modern offerings, once the right linkwitz detailed corrections are made!).
A HD650 with camilla behind it, sounds like night and day compared with the "raw" undoctored version.

One of my sytems uses the Linux x86 Raspi OS clone on a notebook with an old professional (AKM based) PC card from digigram.
It has balanced (4) XLR outputs and is quite good, in fact perfectly adequate for recording or working in any studio environment, with a good headphone amp inside too.
(unbelievably it's Linux on a USB stick..and easily cloneable.)

The other is using Ian Canada's dual mono sabre DAC HAT also with balanced XLR outputs.
The Canada Dac I got via Audiophonics is on top of a CM4 based Pi solution, and I could suggest is quite possibly one of the best DAC out there right now.
The CM4 is loads better than the vanilla RPi4.

Clearly a RPi has recording in its infancy, so it's only a playback device for hi bit rate stereo only.
 

Triliza

Senior Member
Forum Donor
Joined
Jun 23, 2021
Messages
481
Likes
578
Location
Europe
Is there any importance in the order various filters are arranged in the Pipeline tab in camillaDSP? I have gain, loudness and biquad (peaking) filters in the pipeline.
 

fatoldgit

Active Member
Joined
Feb 29, 2020
Messages
297
Likes
348
Just in case anyone is wondering, camilladsp works fine with Kodi, with the caveat that I run my Linux image with pulseaudio removed (i.e.
apt remove pulseaudio pulseaudio-utils). I HATE pulseaudio!!!.

There are very few Linux distro's that now allow you to remove pulseaudio without losing your GUI but Zorin is one and I use that for all my images (music and non-music) and its a real nice GUI to work with to boot... plus being based on Ubuntu its has whatever software you need one "apt" away.

I havent tested Kodi/Camilla with a system that has pulseaudio installed but disabled but I would imagine Kodi will still work ok with Camilladap.

Back to camilla and kodi.

After running sudo modprobe snd-aloop and starting camilladsp with a config that captures from the loopback and outputs to your DAC, you will see the loopback in the Kodi "audio devices" under the system config menu under settings.

1676071324330.png


Works well and is stable.

Now in regards to "bit perfect", Kodi (as far as my reading/experiments go) will upsample if the source file doesnt match the underlying "visible" OS sample rate.

Thus if your source files are a combo of rates (say 44.1k, 88.2k and 96k) then Kodi will potentially upsample any/all of these to match what it sees (being your camilladap capture rate in this case).

For me that's no an issue as all my files (by deliberate choice) are 44.1k but if you feel Kodi upsampling is poor then it aint the platform you are looking for (to paraphrase Star wars).

Cause I am a retired programmer, I have created my own GUI's for both LMS and Kodi, after looking at what was available in both and Kodi is definitely a better visual experience (given it has its own skinning language) and with my "one rate to rule them all" flac files, Kodi upsampling isnt an issue so its won the GUI race.


Peter
 
Last edited:
Joined
Jan 9, 2023
Messages
87
Likes
30
Just in case anyone is wondering, camilladsp works fine with Kodi, with the caveat that I run my Linux image with pulseaudio removed (i.e.
apt remove pulseaudio pulseaudio-utils). I HATE pulseaudio!!!.

There are very few Linux distro's that now allow you to remove pulseaudio** without losing your GUI but Zorin is one and I use that for all my images (music and non-music) and its a real nice GUI to work with to boot... plus being based on Ubuntu its has whatever software you need one "apt" away.

I havent tested Kodi/Camilla with a system that has pulseaudio installed but disabled but I would imagine Kodi will still work ok with Camilladap.
**This is not true.
I thought it may help to know how we got here (!)

Quite early on I raised this issue with Henryk and we both agreed it was better to get rid of Pulseaudio because it was interfering with lots of things.
You can run debian no problem at all without pulseaudio.
I have been recommended multiple times to go to Ubuntu, but wouldn't go anywhere near it (thanks!).

I use VLC with cli as a service, as well as CamillaDSP as a service, so it's actually like turning on a (web) radio and is controlled over port 8080 thru a web interface that can run on any cheap smartphone or PC.

I have been using several different versions of camilla for well over 18 months now, back when we had to compile it from source with Rust, Curl and lots of other tweaks.
It started with buster then moved to bullseye.
(bullseye on RPi had a load of issues to begin with, (card wouldn't register with ALSA) which buster didn't have but eventually got resolved).
(There's a specific line I had to add in the config.txt)

Here's what I am using now on a daily basis on a USB stick complete with XRandR GUI pcmanfm and X forwarding:-
Linux raspberrypi-x86-bullseye 5.10.0-15-686-pae #1 SMP Debian 5.10.120-1 (2022-06-09) i686 GNU/Linux.
It's just basically a temp install with "persistence".

It looks and feels exactly like Raspi, except of course it means I can do X-windows fwd from any Pi without all the MS windows nonsense, and there of course thru FUSE, it gives me r/w access to the windows HD with another Linux partition on.
Copying any DVD is dead easy (because of course Rpi don't have DVD readers!), so the x86 laptop just reads the DVD with brasero, creates an ISO image uploads it on FTP to the Rpi CM4, and that plays back the ISO on VLC on HDMI again with Camilla's corrections for headphones or my outsized beast of a main hifi system.
Add in, HDMI retro projector and a pull down screen and you have serious home cinema stuff.

The other huge advantage, the notebook has a PC card reader, which means I can use my excellent AKM based PCMCIA cardbus professional sound card from Digigram (after lots of fun getting the Linux drivers up and running).
It also only needs ONE laptop PSU, not a pile of different stuff in all directions like on the CM4.

On the Raspis, it's all 64 bit OS from the start, which originally I ran for proto to dev, on a rpi 3B, which meant using the HDMI "headphones" interface initially then move to the HAT from Ian Jin as soon as I got a CM4 up and running properly.
The CM4 is night and day compared with the vanilla Pi3+ or 4, and with XLR it's immune to noise.
Here is what it has (nice and up to date):-
Linux raspberrypi-cm4xxx 5.15.90-v8+ #1623 SMP PREEMPT Mon Jan 30 15:05:42 GMT 2023 aarch64

The I. Canada dual mono DAC is difficult to install, because it requires multiple PSU lines at all sorts of voltages inc a +/- 12V split supply for the OP amp output stage to both XLR and headphones.
I use a different board from the official CM4 I/O, so the official board really is only for writing to the e-MMC and cloning.

A guy in Kazakhstan makes some of the world's best DAC transformers, so once you have that, the output OP amp board becomes redundant.
With the transformer output stage the Ian canada DAC beats the daylights out of pretty much any DAC on the market at any price, inc Topping et al.
It's getting up to the "Neve" sort of pro mixing desk quality despite the sabre basis.

All this makes the wiring pretty much like a cobweb, which I then feed into a 4 channel relay board.
The Canada DAC also has a DAC controller which I extended out of the GPIO, and a buffer board that sits on top of it all....so cooling becomes quite a fun game, as it's all vertically stacked on top of the CPU.

If I add up the final audio stage, from out of the DAC, the PSU becomes frighteningly complicated.
It's a high quality, low distortion valve amp, which required a special wound to order multi secondary Toroidial transformer to feed it all, and even 2 more miniature EI transformers, and took about 6 yrs to get there, and after 2yrs of exhaustive blind testing and evaluation with friends.

I made a block diagram of it all, starting with the 4g/LTE mobile Internet router (which is also being run thru the raspberry pi normally).
We have 2 x 450V lines, (1 swinging choke at 500V DC) 1 x 12V AC 3.2A rectified to 12V DC*, 1 x +/- 14V DC, 1 x 6.3V AC, 1 x -32V DC (Bias), 1 x 12V AC 1A, and finally a stabilised rail at 320V+ of course feeding the CM4 from here*.

Thermally it's quite a fun thing to keep cool, because the valve amp stage chucking out 80W of heat at idle is housed in a 4U rack case, which makes it look like a banal solid state thingy.
(on the back of the 4U case emerges 3 antennae SMA chassis sockets, HDMI out and USB all neutrik chassis items as well as the speaker outputs and a dual channel 5 pin XLR input for external sources)

Add to that camillaDSP works in the background - watching HD TV via the internet router thru a M.2 card wireless modem (also running on the CM4!), and the little SIM card sits in the board to keep it all happy over mobile data.
It's been a long process to get it all reliable, not helped by the toroid getting "sudden death" after a lightning strike hit a tree about 50-80m away the end of last summer...
 
Last edited:

fatoldgit

Active Member
Joined
Feb 29, 2020
Messages
297
Likes
348
**This is not true.
I thought it may help to know how we got here (!)

Quite early on I raised this issue with Henryk and we both agreed it was better to get rid of Pulseaudio because it was interfering with lots of things.
You can run debian no problem at all without pulseaudio.
I have been recommended multiple times to go to Ubuntu, but wouldn't go anywhere near it (thanks!).

Debian is not a GUI... its a Linux based OS.

Debian (the OS) has many different GUI's available (Cinnamon, MATE, Xfce, LXDE, LXQt, KDE Plasma) and yes it has its own default GUI (which may not break if you remove pulseaudio... never tested that)

So the issue about removing pulseaudio is at the GUI level.

For example Fedora KDE was fine with it up till/including Fedora 32 then the next version of KDE that was released with the Fedora KDE spin would break if pulse was removed.

XCFE, for example, is ok with pulse being removed but I find XCFE a bit 1990's in its look.

Your reticence towards Ubuntu matches my reticence towards Debian!!!...all a matter of taste and use case.

I used to be a big fan of KDE but now prefer Zorin as my desktop.

Again a matter of taste and use case but we can probably both agree that having choice is better than living in the Windows or MAC world... you get stuck with one viewpoint.

Not sure what the rest of your post its trying to say.

Peter
 
Joined
Jan 9, 2023
Messages
87
Likes
30
Debian is not a GUI... its a Linux based OS.

For example Fedora KDE was fine with it up till/including Fedora 32 then the next version of KDE that was released with the Fedora KDE spin would break if pulse was removed.

Your reticence towards Ubuntu matches my reticence towards Debian!!!...all a matter of taste and use case.

I used to be a big fan of KDE but now prefer Zorin as my desktop.
You think I don't know about debian being the OS?

As for KDE what do you expect of that bloated pile of junk?
FYI:-
Ubuntu is BASED on Debian not the other way around.
I don't know what you are trying to prove there.

I use the RPi default gui, and the same for my x86. (LXDE/Openbox)
It's lightweight and is not a memory hog.
 

fatoldgit

Active Member
Joined
Feb 29, 2020
Messages
297
Likes
348
Ubuntu is BASED on Debian not the other way around.
I don't know what you are trying to prove there.
Where did is say it was the other way around?.... I never even mentioned their relationship.

I just pointed out that your statement "You can run debian no problem at all without pulseaudio." was incorrect... that if for example you ran Debian with KDE (or some other GUI's) and removed pulseadio, then the GUI would die.

If you did the same with Xunubtu, Lubuntu, Zorin and some others Ububtu flavours then all would be good.

Thus Debian, Ubuntu and Fedora are LInux OS, not GUI's

You seem to have an aggressive stance on things Linux ("wouldn't go anywhere near Ubuntu", "KDE is a bloated pile of junk").... these are irrational stances.

Ubuntu has the largest user base and arguably the most extensive software stack (along side Debian) and KDE isnt bloated (tests show its actually very fast) but its considered a "power user" desktop due to its high degree of configurability.

KDE is also probably the most "polished" looking Linux desktop which is what first attracted me to it when the first version of KDE 5 came out (didnt like V4)

These are factual, non-emotional statements but I am sure you will mis-read what I have said... again.

Peter
 
Joined
Jan 9, 2023
Messages
87
Likes
30
Ubuntu has the largest user base and arguably the most extensive software stack (along side Debian) and KDE isnt bloated (tests show its actually very fast) but its considered a "power user" desktop due to its high degree of configurability.

KDE is also probably the most "polished" looking Linux desktop which is what first attracted me to it when the first version of KDE 5 came out (didnt like V4)

These are factual, non-emotional statements but I am sure you will mis-read what I have said... again.

Peter
I think I must have had just about every version of KDE, including on my old 64 bit AXP dec Alpha (650mhz Miata) for the very last release of Linux on that CPU.
I have a working version on my notebook (can't remember the version).
Again not impressed.
I also have Ubuntu on my notebook, but it's a slug.

This Raspi x86 system on the notebook with Bullseye is very fast.
I am writing using it now, it runs camillaDSP like it should.
I don't think anyone would tempt me back to anything else now, it's just so much better than I have ever seen before, runs decently on Mozilla-FF and doesn't crash.
I'm not interested in Ubuntu's user base, nor why people seem to be fixated about it.
The debian installs I made all on the RPi and CM4 work 24/7 with camillaDSP and no issues especially with HD TV.
Why would I want to change it?
 

fatoldgit

Active Member
Joined
Feb 29, 2020
Messages
297
Likes
348
I think I must have had just about every version of KDE, including on my old 64 bit AXP dec Alpha (650mhz Miata) for the very last release of Linux on that CPU.
I have a working version on my notebook (can't remember the version).
Again not impressed.
I also have Ubuntu on my notebook, but it's a slug.

This Raspi x86 system on the notebook with Bullseye is very fast.
I am writing using it now, it runs camillaDSP like it should.
I don't think anyone would tempt me back to anything else now, it's just so much better than I have ever seen before, runs decently on Mozilla-FF and doesn't crash.
I'm not interested in Ubuntu's user base, nor why people seem to be fixated about it.
The debian installs I made all on the RPi and CM4 work 24/7 with camillaDSP and no issues especially with HD TV.
Why would I want to change it?

I must admit I have never used a PI platform/OS... always been Linux on Intel (or IBM Z-Series) and so havent needed to use an ultra light lInux image.

I use a couple of low powered fanless PC's (i3's) in my music system, one as a NAS like device and one that runs Kodi into my USB DAC, with file sharing between them.

My desktops and servers I use for non-music stuff are all powerful so again havent needed to use an ultra light lInux image.

I have rolled my own custom Linux image for the fanless music PC's which boot ramroot from USB and found the best/simplest (IMHO) software to create the the USB boot image was systemback, which only works on Ubuntu so that placed me into the Ubuntu camp

And with my desire to remove pulseaudio that left me with Xubuntu/Lubuntu or Zorin (there are others that dont mind pulseaudio being ripped out but they were more marginal projects).

I was firmly in the Redhat/Fedora/Centros camp for many years (due to work requirements) but after retiring 3 years ago, I settled on Zorin for my desktops and music PC's.

I do think the KDE has got fatter over the years (as have others) so agree that for a system with limited resources its not a good choice.

What I really like about Zorin (only available on Ububutu) is its simple to configure and can be configured to be menuless.

Stick your 20 or so most needed apps as icons across the top and then if needed you are one click away from your other apps, presented in a menuless set of pages (if more than one is needed). You can then place the 2nd tier of most used on the 1st page.

Its crazy to me that on other systems (LInux or otherwise) that you need to use a menu system that might have another one or two levels of submenus (and hence clicks) to launch an app. But thats personal choice.

Peter
 
Last edited:

Triliza

Senior Member
Forum Donor
Joined
Jun 23, 2021
Messages
481
Likes
578
Location
Europe
These stuff seems over-complicated to me, but if I was doing something similar I'd go for Arch/Manjaro. I tried the manjaro arm edition on a PI a while back and it was pretty smooth, and that was with the plasma edition, I guess with minimal or Sway it would be quite fast. And from what I read pulseaudio can be removed easily too.
 
Joined
Jan 9, 2023
Messages
87
Likes
30
I must admit I have never used a PI platform/OS... always been Linux on Intel (or IBM Z-Series) and so havent needed to use an ultra light lInux image.

You should try it some time.
I gave up on Intel once I saw the ARM CPU (CM4) using barely 5W at idle.

It will run off a car battery for a week.
12V Lead acid batteries don't generate PSU noise.
 

HenrikEnquist

Member
Joined
Jul 1, 2021
Messages
82
Likes
110
How do you guys use a graphical desktop without pulseaudio/pipewire? There are very good reasons for why one would want something like pulseaudio during normal desktop use, like mixing audio from different apps, switching between devices when a headset is plugged in or connected via bluetooth, etc etc.
How do you prevent an unwanted app from blocking the outout device? By simply running a single audio-capable app at a time?
 

Wirrunna

Member
Joined
May 27, 2021
Messages
93
Likes
45
Location
South Coast, NSW, Australia
Michael, I got another Flirc this morning -

Code:
Last login: Tue Feb 14 23:23:46 2023 from 192.168.2.77
camilla@CamillaDSP:~$ ls /dev/input/by-id/
usb-flirc.tv_flirc_E7A648F650554C39322E3120FF08122E-if01-event-kbd
camilla@CamillaDSP:~$
camilla@CamillaDSP:~$ ls /dev/input/by-id/
usb-flirc.tv_flirc_71263ADF5050323430202020FF050E14-if01-event-kbd
camilla@CamillaDSP:~$

The first is the old Flirc and the second is the brand new Flirc, looks like the Flirc device is uniquely named now.
 
Joined
Jan 9, 2023
Messages
87
Likes
30
How do you guys use a graphical desktop without pulseaudio/pipewire? There are very good reasons for why one would want something like pulseaudio during normal desktop use, like mixing audio from different apps, switching between devices when a headset is plugged in or connected via bluetooth, etc etc.
How do you prevent an unwanted app from blocking the outout device? By simply running a single audio-capable app at a time?

If we are talking about the pi (?) yes.
I don't want different streams of audio mixed together, I want one at a time. (particularly as my application is to have CLi VLC running basically headless). So basically I use Alsa to prevent other media systems from taking over or mixing with a given stream.

Having said that if there are 2 sound cards (most of my machines except CM4 have), I can choose which I run direct without Dsp and which with it.
It all depends which environment you want to run Camilla in.
In my case in both the in-car system, caravan theatre system and monster back home, CamillaDSP is run without needing to mix sources. (ie. Alsa)

eg. for the mobile amp/system.
I have a 4 channel relay box which can switch in and out rear channels and attenuators, and/or balanced XLR style inputs as well as single ended.

(btw. A switch on the back of the amp makes it possible to compare a valve type phase splitter with a balanced opamp v transformer splitter from the DAC.
I could detect no difference in sound or measure increased distortion when switching between OP amp phase splitting and valve driver phase inversion.)

The biggest changes I could hear were switching rear channels levels from excessively high to the correct low levels, and changing from camilladsp IN v Out.
(My horn tweeters*** have a nasty peak resonance otherwise at about 6khz).
I would imagine using camillaDSP in car with a multi channel amp able to make digital crossover and control F+R levels could be very spectacular, but not had a chance yet to run the ARM CM4 to do it yet.

On the "monster"*** system:-
For years Russian lomo horns were badly regarded compared with US made Altec Lansing 802/288 (despite basically copying the technology).
CamillaDSP turns the Kinap horns into fantastic totally underrated high perfomance units, that measure great to over 16khz.
I don't think anyone else has been using Camilla with HF horns a passive crossover and a multi winding valve output transformer.
I found a reference to a bunch of tests on such units.
It's worth the read.
Sorry this was a long post.
 
Last edited:

Spezialtrick

Member
Joined
Jan 8, 2022
Messages
21
Likes
2
As mentioned previously to a USB host the Flex is a 2 channel playback device. If you want a 2.1 system you need to send 2 channels to the Flex and implement the channel routing / x-over in the Flex itself.

Michael
Hello Michael, thank you very much for your support. I've just returned the MiniDSP Flex und bought a Motu M4. Now CamillaDSP works flawlessly. :)

How do you perform measurements with REW? Do you connect the Motu to another computer, perform the measurements on the computer, create filters and export them to CamillaDSP? Or is it necessary to perform the measurements on CamillaDSP (Pi4)?
 
Top Bottom