• 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
93
Likes
45
Location
South Coast, NSW, Australia
Updated the tutorial to get rid of all directory changes and did a clean install and everything seemed to work well regardless of what directory I was in.

Sorry about that, I had started to clean some of this up but that clashed with the old instructions, oh well, should be good now.

Michael
I followed the updated tutorial to build a new CamillaDSP RPi for my new Ultralite Mk5 (UL5). It was definitely smoother, I just went straight through apart from missing one michael3 change - maybe change to michael3.

Missed setting the network-config step on the install of Ubuntu so couldn't access by wifi after disconnecting the ethernet cable.
"sudo apt install network-manager" allowed me to follow https://ubuntu.com/core/docs/networkmanager/configure-wifi-connections. Maybe worth a mention as a note in Step 1 of your tutorial.

Loaded your ultralite_analog config and connected the UL5 and according to the pipeline it is all working despite having not been able to figure out how to perform the initial setup apart from setting sample rate to 96 kHz.
The Motu videos were not much help.

I will finish making my TSR cables and then start testing.
 

Blew

Active Member
Joined
Jul 24, 2020
Messages
179
Likes
63
Location
Sydney, Australia
Thanks for your responses. I'm slowly getting there but still having a few issues.
1. Can you share your configuration file? I imagine you do not have 4 channels specified under "playback" in your CamillaDSP configuration. Or you are not using the correct S32LE format.
No it does work when playing to CamillaDSP, but not in any other ALSA applications! That's why I wonder if it's a channel number issue. Do you know if there is a way to configure the channels for the M4 in /etc/asound.conf as default?
My current working CamillaDSP playback config is attached. I'm still mucking about with sample rates and chunk sizes etc:


2. I mention my rational for running at 96 kHz in the tutorial:
This post -> https://www.audiosciencereview.com/forum/index.php?threads/minidsp-flex.28660/post-1037905, shows a comparison of high frequency warping for 48 kHz and 96 kHz sample rates. Not a huge difference but given the RPi4 has plenty of power to run at 96 kHz and avoid warping in the audible frequency range, why not? I haven't tested it extensively but all of the CamillaDSP resampling options seem very high quality and will be nowhere close to limiting from an audibility standpoint.
Interesting, thanks. I assume the other advantage of 96KHz over 48KHz would be the steepness of the PCM reconstruction filter in the DAC. I don't think the M4 has a way to set different filters there but Amir's review shows the default filter is not quite perfect at 44.1KHz:

index.php

3. Yes, gadget mode using gaudio_ctl will automatically switch rates. There is a way to switch rates with a loopback as well -> https://github.com/scripple/alsa_cdsp. I do not use either of these approaches because they make it difficult to modify / change configurations in the GUI. I do not believe there are any concrete plans to change rate changing behavior within CamillaDSP itself but I could be wrong.
What sort of problems do they create for changing the config in the GUI? Is it just the devices config page?
4. No, Henrik has indicated the resampler needs to restart if there are large changes in sample rate. See this post and subsequent discussion for more info -> https://www.audiosciencereview.com/...s/rpi4-camilladsp-tutorial.29656/post-1195832.

5. I haven't seen anything noticeable, it doesn't affect 1 kHz or multitone test results at the DAC output. I could do some more testing to evaluate but everything I've seen so far indicates that it would be wasted effort to do so. You can read more about the technical aspects of asynchronous sample rate conversion here -> https://www.diyaudio.com/community/threads/asynchronous-sample-rate-conversion.28814/
Thanks. In that case I agree with your comment there regarding CamillaDSP resampling from multiple source sample rates to a constant output sample rate.

9. I don't think it will be audibly any different. The reason I resample in squeezelite to 44.1 kHz is so that I can switch between shairport-sync (which always runs at 44.1 kHz) and squeezelite without changing configurations. If you only use squeezelite I would consider implementing rate switching in CamillaDSP or just resample in squeezelite.
I think rate switching is the better option here to avoid downsampling hi-res content then upsampling it again.
10. By capture device it means ALSA loopback, not the M4. You need rate adjust otherwise you will have buffer over / under runs. The only time rate adjust is not needed is if your capture and playback devices share the same clock.
In this case, the capture device clock being the Pi4 and the playback device clock being the M4?
11. I have not experienced any such issues on my M4 powered directly by my RPi4. Can you increase verbosity of your log (see tutorial) and share it for times of when these drop outs occur?
Yes it's an odd one and very annoying! I've tested with various config settings but none seem to have an affect on it. I am using the headphones output on the M4 to test it.

The output is fine when I connect the M4 to a Windows laptop and use WASAPI exclusive mode to play a track, but playing the same track using Squeezelite & CamillaDSP produces clicks and pops. I am unable to test it outside of CamillaDSP for the reasons above. See logfile and config attached.
Also, for some reason CamillaDSP seems to log in UTC format without respecting the local timezone.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,369
Location
Detroit, MI
No it does work when playing to CamillaDSP, but not in any other ALSA applications! That's why I wonder if it's a channel number issue. Do you know if there is a way to configure the channels for the M4 in /etc/asound.conf as default?

Ahh, I see. I have only used it with CamillaDSP and have no motivation to use it on it's own in Linux so I do not know.

What sort of problems do they create for changing the config in the GUI? Is it just the devices config page?

Both the gaudio_ctl and alsa_cdsp plugin approaches automatically restart camilladsp and change configuration files on sample rate changes and do not use an active_config.yml symlink. As a result if you want to change configurations in the GUI as a means of source selection (say one configuration is analog input, one is a Loopback input and one is a separate TOSLINK to USB card) that won't work well.

I think rate switching is the better option here to avoid downsampling hi-res content then upsampling it again.

On my CamillaDSP streamer setup 99% of my listening uses AirPlay at 44.1 kHz so I have less than 0 motivation to pursue rate switching, you are of course free to do whatever you like. :) I am not losing sleep over cutting out inaudible ultrasonics.

In this case, the capture device clock being the Pi4 and the playback device clock being the M4?

Yes.

See logfile and config attached.

I don't see anything attached but attaching the log really won't help, you need to see if you are seeing log entries indicating buffer under / over runs WHEN you experience the dropout.

Michael
 

Wirrunna

Member
Joined
May 27, 2021
Messages
93
Likes
45
Location
South Coast, NSW, Australia
Michael,
I have the UL Mk5 in my system with a fairly flat 3 way crossover for my K Horns, a bit of tweaking to be done, such as fill in a drift in phase and smooth a few excess waves in the frequency response but it is listenable.

CamillaDSP makes preparing for tweaking sessions simple as a new config can be built and when the testing mic is in place, loaded, measured and then reverted back to working.

Initial listening impressions are that the UL Mk5 is brighter with more life than the dual miniDSP 2X4 HD setup. There is certainly more delay in the UL Mk5 as I have gone with 8192 Taps for the FIR crossovers and when playing FM there is a noticable echo if a portable radio is on in another room on the same station, not a problem, just an observation.

The UL Mk5 is silent compared to the hiss generated by the miniDSP, can't hear anything from the 111db/w horn loaded mid / hi horn B&C DCX464 when the vol is at what would be 100db.

My source is the "pre out" from a NAD C725BEE which we use as the vol control and source selector mainly between RPi Squeezebox player and FM and I suspect that there are a few squillivolts of DC on the output as there is a click through the system every time the NAD relays click to change source, input delay and switch off. May have to open the NAD and put a 1uF MKP cap in circuit, I'll try a cap in a patch lead first.

It took a while to work out how to "set up channel routing such that USB 1-2 are routed to analog output 1-2 etc" in the UL Mk5 and I am not confidant I have "Make sure that no other channel routing is in place". I will make some notes on what I did and PM them to you and maybe we could flesh out some instructions to add to the setup notes to help other dummies like me.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,369
Location
Detroit, MI
Michael,
I have the UL Mk5 in my system with a fairly flat 3 way crossover for my K Horns, a bit of tweaking to be done, such as fill in a drift in phase and smooth a few excess waves in the frequency response but it is listenable.

CamillaDSP makes preparing for tweaking sessions simple as a new config can be built and when the testing mic is in place, loaded, measured and then reverted back to working.

Initial listening impressions are that the UL Mk5 is brighter with more life than the dual miniDSP 2X4 HD setup. There is certainly more delay in the UL Mk5 as I have gone with 8192 Taps for the FIR crossovers and when playing FM there is a noticable echo if a portable radio is on in another room on the same station, not a problem, just an observation.

The UL Mk5 is silent compared to the hiss generated by the miniDSP, can't hear anything from the 111db/w horn loaded mid / hi horn B&C DCX464 when the vol is at what would be 100db.

My source is the "pre out" from a NAD C725BEE which we use as the vol control and source selector mainly between RPi Squeezebox player and FM and I suspect that there are a few squillivolts of DC on the output as there is a click through the system every time the NAD relays click to change source, input delay and switch off. May have to open the NAD and put a 1uF MKP cap in circuit, I'll try a cap in a patch lead first.

It took a while to work out how to "set up channel routing such that USB 1-2 are routed to analog output 1-2 etc" in the UL Mk5 and I am not confidant I have "Make sure that no other channel routing is in place". I will make some notes on what I did and PM them to you and maybe we could flesh out some instructions to add to the setup notes to help other dummies like me.

Great to hear you have it up and running and that it is silent with such sensitive speakers. The UL Mk5 is pretty low noise for a multichannel DAC but definitely not SOTA but I imagine you have amplifiers of reasonable gain on those speakers given the sensitivity.

I agree that I could do a better job explaining the MOTU channel routing and a screenshot would help. Certainly can be a bit confusing given that both CamillaDSP and the UL Mk5 have channel routing options so it would be better to flesh out in more detail what we want the UL Mk5 to do vs CamillaDSP.

Michael
 

Wirrunna

Member
Joined
May 27, 2021
Messages
93
Likes
45
Location
South Coast, NSW, Australia
I agree that I could do a better job explaining the MOTU channel routing and a screenshot would help. Certainly can be a bit confusing given that both CamillaDSP and the UL Mk5 have channel routing options so it would be better to flesh out in more detail what we want the UL Mk5 to do vs CamillaDSP.

Michael
I think you are being a bit harsh on yourself here.

MOTU Ultralite Mk5

This DAC requires a small amount of setup while connected to a Mac or Windows computer prior to use with CamillaDSP. Install Cuemix 5 and set up channel routing such that USB 1-2 are routed to analog output 1-2, USB 3-4 to analog output 3-4, etc. Make sure that no other channel routing is in place as we will do all channel routing in CamillaDSP.

I think you could add something like -
Install Cuemix 5 and set up channel routing such that USB 1-2 are routed to analog output 1-2, USB 3-4 to analog output 3-4, etc. To do this, refer to the Motu UL5 user guide page 37 and confirm that for each Line pair selected on the left, that the computer USB channel (refer to note 7) corresponds.
 

Wirrunna

Member
Joined
May 27, 2021
Messages
93
Likes
45
Location
South Coast, NSW, Australia
Great to hear you have it up and running and that it is silent with such sensitive speakers. The UL Mk5 is pretty low noise for a multichannel DAC but definitely not SOTA but I imagine you have amplifiers of reasonable gain on those speakers given the sensitivity.
Michael - off topic reply !

The Khorn bass sensitivity is about 105db/w and the B&C DCX464 in the 310Hz Eliptrac (eliptical tractrix) kit horn is 111db/w https://audioxpress.com/article/tes...igh-power-coaxial-compression-driver-and-horn

The amps I use after the UL5 are a single stereo N-Core for bass - https://www.audiophonics.fr/en/powe...wer-amplifier-ncore-2x125w-4-ohm-p-12756.html

and a pair of SMSL SH9 - https://www.audiosciencereview.com/...sl-sh-9-thx-headphone-amplifier-review.17519/
amps for the Mid / Hi.

All amps have balanced inputs. The N-Core amp internally is balanced input but I bought the unbalanced RCA socket version, so with the arrival of the Motu UL5 I swapped the RCA socket for a 1/4" stereo socket and wired it for balanced TRS plugs. The SH9 output is a stereo headphone socket, so I made a pair of adapter leads, stereo headphone jack to banana plugs.

The N-Core amp has no level control while the two SH9 have a level control which I have set to 95.

As there are no passive crossovers in the chain there is no need for high power amps. The Audiophonics amp answers a 12v trigger signal from my NAD pre-amp to turn on and off while I leave the SMSL SH9s on. They barely get above room temperature, the RPi and UL5 get warmer than the amps. I will put a PowerWatt meter in series with the power board and check the power consumption for various use states but going on heat output it is probably less than the NAD.
 

Yems

Member
Joined
Aug 31, 2022
Messages
17
Likes
4
Hi Michael, i like your setup guide very much, thank you for that.

I want to build a system with active 2 way speakers + 1 or 2 active sub's. I like to linearize each driver, level and time align them, integrate the sub's and create the crossover with camilla dsp. After that i'd like to apply Dirac Room correction via my minidsp SHD. The music source should be a Roon stream.

Do you think it's possible or meaningful? What else, beside UL Mk5 and RPi4, do i need?

Jens
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,369
Location
Detroit, MI
Hi Michael, i like your setup guide very much, thank you for that.

I want to build a system with active 2 way speakers + 1 or 2 active sub's. I like to linearize each driver, level and time align them, integrate the sub's and create the crossover with camilla dsp. After that i'd like to apply Dirac Room correction via my minidsp SHD. The music source should be a Roon stream.

Do you think it's possible or meaningful? What else, beside UL Mk5 and RPi4, do i need?

Jens

Yes, this should work quite well, you do not need anything additional to the UL Mk5 and RPi4.

I think the best solution would be to use the coaxial SPDIF output of the SHD in to the coaxial SDPIF input of the UL Mk5 (see ultralitemk5_spdif configuration file in the tutorial).

The SHD resamples all inputs to 96 kHz which is nice because you can run the UL Mk5 / CamillaDSP at a constant 96 kHz. You should not need any additional resampling in the UL Mk5 if you set the clock source to SPDIF. I ran a similar configuration with a SHD Studio and an Okto dac8 pro + RPi4 / CamillaDSP to implement Dirac Live with 2 way active speakers + 2 subs and it worked well.

Michael
 

WohnW

Member
Joined
Aug 31, 2022
Messages
7
Likes
1
Hi all, I would like to ask here important question. Let me start here with respect for @mdsimon2 - I am very impressed by your article at the beginning of this thread. Now a question - I am looking for really good 6 channel DAC to create system employing Camilla DSP. From this point - I am not big fan of ready made DAC's as I have no influence on DAC chip and finally sound characteristics. As a result I started to look at the usb/6ch i2s interface. There is eg miniDSP streamer and DIYINHK streamer on the market, rest of the DAC is quite obvius so no discussion here. IN THE MEANTIME I made quite interesting experiment and I WOULD LIKE TO KNOW YOUR OPINION - I stacked 3 identical USB to 2CH i2s interfaces using USB hub to connect them.
And.... - tadam - it works. Computer "see" 3 dual channel sound cards which gives me in total 6 channels. For testing I routed the same square wave via all of them in the same time and see no time shift when tested with oscilloscope. See attached picture how it looks.

QUESTION - can you predict any problems with such configuration (3x2CH sound USB sound card vs 1x6CH sound card)? I see no technical reasons why not to do it but perhaps I miss something?
 

Attachments

  • Interface.png
    Interface.png
    1 MB · Views: 87
  • Interface2.png
    Interface2.png
    251.9 KB · Views: 88
Last edited:
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,369
Location
Detroit, MI
Hi all, I would like to ask here important question. Let me start here with respect for @mdsimon2 - I am very impressed by your article at the beginning of this thread. Now a question - I am looking for really good 6 channel DAC to create system employing Camilla DSP. From this point - I am not big fan of ready made DAC's as I have no influence on DAC chip and finally sound characteristics. As a result I started to look at the usb/6ch i2s interface. There is eg miniDSP streamer and DIYINHK streamer on the market, rest of the DAC is quite obvius so no discussion here. IN THE MEANTIME I made quite interesting experiment and I WOULD LIKE TO KNOW YOUR OPINION - I stacked 3 identical USB to 2CH i2s interfaces using USB hub to connect them.
And.... - tadam - it works. Computer "see" 3 dual channel sound cards which gives me in total 6 channels. For testing I routed the same square wave via all of them in the same time and see no time shift when tested with oscilloscope. See attached picture how it looks.

QUESTION - can you predict any problems with such configuration (3x2CH sound USB sound card vs 1x6CH sound card)? I see no technical reasons why not to do it but perhaps I miss something?

How are they clocked? If they have independent local free running clocks they will not stay synced.

The DIYINHK 8 channel and the miniDSP mchstreamer/USBStreamer work great with CamillaDSP.

Michael
 

Wirrunna

Member
Joined
May 27, 2021
Messages
93
Likes
45
Location
South Coast, NSW, Australia
How are they clocked? If they have independent local free running clocks they will not stay synced.

The DIYINHK 8 channel and the miniDSP mchstreamer/USBStreamer work great with CamillaDSP.

Michael
There is a good discussion of the need to keep the DACs in sync starting here
 

Yems

Member
Joined
Aug 31, 2022
Messages
17
Likes
4
Yes, this should work quite well, you do not need anything additional to the UL Mk5 and RPi4.

I think the best solution would be to use the coaxial SPDIF output of the SHD in to the coaxial SDPIF input of the UL Mk5 (see ultralitemk5_spdif configuration file in the tutorial).

The SHD resamples all inputs to 96 kHz which is nice because you can run the UL Mk5 / CamillaDSP at a constant 96 kHz. You should not need any additional resampling in the UL Mk5 if you set the clock source to SPDIF. I ran a similar configuration with a SHD Studio and an Okto dac8 pro + RPi4 / CamillaDSP to implement Dirac Live with 2 way active speakers + 2 subs and it worked well.

Michael
Hi Michael,

here's a Layout of my planned setup. In my opinion there are 2 main questions resulting from that:

- in this setup the UL Mk5 USB port is needed for it's use as measuring interface, but also as connection for the RPi 4

- is Dirac-live applicable to mains and subs?
 

Attachments

  • audio_setup_yems_01.jpg
    audio_setup_yems_01.jpg
    90 KB · Views: 121
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,369
Location
Detroit, MI
Hi Michael,

here's a Layout of my planned setup. In my opinion there are 2 main questions resulting from that:

- in this setup the UL Mk5 USB port is needed for it's use as measuring interface, but also as connection for the RPi 4

- is Dirac-live applicable to mains and subs?

USB devices can only have one host, so if you are using CamillaDSP on the RPi4 you will not be able to use the Mk5 as an analog preamp for REW measurements on another computer. There is the possibility of running REW on the RPi4 (not sure about the other software) but it is slow and IIRC if you are running CamillaDSP it effectively locks out the use of the analog inputs. I think the solution here is to use your RME as a mic preamp instead of the Mk5.

You need to set your crossovers prior to running Dirac. Other than that you can choose to limit the frequency range for Dirac correction.

Michael
 

juliangst

Addicted to Fun and Learning
Joined
Dec 11, 2021
Messages
976
Likes
1,000
Location
Germany
USB devices can only have one host, so if you are using CamillaDSP on the RPi4 you will not be able to use the Mk5 as an analog preamp for REW measurements on another computer. There is the possibility of running REW on the RPi4 (not sure about the other software) but it is slow and IIRC if you are running CamillaDSP it effectively locks out the use of the analog inputs. I think the solution here is to use your RME as a mic preamp instead of the Mk5.

You need to set your crossovers prior to running Dirac. Other than that you can choose to limit the frequency range for Dirac correction.

Michael
I'm also interested in CamillaDSP with Dirac with a 2.1 setup. I'm just running the Dirac Live test version and it works fine with EQ Apo on Windows.

Does Dirac Live (multichannel) support multichannel DACs like the Motu UL or Topping DM7 to do similar high and low pass filtering or is CamillaDSP or something similar still required to do so?

I'm running a stereo setup at the moment but If I spend the money on a multichannel DAC I might want to use it for more than 2 channeln for occasional movie watching or apple music dolby atmos content.
 

phofman

Addicted to Fun and Learning
Joined
Apr 13, 2021
Messages
502
Likes
326
One option is running REW on RPi. I would not be surprised if it fared quite well. Certainly I would recommend latest java instead of the default java8. Also it's likely 64-bit distribution + java would perform better on RPi4.

Another option is using the UAC2 gadget on RPi4 and have camillaDSP with fiters -> MOTU in one direction and MOTU -> camillaDSP as plain loopback in the other direction.
 

juliangst

Addicted to Fun and Learning
Joined
Dec 11, 2021
Messages
976
Likes
1,000
Location
Germany
One option is running REW on RPi. I would not be surprised if it fared quite well. Certainly I would recommend latest java instead of the default java8. Also it's likely 64-bit distribution + java would perform better on RPi4.

Another option is using the UAC2 gadget on RPi4 and have camillaDSP with fiters -> MOTU in one direction and MOTU -> camillaDSP as plain loopback in the other direction.
Isn't REW just for measurements? You could create filters with REW on a PC and copy the filters to the Pi running CamillaDSP
 

juliangst

Addicted to Fun and Learning
Joined
Dec 11, 2021
Messages
976
Likes
1,000
Location
Germany
I don't really know how it works, take this as a question, not as an answer. But if you have a dirac licence in your pc, can you transfer the filters to a different system?
Run rew and create filters in a pc and then use them in a pi is for sure not a problem, but if you want to create the filters with dirac, that's probably a different story...
Nope, For dirac you have to download dirac live and dirac live processor. Dirac live is for the measurements and the created filters only work with the Dirac Live Processor which acts as a virtual audio device
 
  • Like
Reactions: MCH

jbjbjbjbjb

Member
Joined
Feb 12, 2022
Messages
24
Likes
12
hello gang,

I finally bought a used minidsp 2x4HD and have it working as toslink capture device. It works as expected. My current setup looks like this:

tv -> toslink 2channels@48KHz -> 2x4HD -> USB -> rpi4/camilladsp (xovers+eq) -> USB(4channels@96KHz) -> Motu M4 -> amps

This is great news. Could you please post your capture settings? I can't get it to work yet...
 
Top Bottom