• Welcome to ASR. 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

Have you added dtoverlay = hifiberry-digi to your config.txt? Assuming you are using Ubuntu config.txt is located at /boot/firmware/config.txt.

Michael

And I should reiterate that I can see absolutely no reason to use a HifiBerry DIGI+ I/O as you can just use the TOSLINK input functionality of the MOTU Ultralite Mk5. All you need to do is set the MOTU clock source to optical and use channels 12 and 13 from the MOTU as inputs (assuming your are running at 96 kHz). The start of a CamillaDSP yml file showing such a setup is shown below.

Code:
---
devices:
  samplerate: 96000
  chunksize: 4096
  enable_resampling: true
  resampler_type: BalancedAsync
  silence_threshold: -100
  silence_timeout: 5.0

  capture:
    type: Alsa
    channels: 16
    device: "hw:UltraLitemk5"
    format: S24LE3
  playback:
    type: Alsa
    channels: 18
    device: "hw:UltraLitemk5"
    format: S24LE3

mixers:
  2to10chan:
    channels:
      in: 16
      out: 18
    mapping:
      - dest: 0
        sources:
          - channel: 12
            gain: 0
            inverted: false
      - dest: 1
        sources:
          - channel: 13
            gain: 0
            inverted: false

Michael
 
How familiar are you with CamillaDSP, do you have a working CamillaDSP configuration file with the MOTU?

If you have a MOTU Ultralite Mk5 I do not think the HifiBerry DIGI I/O is needed as the MOTU has a TOSLINK input. Why do you want to use the HifiBerry?

Can you describe the input / outputs you are trying to use?

Michael
Thanks a lot for helping Michael.
I have a 2 way stereo and 2 subs. So far I have the CamillaGui going and have been able to configure a bunch of filters, mixer and pipeline. Tweaking the yaml file is easy anyway. The final configuration is as follows:

TV out Toslink Hifiberry DIGI I/O R Pi 4 / CamillaDSP USB or Toslink Motu Balanced 4 channel Amp + 2 subs

For initial development in my office space, configuration has slight difference, instead of TV, I will use laptop USB to R Pi
 
And I should reiterate that I can see absolutely no reason to use a HifiBerry DIGI+ I/O as you can just use the TOSLINK input functionality of the MOTU Ultralite Mk5. All you need to do is set the MOTU clock source to optical and use channels 12 and 13 from the MOTU as inputs (assuming your are running at 96 kHz). The start of a CamillaDSP yml file showing such a setup is shown below.
I had not considered using Toslink in on Motu and send that stream on USB to Pi. Thanks for pointing this much simpler and cheaper configuration. I might just do that.

dtoverlay = hifiberry-digi
Adding this to the config.txt changed the situation. Toslink now appears to be recognized.
aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones] <snip> card 3: sndrpihifiberry [snd_rpi_hifiberry_digi], device 0: HifiBerry Digi HiFi wm8804-spdif-0 [HifiBerry Digi HiFi wm8804-spdif-0] Subdevices: 1/1 Subdevice #0: subdevice #0

Next step install CamillaDSP and set it up as a service.
 
And I should reiterate that I can see absolutely no reason to use a HifiBerry DIGI+ I/O as you can just use the TOSLINK input functionality of the MOTU Ultralite Mk5. All you need to do is set the MOTU clock source to optical and use channels 12 and 13 from the MOTU as inputs (assuming your are running at 96 kHz). The start of a CamillaDSP yml file showing such a setup is shown below.



Michael
Question since I've not paid as close attention to this idea as I'd like. I have a potential application where I'd need to switch between analog and digital inputs. Is this easy-ish to do with a Pi/Camilla/Motu setup? I'm assuming you'd have to restart CamillaDSP with a different config when switching clock sources, but I'm not sure whether there are folks that have scripted something around this.
I might be able to get rid of this requirement if I can just integrate PiCorePlayer as others have done, but having the SB Touch display is rather convenient.
The alternative is to just get a MiniDSP Flex which should do everything I need out of the box in a somewhat more wife-friendly package. But in theory I have everything I need to at least prototype this approach.
 
Question since I've not paid as close attention to this idea as I'd like. I have a potential application where I'd need to switch between analog and digital inputs. Is this easy-ish to do with a Pi/Camilla/Motu setup? I'm assuming you'd have to restart CamillaDSP with a different config when switching clock sources, but I'm not sure whether there are folks that have scripted something around this.
I might be able to get rid of this requirement if I can just integrate PiCorePlayer as others have done, but having the SB Touch display is rather convenient.
The alternative is to just get a MiniDSP Flex which should do everything I need out of the box in a somewhat more wife-friendly package. But in theory I have everything I need to at least prototype this approach.

It depends on what digital input you are using. If you are using the USB input there is no need to change the clock source from internal. It also seems like if you have a SPDIF or TOSLINK source that was always outputting (even when silenced) you could clock the MOTU with this when using the analog inputs. The only thing I know that definitely does not work is using SPDIF or TOSLINK inputs with the internal clock source.

If you were only using USB input or analog inputs you could set up your CamillaDSP routing such that both analog and digital inputs were always active and then there would be no need to restart CamillaDSP.

With the miniDSP Flex not sure if you are talking about using the Flex instead of the MOTU or if you are talking about using a Flex u/s of the MOTU for source selection. The Flex (preferably the unreleased digital output version) u/s of the MOTU would be great as it would solve the source selection and remote volume control issues of the MOTU in a very elegant and user friendly manner. I do something similar with my Okto dac8 pro system where I have an OpenDRC-DI u/s for source selection (although I use the Okto volume control).

Michael
 
I was facing a weird problem. When I connected Pi to Motu on any of the USB ports, the Pi's wifi connection would go crazy. Before I discovered this, I had already spent a lot of time trying to chase down the WIFI issue, I even threw away the work I had done by redoing the Pi's OS. On a hunch I changed the USB cable and the problem went away. From now I must not touch the USB cable. :mad:
 
I was facing a weird problem. When I connected Pi to Motu on any of the USB ports, the Pi's wifi connection would go crazy. Before I discovered this, I had already spent a lot of time trying to chase down the WIFI issue, I even threw away the work I had done by redoing the Pi's OS. On a hunch I changed the USB cable and the problem went away. From now I must not touch the USB cable. :mad:

Interesting, which Pi and OS? I assume this was a MOTU M4?

Michael
 
Interesting, which Pi and OS? I assume this was a MOTU M4?

Michael
The problem is back.
Motu Ultralight Mk5 and Raspberry Pi OS 32 bit. Earlier I had tried Ubuntu Server but failed to configure Wifi and so I gave up on that. With a desktop installed I can get Wifi to work.
This is a major pain now. I will have to work without WIFI, do everything from desktop :(

I also have Hifiberry DIGI I/O, I will try removing it and see if that makes any improvement. Anyway I am not presently using Toslink Input.
 
The problem is back.
Motu Ultralight Mk5 and Raspberry Pi OS 32 bit. Earlier I had tried Ubuntu Server but failed to configure Wifi and so I gave up on that. With a desktop installed I can get Wifi to work.
This is a major pain now. I will have to work without WIFI, do everything from desktop :(

I also have Hifiberry DIGI I/O, I will try removing it and see if that makes any improvement. Anyway I am not presently using Toslink Input.

Interesting, I see similar issues on Raspberry Pi OS (believe it was 64 bit, not sure about 32 bit) with my Ultralite Mk5. I get absolutely no network connectivity (no wifi, no ethernet) with the Mk5 connected. It seems like it has something to do with the fact the Ultralite is USB-ethernet device.

Although all is good on Ubuntu Server. Wifi should be pretty easy to setup by following these instructions -> https://ubuntu.com/tutorials/how-to...5dmguca9OG0RQaAtv4EALw_wcB#3-wifi-or-ethernet.

I assume this is a RPi4?

Michael
 
Thanks Michael.
Ok, looks like Motu has messed up their implementation, teasing us with an IP address although the functionality has not been implemented.
Quick question, are you using 32 bit or 64 bit ubuntu server.
 
I don't think motu have messed up their implementation as such - for supported platforms their provided software just sorts it out. For linux it's up to the distro's network hotplugging rules to sort out, and given that audio devices presenting a network interface over USB are a bit of an oddity it's not surprising they don't always 'Just Work' in that situation. The rules and implementation vary somewhat between distros too, so whether it works and how to override it manually are a bit different for each. Welcome to the wonderful world of networking ;) Bringing the Motu network interface down or leaving it unconfigured is probably the easiest option if it's not needed. Sharing it with the rest of your network for use with CueMix (if it can actually work that way) should be possible, but rather more complicated!
 
I work in IT and have done plenty of product management. Beg to differ. Plug something on USB and WIFI dies? Does not compute, specially when the device has no networking built in. Anyway, probably this is not the place to discuss what Motu should or shouldn't have done.
 
Michael,
I have ubuntu desktop running with Motu plugged in and Wifi is on. However, camilladsp fails with this error:

ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card Dec 17 12:31:36.162 ERRO Playback error: ALSA function 'snd_pcm_open' failed with error 'ENODEV: No such device', module: camilladsp Dec 17 12:31:36.163 ERRO Message channel error: receiving on a closed channel, module: camillalib::processing

This is what I have in the config:
capture: type: Alsa channels: 10 device: "hw:UltraLitemk5" format: S24LE3 playback: type: Alsa channels: 22 device: "hw:UltraLitemk5" format: S24LE3

Tried listing the devices
aplay -L null arecord -L null

lshw -C sound *-usb:0 description: Audio device product: UltraLite-mk5 vendor: MOTU physical id: 2 bus info: usb@1:1.2 version: 2.00 serial: 0001f2fffeffec70 capabilities: usb-2.00 audio-control configuration: driver=cdc_ether maxpower=100mA speed=480Mbit/s

Changed the device id to UltraLite-mk5 in the config and tried, no luck.
Please help debug this.
Site Admins: Am I hogging this thread? Please let me know if I should open a new thread.
 
Hmm, odd that aplay and arecord are not showing any devices, you would have expected it to report built-in outputs (i.e. headphones). You will need to get that fixed before worrying about the configuration. I have not used Ubuntu Desktop so I am not sure what may have caused this, I can try it out tonight and see if I get a similar issue.

I do have some random thoughts. Does Ubuntu Desktop use pulseaudio? I wonder if that might be causing an issue. Also what version of Ubuntu are you specifically using, 21.10 or 20.04 (LTS)? 32 bit or 64 bit?

Michael
 
Ubuntu Desktop 21.10 64 bit
uname -a Linux pi 5.13.0-1011-raspi #13-Ubuntu SMP PREEMPT Fri Nov 19 18:40:23 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

I cannot get WIFI working on Ubuntu server 64 bit, I get stuck with errors. Works well with Desktop or PI OS.
 
Where are you running aplay/arecord from? If I ssh into a lubuntu desktop box (intel not pi) while there's no active gui session then I don't see sound devices unless I use sudo. Once I've started a local gui session (as the same user as the ssh session) aplay shows the devices in both the ssh session and when run in a local terminal. I assume it's something to do with the session management, and it does seem to stop headless audio stuff working as I'm used to. I haven't dug further as I'm intending to ditch lubuntu for other reasons.
 
Thanks for the tip @somebodyelse. I had powered it down, to try out your suggestion, I switched it on and found that aplay could find devices. Now I am confused as to why it wasn't working before, I had the GUI on and I was ssh from my laptop. Exact same thing gets different result now. So maybe it needed a reboot. I am no longer getting errors, so I can make progress getting the dsp config working.
 
Similar to how sudo aplay -l works correctly even if you are not logged in to the GUI, if you run CamillaDSP as root it will run without being logged in to the GUI. The default service documented on the CamillaDSP GitHub runs it as root so if you use that everything will work fine.

I have CamillaDSP running fine on Ubuntu Desktop as we speak, haven't listened very long but seems to be no issues.

I'd probably troubleshoot the wifi issues on Ubuntu Server as a full blown desktop install feels very bloated for this application but that is up to you.

Michael
 
Back
Top Bottom