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

Pi4 + CamillaDSP + Audio Interface (Motu M4) = Phenomal DSP streamer

Josef S

New Member
Joined
Oct 17, 2020
Messages
3
Likes
1
Dear All,
I´m sailing a similar boat: building a 4-way crossover based on CamillaDSP, PI4, RaspberryOS, Hifiberry Digi + I/O (for S/PDIF mono input), Motu M4 (as output to analog PAs).
Development tools are: WIN10 PC with REW, Rephase, Behringer mic, Terratec DMX 6fire

I´ve made my first CamillaDSP steps on a PC with Soundblaster Audigy, Ubuntu: quite encouraging results. Everything on sample rate 96000.
Now, changing to the productive hardware platform, I´m a bit confused and Google makes it sometimes even worse :-( .

Running REW (6fire) and Camilla (Digi in M4 out) both on 44100, the whole system is working and I can perform my measurements. Resampling disabled.

aplay dump tells me, that M4 can handle 44100 and 192000
arecord dump tells me, that Digi can handle 32000 (!?) and 192000
6fire can do max 96000 on S/PDIF (no idea, why not 192000, might be a driver issue of this old device, but anyway)

Now my confusion: why is Digi working with the 44100 input signal? Is the arecord dump just a nice information with no further effect or is there something mysterious working in the background?
Is there a chance, to bring everything on 96000? Meaning, can I put M4 on 96000 somehow? And also Digi?

There are so many bits and pieces of information floating around, puzzling them together is really hard: can someone recommend a comprehensive source of wisdom? The internet with all it´s lengthy threads is so inefficient.

Now, having CamillaDSP, it would be so cool, to get a user friendly hardware (and driver) setup, just like the very first minidsp. Hasn´t to be cheap!

Any advice wormly wellcome!
Best, Josef
 

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,369
Location
Detroit, MI
arecord and aplay are reporting a range of sample rates, not specific rates. So for example your M4 can use 44100, 48000, 88200, 96000, 176400 and 192000, not just 44100 and 192000.

Assuming you have a 96 kHz source you should be able to run both the DIGI+ I/O and the M4 at 96000 Hz. I think you will still need to use resampling and rate adjust to prevent buffer underruns as a result of clock drift between the two.

Michael
 

Josef S

New Member
Joined
Oct 17, 2020
Messages
3
Likes
1
THX Michael,
this is useful information! Will give it a try and report back
Josef
 
D

Deleted member 23982

Guest
You might try adding enable_rate_adjust: true. In reading through the DIYaudio thread (post 1091) Henrik suggested this would help prevent buffer under runs. I've been running through squeezelite with CamillaDSP (although not a MOTU M4) and haven't had any drop outs.

Michael
Thanks! i overlooked it but noticed occasional (very subtle) clicks that are gone now :)
 
D

Deleted member 23982

Guest
btw i use moode with camilladsp and can just recommend it, it seems to run very stable,
the only thing i noticed is when changing songs "mid-song" it sounds like this -> music stops -> old song starts again where it stops, continues to play for like a sec (as if the buffer needs to get emptied) -> and just then the new songs start, tho it doesnt happen every time

also its a bit unclear, but the samplerate you put doesnt matter with moode, it will use the samplerate of the song (so same samplerate in and out) UNLESS you enable resampling

Also: resampling needs quite alot cpu% but if disabled camilladsp needs barely 5% with a 2.0 setup and underclocked(!) rpi4 :) (its 40% with balancedasync and 80% with accurateasync with resampling to 192khz)
 
Last edited by a moderator:

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,369
Location
Detroit, MI
I am skeptical of the claim that Moode does not resample. The only way to get around resampling is to restart CamillaDSP every time the sample rate changes and load a new configuration for that sample rate. Hopefully that resampling is done in a high quality manner and does not default to ALSA resampling.

I assume you haven’t made any measurements to confirm that resampling is not occurring?

Michael
 
D

Deleted member 23982

Guest
I am skeptical of the claim that Moode does not resample. The only way to get around resampling is to restart CamillaDSP every time the sample rate changes and load a new configuration for that sample rate. Hopefully that resampling is done in a high quality manner and does not default to ALSA resampling.

I assume you haven’t made any measurements to confirm that resampling is not occurring?

Michael
i tested it with a topping d10, which shows the sampling rate, it was the same as the file/input, also resampling worked as expected :)
 

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,369
Location
Detroit, MI
Downloaded Moode to check this out and man I forgot how much I hate it. I agree that it is not resampling but it is restarting CamillaDSP and changing the configuration file to match the sample rate if your source sample rate changes. I prefer to keep the DSP at a constant sample rate so that the processing stays the same, otherwise your filters will be slightly different depending on sample rate (high frequency warping) and if you are using convolution you will need separate convolution filters for each sample rate.

Your numbers with resampling are pretty similar to what I observed. As I understand it resampling runs on it's own CPU so you are using about 35% of a single core for balancedasync and 75% of a single core accurateasync with about 5% of a separate CPU for the remaining processing.

Michael
 

beneix

Member
Joined
Dec 25, 2021
Messages
14
Likes
5
Yeah I need to do some more testing to narrow it down on my setup. I still haven't managed to turn off the pass-through of the DAC+DSP. The Hifiberry support wasn't much use. They basically told me to come up with my own profile as it does the pass-through by default. However, since I have that pass-through, I am running both in my DAC, and the toslink out from hifiberry doesn't exhibit the big delay like the USB out (both going to the same DAC and I can switch inputs).
Hi dorirod – I just wanted to see if you have been able to sort out all your issues? I am about to embark on getting my RPi4 with a HiFiBerry DAC+DSP HAT up and running with CamillaDSP, and am trying to preempt problems by learning from you and Michael. Are you running Raspbian 5.10 32-bit?
 

dorirod

Active Member
Joined
Oct 9, 2019
Messages
255
Likes
257
Hi dorirod – I just wanted to see if you have been able to sort out all your issues? I am about to embark on getting my RPi4 with a HiFiBerry DAC+DSP HAT up and running with CamillaDSP, and am trying to preempt problems by learning from you and Michael. Are you running Raspbian 5.10 32-bit?
Hello, no I haven't had time to dig into them deeper, so I've been living with them for now. I am using:

moOde audio player
Release 7.5.0 2021-11-09

pi@mypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"


I would say start with Michael's excellent post #74 before you start troubleshooting from other random sites:
 

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,369
Location
Detroit, MI
Hello, no I haven't had time to dig into them deeper, so I've been living with them for now. I am using:

moOde audio player
Release 7.5.0 2021-11-09

pi@mypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"


I would say start with Michael's excellent post #74 before you start troubleshooting from other random sites:

We’re you running Moode this whole time? I recently worked through some troubleshooting with someone on DIYAudio trying to use an analog input with a Moode CamillaDSP implementation and my conclusion was that Moode does not play nice with any sort of hardware input.

Michael
 

dorirod

Active Member
Joined
Oct 9, 2019
Messages
255
Likes
257
We’re you running Moode this whole time? I recently worked through some troubleshooting with someone on DIYAudio trying to use an analog input with a Moode CamillaDSP implementation and my conclusion was that Moode does not play nice with any sort of hardware input.

Michael
I have two different micro sd cards, one is vanilla raspbian, so I have actually tried both, but yes currently using moode. To make matters worse, I did a distupgrade and moode (the gui) didn't like that at all, but I have more or less fixed it. It is fairly stable, I leave it running without issues, besides the main one which is still the audio latency.

I use camilladsp outside of moode though, separate process. I just leave moode for the stations. Once I have time I'll go back to the vanilla one.
 

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,369
Location
Detroit, MI
I have two different micro sd cards, one is vanilla raspbian, so I have actually tried both, but yes currently using moode. To make matters worse, I did a distupgrade and moode (the gui) didn't like that at all, but I have more or less fixed it. It is fairly stable, I leave it running without issues, besides the main one which is still the audio latency.

I use camilladsp outside of moode though, separate process. I just leave moode for the stations. Once I have time I'll go back to the vanilla one.

Got it, that all makes sense. Good point on using CamillaDSP outside of Moode, that is probably a good solution for a lot of folks that want more input functionality.

Michael
 

bogart

Active Member
Forum Donor
Joined
Sep 10, 2019
Messages
251
Likes
312
@mdsimon2 - by any chance are you a Deezer subscriber? I was curious about using this approach to enable headless playback on a pi using your streamer setup; it'd have to be the web player, but it's an interesting thought (and a way around moode...)


If you're not using Deezer, I'll just do the basic pi setup on one of mine and give it a spin.
 

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,369
Location
Detroit, MI
@mdsimon2 - by any chance are you a Deezer subscriber? I was curious about using this approach to enable headless playback on a pi using your streamer setup; it'd have to be the web player, but it's an interesting thought (and a way around moode...)


If you're not using Deezer, I'll just do the basic pi setup on one of mine and give it a spin.

I am not a Deezer subscriber, sorry. Anything that can play to the Loopback soundcard at set 44.1 kHz sample rate should work.

Michael
 

bogart

Active Member
Forum Donor
Joined
Sep 10, 2019
Messages
251
Likes
312
I am not a Deezer subscriber, sorry. Anything that can play to the Loopback soundcard at set 44.1 kHz sample rate should work.

Michael
Thanks anyhow, gives me a micro-project to attempt this weekend!
 

georgew2

Member
Joined
Jan 21, 2022
Messages
24
Likes
10
I wonder this: What's the best way to connect a sub like jbl 310s (which has two inputs, left-right channel) with motu m4 (the system is 2.1).

I need only one cable from motu to 310s connectin to right or left channel, or do I need two cables connecting both left and right chanell?
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,759
Likes
3,066
I wonder this: What's the best way to connect a sub like jbl 310s (which has two inputs, left-right channel) with motu m4 (the system is 2.1).

I need only one cable from motu to 310s connectin to right or left channel, or do I need two cables connecting both left and right chanell?
I'd try to explain, but it seems like they already did a good job in the manual. Perhaps it's one of those things that's confusing if you don't already understand it though. Is there a specific bit you're having trouble with?
https://jblpro.com/en/site_elements/3-series-owner-s-manual
edit: can you clarify what you mean by 2.1? Are you using 3 outputs on the m4 for L, R, LFE, or just 2 outputs from the m4 and mean you've got one 310s?
 

georgew2

Member
Joined
Jan 21, 2022
Messages
24
Likes
10
I'd try to explain, but it seems like they already did a good job in the manual. Perhaps it's one of those things that's confusing if you don't already understand it though. Is there a specific bit you're having trouble with?
https://jblpro.com/en/site_elements/3-series-owner-s-manual
edit: can you clarify what you mean by 2.1? Are you using 3 outputs on the m4 for L, R, LFE, or just 2 outputs from the m4 and mean you've got one 310s?

I have two speakers (left, right) and the sub.

I don't want to connect the speakers from lsr310s, but from motu m4 (because I want to make room correction).

So the appropriate solution is to use 3 outputs from motu and use output one of them for the sub with one cable? or do I need to use two outputs from motu m4 to sub?

I am troubled has 2 inputs (left, right).
 
Top Bottom