• 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

Wirrunna

Member
Joined
May 27, 2021
Messages
90
Likes
44
Location
South Coast, NSW, Australia
Following on from my earlier post about getting the FLIRC volume control to work, with offline help from Michael it now works.

CamillaDSP:~$ sudo systemctl status flirc will show you if the flirc service is going or not. In my case, the flirc service would work and stop and then restart, however volume control didn't work.

Checking the contents of /dev/input/by-id/ showed that the id of my flirc was different to the id in the flirc.py that michael wrote. Replacing the id fixed my problem.

Line 9 of flirc1_08112022.txt which you change to flirc.py -
flirc=evdev.InputDevice('/dev/input/by-id/usb-flirc.tv_flirc-if01-event-kbd')

line 9 with the changed id
flirc=evdev.InputDevice('dev/input/by-id/usb-flirc.tv_flirc_E7A648F650554C39322E3120FF08122E-if01-event-kbd')

My flirc is brand new and I suspect that there may have been a recent change in the internals of these devices.
 

jbjbjbjbjb

Member
Joined
Feb 12, 2022
Messages
24
Likes
12
I should also say that if you do not need GPIO for a display there are lot of other hardware options besides a RPi. I run camillaDSP on a mac mini 2012 for example and it works great, which is nice because I can use old firewire interfaces with it.

It does seem a bit suspicious that you've had two failures at this point, one with a SD card and one with a SSD. Seems like it may be a hardware specific issue. A feel like people try to blame everything on power supplies and I am not sure that is your issue but what power supply are you using?

Michael
Thanks for all the comments. I'm now 95% sure I have a defective rpi4. I've seen failures with 3 different power supplies (two are official RPI adapters) and just today I had another crash running plain Raspbian with a Lab PSU. It's a strange thing to celebrate a crash! The trouble is that I can't seem to buy a replacement pi at a reasonable price anywhere at the moment. That's the new normal I suppose.

The mac mini seems a good idea. Maybe a silly question, but can it run from power up with no intervention? I'm nervous about setting one up with ubuntu but it might be a good solution. Do you use a powered hub with it for the M4? BTW I'm totally amazed by the sound quality of the M4 - I've heard ESS dacs before but this seems to have none of the 'impressive but tiresome' problems - and the sound stage has grown in all directions.
 

juliangst

Addicted to Fun and Learning
Joined
Dec 11, 2021
Messages
957
Likes
979
Location
Germany
I found another interface that could be a good alternative. The Focusrite Clarett+ 2Pre has 4 outputs and you can select which outputs the front volume knob will control.
THD+N also looks good and it has an optical input.

Has anyone experience with this one? Looks like it can do everything we want except remote controllability

Correction: the optical input is ADAT only so no SPDIF
 
Last edited:
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,477
Likes
3,315
Location
Detroit, MI
Thanks for all the comments. I'm now 95% sure I have a defective rpi4. I've seen failures with 3 different power supplies (two are official RPI adapters) and just today I had another crash running plain Raspbian with a Lab PSU. It's a strange thing to celebrate a crash! The trouble is that I can't seem to buy a replacement pi at a reasonable price anywhere at the moment. That's the new normal I suppose.

The mac mini seems a good idea. Maybe a silly question, but can it run from power up with no intervention? I'm nervous about setting one up with ubuntu but it might be a good solution. Do you use a powered hub with it for the M4? BTW I'm totally amazed by the sound quality of the M4 - I've heard ESS dacs before but this seems to have none of the 'impressive but tiresome' problems - and the sound stage has grown in all directions.

For raspberry pi 4s check out digikey, I ordered a few at the beginning of the year and they came within 1-2 months even though the lead time was quoted as a lot longer and they never actually showed up as in stock on the website. Also the CM4 I/O board + compute module may be a bit easier to source but is a larger form factor.

If you go with a mac mini no need to run ubuntu, you can use camilladsp on mac os just fine. On my 2012 mac mini I run mojave as it supports 32 bit software and some of the very old MOTU tools are only 32 bit. I haven't really used the M4 much with the mac mini as I mainly run firewire interfaces on it (RME fireface 800, MOTU 896HD). I actually do run it completely headless and just use VNC to log in to remotely if I need to use it and of course if you just want to manipulate camilladsp you can do that via web browser from any computer on the same network.

Michael
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,477
Likes
3,315
Location
Detroit, MI
I found another interface that could be a good alternative. The Focusrite Clarett+ 2Pre has 4 outputs and you can select which outputs the front volume knob will control.
THD+N also looks good and it has an optical input.

Has anyone experience with this one? Looks like it can do everything we want except remote controllability

Correction: the optical input is ADAT only so no SPDIF

I haven't used it personally but it looks pretty good. Specs are a bit of a step up compared to the Scarlett series and ability to control all outputs from a knob is definitely nice, although it seems pretty expensive for the I/O compared to something like a MOTU UL Mk5. I have used a Scarlett 18i20 2nd gen and it worked very well on Linux so I hope this would be similar.

Manual says the optical can do ADAT or SPDIF.

1664229786485.png

Michael
 

juliangst

Addicted to Fun and Learning
Joined
Dec 11, 2021
Messages
957
Likes
979
Location
Germany
I haven't used it personally but it looks pretty good. Specs are a bit of a step up compared to the Scarlett series and ability to control all outputs from a knob is definitely nice, although it seems pretty expensive for the I/O compared to something like a MOTU UL Mk5. I have used a Scarlett 18i20 2nd gen and it worked very well on Linux so I hope this would be similar.

Manual says the optical can do ADAT or SPDIF.

View attachment 233460
Michael
Thanks, I didn't look into the manual.
I don't really need much I/O and just want something that's cheaper than a MiniDSP for a 2.1 setup.

This is probably the cheapest interface with multichannel volume control. I'm not in a rush so I'll wait and see if Audient will add multichannel support with volume control to the EVO 16. It's definitely the better deal compared to the Focusrite.
 

radix

Major Contributor
Joined
Aug 1, 2021
Messages
1,359
Likes
1,291
This has been a great thread.

So I was going to do a RP4 + Camilla + RME, but then I noticed that my SHD w/ Volumio 2 has FusionDSP, which is just a front-end to Camilla. What do you think of the Volumio 2 on the SHD doing Camilla (which I guess is 2x2 in Volumio), then using the SHD's active crossover to split between L/R/sub? I'd be using acourate or audiolense for the FIRs.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,477
Likes
3,315
Location
Detroit, MI
This has been a great thread.

So I was going to do a RP4 + Camilla + RME, but then I noticed that my SHD w/ Volumio 2 has FusionDSP, which is just a front-end to Camilla. What do you think of the Volumio 2 on the SHD doing Camilla (which I guess is 2x2 in Volumio), then using the SHD's active crossover to split between L/R/sub? I'd be using acourate or audiolense for the FIRs.

Interesting question, I had not thought about that before. I have a SHD Studio but don't use it and it has been a long time since I played with Volumio so take my answers with a grain of salt.

I think the nano pi in the SHD might struggle a bit with Camilla, however as it would only be two channel correction maybe it would be OK. Of course the correction would only be applied when using Volumio so that would be a bit limiting but if you mainly used the SHD for streaming that would work perfectly. You could do the same thing with a raspberry pi 4 on the USB input and that would definitely work. Both are interesting options as you could linearize the phase of your speakers with CamillaDSP FIRs and then apply Dirac on top of that for overall room correction.

Give it a try and let us know how it goes!

Michael
 

juliangst

Addicted to Fun and Learning
Joined
Dec 11, 2021
Messages
957
Likes
979
Location
Germany
This has been a great thread.

So I was going to do a RP4 + Camilla + RME, but then I noticed that my SHD w/ Volumio 2 has FusionDSP, which is just a front-end to Camilla. What do you think of the Volumio 2 on the SHD doing Camilla (which I guess is 2x2 in Volumio), then using the SHD's active crossover to split between L/R/sub? I'd be using acourate or audiolense for the FIRs.
I tried Fusion DSP/ CamillaDSP with Volumio a couple of times and it was really buggy; that’s why I’m using moOde instead of Volumio for corrections with CamillaDSP.
I would just connect a Pi or PC to the SHD and do everything there.
 

ezublab

Member
Joined
Jun 28, 2020
Messages
42
Likes
31
I tried Fusion DSP/ CamillaDSP with Volumio a couple of times and it was really buggy; that’s why I’m using moOde instead of Volumio for corrections with CamillaDSP.
I would just connect a Pi or PC to the SHD and do everything there.
You probably tested it when it was in beta at the beginning of the year...
 

juliangst

Addicted to Fun and Learning
Joined
Dec 11, 2021
Messages
957
Likes
979
Location
Germany
You probably tested it when it was in beta at the beginning of the year...
It was a couple months ago, I might give it another try. But I think I prefer moOde. With Volumio you need the subscription to use external inputs and with moOde it’s free
 

f4k

New Member
Joined
Sep 27, 2022
Messages
2
Likes
2
Hello, with example of UL mk5 is it possible to:
1. Play audio from two sources simultaneously? TOSLINK (source C) and USB (source D) for example.
2. Play audio to analog outputs, that are logically grouped? For example out 1-2 to speakers A, out 3-4 to speakers B.
3. Referring to 2., source C to speakers A, source D to speakers B?
4. Logically group subs to out 1-4, speakers A to out 5-6, speakers B to out 7-8. All speakers are in the same room, speakers A are for desk position, B for couch. Is it possible to have location E = subs + A and location F = subs + B play simultaneously each their own source?

I know this is super complicated setup but, should be possible in analog world.

Thanks
 
Last edited:

f4k

New Member
Joined
Sep 27, 2022
Messages
2
Likes
2
Also to give something back to community - regarding issues with micro SD cards for rPi, pay attention that card is rated A2 - this is way more durable for OS use case.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,477
Likes
3,315
Location
Detroit, MI
Hello, with example of UL mk5 is it possible to:
1. Play audio from two sources simultaneously? TOSLINK and USB for example.
2. Play audio to analog outputs, that are logically grouped? For example out 1-2 to speakers A, out 3-4 to speakers B.
3. Referring to 2., source C to speakers A, source D to speakers B?

Thanks

Interesting questions. I think much of it depends on if you are talking about the UL mk5 generically or the UL mk5 in an Ubuntu / CamillaDSP setup.

1) Generically this seems possible but not on Ubuntu. The keys here are that the UL mk5 needs to be clocked via TOSLINK at the same sample rate as your USB source, obviously this works best if you have fixed sample rates or the ability to resample to a fixed sample rate. You also need the ability to use the UL mk5 loopback, this works great on mac but does not work on Ubuntu as it seems like if you are using the UL Mk5 as a CamillaDSP capture / playback device you are unable to play to the UL Mk5 from say shairport-sync (I get an error saying device busy). On a mac this seems to work great. I was able to set my software player to output channels 1-2, route those channels to input channels 9-10 via the UL mk5 loopback and then use those channels in my CamillaDSP mixer all while the UL mk5 was clocked via TOSLINK by another source and with that TOSLINK source routed to completely different output channels in the mixer.

2) Yes. This is possible in all cases.

3) This is possible as described in (1). There are also options to do this using Ubuntu if using all physical inputs. The simplest example of this would be multiple analog sources but this should work with a combination of analog sources and TOSLINK if the UL mk5 is clocked via TOSLINK.

Michael
 
  • Like
Reactions: f4k

radix

Major Contributor
Joined
Aug 1, 2021
Messages
1,359
Likes
1,291
Interesting question, I had not thought about that before. I have a SHD Studio but don't use it and it has been a long time since I played with Volumio so take my answers with a grain of salt.

I think the nano pi in the SHD might struggle a bit with Camilla, however as it would only be two channel correction maybe it would be OK. Of course the correction would only be applied when using Volumio so that would be a bit limiting but if you mainly used the SHD for streaming that would work perfectly. You could do the same thing with a raspberry pi 4 on the USB input and that would definitely work. Both are interesting options as you could linearize the phase of your speakers with CamillaDSP FIRs and then apply Dirac on top of that for overall room correction.

Give it a try and let us know how it goes!

Michael

So, the Volumio on SHD is still an old Volumio version without FusionDSP, so I guess my enthusiasm jumped the gun. I'll go back to the multichannel DAC + RP4 of the thread.
 

juliangst

Addicted to Fun and Learning
Joined
Dec 11, 2021
Messages
957
Likes
979
Location
Germany
I just reinstalled Volumio and FusionDSP on my Pi and it's still buggy af.
I can access CamillaDSP a single time and then I can't connect to the web gui anymore. It also said that the backend is offline so it didn't even work.
 

henris

New Member
Joined
Nov 26, 2021
Messages
4
Likes
2
The MOTU Ultralite MK5 + CamillaDSP + REW issue is due to a kernel bug which is now fixed in kernel 5.19.12. Quite many pro audio interfaces suffered from this same issue (unable to playback and capture simultaneously).
Bug 216500 - Steinberg UR22C malfunctions after upgrading from 5.19.8 to 5.19.9

Here is my solution post on DIYAudio:
 

phofman

Senior Member
Joined
Apr 13, 2021
Messages
489
Likes
319
henris, I am not sure your fix applies to problems Michael is facing. In your case you could not start both playback and capture at the same time - the driver did not work as duplex. But Michael's problem, IIUC, is when the playback side stops delivering data (in some specific manner), the capture side stalls, resulting in an I/O error.

BTW it's quite unusual that you got hit by that bug as that culprit commit (reverted as the bugfix a few days ago) was in the kernel codebase only for some two weeks. Did you have the very latest kernel (or the very latest 5.15)?
 

henris

New Member
Joined
Nov 26, 2021
Messages
4
Likes
2
The timeframe matches for me and I was running the effected 5.19.9 kernel version (which came from upgrading to Fedora 35/36). Before I was running Fedora 34 with an unknown kernel version but it must have been much older. When I started to setup REW measurement capability Fedora offered to run updates and I did not realise it was going to upgrade to Fedora 35. This was about 1,5 weeks ago and resulted in kernel version 5.19.9.

I agree that this probably is not the same issue, however this is also relevant if anyone would be using the affected kernel versions with any distro.
 

phofman

Senior Member
Joined
Apr 13, 2021
Messages
489
Likes
319
It's definitely a very relevant bugfix and great that you found a fix. Just you got quite back luck due to the very short time this bug existed. But Fedora is for that very purpose of testing the very latest development, so actually everything fits together :)
 
Top Bottom