• 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,508
Likes
3,353
Location
Detroit, MI
I have an audioinjector Octo8. It works. When I tried to set up camilladsp, now I don't get sound. I don't understand the routing. I need code in asound.conf for Octo8 to work and other code to make camilladsp work. How do I combine the code? As of now, it looks like they both are trying to be the default.

P.S. Ignore the lack of filters, pipeline, mixer in alsaconfig.yml. I had it all in there but somehow it got deleted 5 mins ago. I was rushing, 30 min edit time lol

Sincerely,
David Piel

From your screenshot it seems like it is running correctly. What source are you using and what do you have set as your output device? If you have Loopback,1 as your capture device in CamillaDSP you will need to have Loopback,0 as output device in your player which is the opposite of what is shown in the tutorial.

Michael
 

Eternalight

Member
Joined
Jul 31, 2022
Messages
11
Likes
0
From your screenshot it seems like it is running correctly. What source are you using and what do you have set as your output device? If you have Loopback,1 as your capture device in CamillaDSP you will need to have Loopback,0 as output device in your player which is the opposite of what is shown in the tutorial.

Michael
I'm using bluetooth from samsung phone, or playing youtube/MP4 files from my ripped CDs. Did you look at my asound.conf file? if that cool or is there a conflict? I was setting the audioinjectoroc as the output device. But as everyone knows the octo8 is a weird beast. So IDK if this is correct.
There are several places in the setup docs where loopback,0 and loopback,1 are swapped and vis versa
 
Last edited:

Eternalight

Member
Joined
Jul 31, 2022
Messages
11
Likes
0
What specific players are you using (librespot, squeezelite, etc)? Do you have your player output device set to Loopback,0? Are your players always outputting 44100 Hz?

Michael
Vlc and youtube through chromium. Ii don't know do to tell chromium to do that. Vlc have 20 audio devices on it with 12 of them being loopback. It does specify 0/1 but I tried them all. Doesn't work
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,508
Likes
3,353
Location
Detroit, MI
Vlc and youtube through chromium. Ii don't know do to tell chromium to do that. Vlc have 20 audio devices on it with 12 of them being loopback. It does specify 0/1 but I tried them all. Doesn't work

Do you ever see anything on the CamillaDSPinput meters? Given that your setup is up and running it seems that it can only be one of a few things.

1) Incorrect player output device
2) Sample rate mismatch between player and CamillaDSP configuration
3) Incorrect CamillaDSP routing (do not know about this one because your configuration did not show routing)

I don't think the log will tell you a whole lot if the configuration is not crashing.

I guess it could also be something with your ALSA configuration of the DAC although it should just be the matter of using the same exact configuration that works on it's own and then incorporating the Loopback / CamillaDSP routing. Did you change anything in your DAC configuration when implementing CamillaDSP?

I would personally suggest starting with one of the players that I have well documented in the tutorial (shairport-sync, squeezelite, bluez-alsa, librespot) as it eliminates the extra variable of a new player. At this point there is not much else I can offer from a troubleshooting perspective.

Michael
 

Eternalight

Member
Joined
Jul 31, 2022
Messages
11
Likes
0
Do you ever see anything on the CamillaDSPinput meters? Given that your setup is up and running it seems that it can only be one of a few things.

1) Incorrect player output device
2) Sample rate mismatch between player and CamillaDSP configuration
3) Incorrect CamillaDSP routing (do not know about this one because your configuration did not show routing)

I don't think the log will tell you a whole lot if the configuration is not crashing.

I guess it could also be something with your ALSA configuration of the DAC although it should just be the matter of using the same exact configuration that works on it's own and then incorporating the Loopback / CamillaDSP routing. Did you change anything in your DAC configuration when implementing CamillaDSP?

I would personally suggest starting with one of the players that I have well documented in the tutorial (shairport-sync, squeezelite, bluez-alsa, librespot) as it eliminates the extra variable of a new player. At this point there is not much else I can offer from a troubleshooting perspective.

Michael
No nothing on the meters. I originally pasted over the configuration in asound.conf with camilla then after a week of banging my head against the wall, I realized I need to put dac configuration in as well. I did that and that's the file attached on previous post.
What is the relationship between loopback0 loopback1, dac hw, and it's software plugin? No one seems to really spell out the audio path. Could me asoundrec.conf be off?
 

Attachments

  • 2022-08-02.png
    2022-08-02.png
    602.6 KB · Views: 54

phofman

Senior Member
Joined
Apr 13, 2021
Messages
497
Likes
322
Capturing from loopback and playback to a real HW requires enabling rate_adjust as these two devices run with different clocks.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,508
Likes
3,353
Location
Detroit, MI
No nothing on the meters. I originally pasted over the configuration in asound.conf with camilla then after a week of banging my head against the wall, I realized I need to put dac configuration in as well. I did that and that's the file attached on previous post.
What is the relationship between loopback0 loopback1, dac hw, and it's software plugin? No one seems to really spell out the audio path. Could me asoundrec.conf be off?

I do not have any asound configuration experience but again if it works on it's own it should work with CamillaDSP.

You should always have two Loopback devices (0 and 1) and whatever you use for your player should be opposite of what you use for CamillaDSP capture.

If you set the player output to Loopback,0 and the CamillaDSP capture device to Loopback,1 the routing looks like: Player -> Loopback,0 (playback) -> Loopback,1 (capture) -> CamillaDSP routing / processing -> DAC.

Michael
 

Eternalight

Member
Joined
Jul 31, 2022
Messages
11
Likes
0
I do not have any asound configuration experience but again if it works on it's own it should work with CamillaDSP.

You should always have two Loopback devices (0 and 1) and whatever you use for your player should be opposite of what you use for CamillaDSP capture.

If you set the player output to Loopback,0 and the CamillaDSP capture device to Loopback,1 the routing looks like: Player -> Loopback,0 (playback) -> Loopback,1 (capture) -> CamillaDSP routing / processing -> DAC.

Michael
I tried aplay -D hw:Loopback,1,0 thxtext.wav with camilla set to loopback,1. wav plays but no sound or green bars on meter input/output.
If I switch camilla to hw:Loopback,0 aplay says set_params:1349 Channel count non available.

P.S. Looks like someone at ALSA needs a proofreader
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,508
Likes
3,353
Location
Detroit, MI
Playing to hw:Loopback,1,0 is definitely incorrect if you have CamillaDSP capture device set to Loopback,1.

I would increase the verbosity of the CamillaDSP log and see if it gives an indication of why you are getting an error with hw:Loopback,0 as your capture device. I would guess sample rate, channel count or bit depth mismatch between your player and your CamillaDSP configuration.

Michael
 

Eternalight

Member
Joined
Jul 31, 2022
Messages
11
Likes
0
log file generated from
camilladsp -v -o /home/pi/camilladsp/camilladsp.log /home/pi/camilladsp/config/alsaconfig.yml
 

Attachments

  • camilladsp.txt
    5.5 KB · Views: 42
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,508
Likes
3,353
Location
Detroit, MI
OK, sorry, I thought you were getting a CamillaDSP error but I now understand you were getting an error when using aplay.

If you use plughw:Loopback,0 instead of hw:Loopback,0 with aplay (because you are using Loopback,1 in your configuration) does it work correctly?

Michael
 

Eternalight

Member
Joined
Jul 31, 2022
Messages
11
Likes
0
OK, sorry, I thought you were getting a CamillaDSP error but I now understand you were getting an error when using aplay.

If you use plughw:Loopback,0 instead of hw:Loopback,0 with aplay (because you are using Loopback,1 in your configuration) does it work correctly?

Michael
Nope nothing
 

Attachments

  • 2022-08-02 (1).png
    2022-08-02 (1).png
    2.9 MB · Views: 58

Eternalight

Member
Joined
Jul 31, 2022
Messages
11
Likes
0
No idea at this point.

I can confirm that aplay works fine with my CamillaDSP setup (aplay output to hw:Loopback,1 and hw:Loopback,0 as CamillaDSP capture device) as long as the file sample rate / format match CamillaDSP (or plughw is used).

Michael
O M G it's working now. I was trying to play a mono wav file without sudo. IDK what I all did. It was a combination of like you said wrong loopback and what pho said select rate adjust. VLC, when selecting audio device Loopback,1 works too. YES!!!........ I hate linux. 3 weeks of my life gone, but I'm more knowledgeable now. lol, I was about ready to buy that chinese HDMI converter and install windows 11 on rpi. (don't kill me)

EDIT: ok I spoke too soon, I have the green bars but still no sound
 

Attachments

  • 2022-08-02 (2).png
    2022-08-02 (2).png
    2.3 MB · Views: 64
Last edited:

HenrikEnquist

Member
Joined
Jul 1, 2021
Messages
82
Likes
110
EDIT: ok I spoke too soon, I have the green bars but still no sound
This is strange, the green bars mean that camilladsp thinks everything is ok.
Can you try to use speaker test to the same device that camilladsp uses? Shut down camilladsp, and then type:
speaker-test -D hw:audioinjectoroc -c 8 -r 44100

You should get noise in one channel at a time, moving to the next channel after a few seconds. If this doesn't work, the also camilladsp won't.
 

tinnitus

Active Member
Joined
Jan 26, 2021
Messages
146
Likes
202
Location
Germany
Caution speaker test has no volume control. Output with 0 db. I have already destroyed chassis with this
 

Blew

Active Member
Joined
Jul 24, 2020
Messages
179
Likes
63
Location
Sydney, Australia
Is there a comparable alternative microphone to the MiniDSP UMIK-1 to use for room correction? Shipping costs from minidsp.com for the UMIK-1 are ridiculous, so I wonder if there is an alternative available in retail stores.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,508
Likes
3,353
Location
Detroit, MI
Before the UMIK-1 the Behringer ECM8000 was popular but it isn't USB so you will need a preamp. Parts Express / Dayton has the UMM-6 but that probably isn't convenient for you in Australia.

Michael
 

Blew

Active Member
Joined
Jul 24, 2020
Messages
179
Likes
63
Location
Sydney, Australia
Before the UMIK-1 the Behringer ECM8000 was popular but it isn't USB so you will need a preamp. Parts Express / Dayton has the UMM-6 but that probably isn't convenient for you in Australia.

Michael
Thanks. The ECM8000 is available just down the road from me for about at third of the price of the UMIK-1. It has an XLR interface, so would it be ok to use with the MOTU M4 and a TRS adapter? It might be a bit inconvenient to walk around the room with the laptop + M4 + microphone though, but it's doable I guess.

The UMM-6 is available via Amazon slightly cheaper than the UMIK-1. Which is the better option of the two?
 
Top Bottom