Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Thread Closed 
Problem: Output to Loopback device
#1
Hi all,

Using the latest Moode distro on a Raspberry Pi 5, I'm trying to output audio to the Loopback ALSA device, but Moode won't let me (Device is reserved... ).

My system I try to setup is Moode playing to the Loopback device, which then pipes back into JACK2 for audio routing. I have a ADC input which I'd like to be able to use as well, i.e. ADC and Moode will be two inputs to the routing.

Thoughts?
/R
#2
You can turn the loopback device on in the ALSA Options section of Audio Config.

   

Code:
pi@lcd:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 1: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 2: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
 Subdevices: 8/8
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
 Subdevice #4: subdevice #4
 Subdevice #5: subdevice #5
 Subdevice #6: subdevice #6
 Subdevice #7: subdevice #7
card 2: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
 Subdevices: 8/8
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
 Subdevice #4: subdevice #4
 Subdevice #5: subdevice #5
 Subdevice #6: subdevice #6
 Subdevice #7: subdevice #7
pi@lcd:~ $
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
#3
Thanks, I did do that. But when selecting the Loopback device as output, Moode pops up a dialog saying "Device is reserved and cannot be used for output" (or something to that effect)... Sad

To be clear, I want only output to the Loopback, and nothing else.
#4
The "Output device" field is for the real audio device which is why it can't be set to Loopback. The Loopback configuration just provides a copy of the PCM stream being sent to the actual device.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
#5
Too bad. That will defeat my setup. Sad

Is there a way to inhibit this check and allow Loopback as output device?
#6
To be more specific, this is what I want to accomplish:

<dammit, image malfunction, how can I insert a clipboard image?>
#7
I don't know if I understood your question. Some time ago I tried to input sound through a microphone interface and listen to the microphone input and moode at the same time. I remember I had to load this module and fiddle a little with configs in the terminal.
Code:
snd_loopback
This is the site I draw some info from: https://raspberrypi.stackexchange.com/qu...as-audio-i
#8
The loopback is fixed with Tim's suggestion (i.e. enable Loopback in Moode). However, that means that Moode opens the Loopback AND the output sound card for audio.

I want to use the output sound card in JACK router and route Moode audio to JACK through the Loopback device. So I would like to have Moode to use ONLY the Loopback device. 

Loading the snd-loopback module exposes the Loopback devices in ALSA, as you pointed out. However, Moode has been coded so that it is not possible to select that Loopback device as output sound card. If that was possible, all my problems would be solved Smile

Maybe the inhibition of selecting the Loopback device should only be done if the Loopback is enabled within Moode?

EDIT: Actually, being able to select the Dummy ALSA device would solve the problem, I think... https://github.com/moode-player/moode/bl...s.php#L232
#9
(05-23-2025, 09:06 AM)robiwan Wrote: The loopback is fixed with Tim's suggestion (i.e. enable Loopback in Moode). However, that means that Moode opens the Loopback AND the output sound card for audio.

I want to use the output sound card in JACK router and route Moode audio to JACK through the Loopback device. So I would like to have Moode to use ONLY the Loopback device. 

Loading the snd-loopback module exposes the Loopback devices in ALSA, as you pointed out. However, Moode has been coded so that it is not possible to select that Loopback device as output sound card. If that was possible, all my problems would be solved Smile

Maybe the inhibition of selecting the Loopback device should only be done if the Loopback is enabled within Moode?

What exactly is your usage scenario where you need to use Jack for audio routing?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
#10
(05-23-2025, 11:51 AM)Tim Curtis Wrote: What exactly is your usage scenario where you need to use Jack for audio routing?

I'm glad you asked Smile tried to put up a clipboard picture of it... I'll try with text:
Sources (routed into JACK)
- Analog input(s) (Hifiberry 8-ch ADC ALSA) (nominally the output of a TV set running Chromecast)
- Moode (Loopback ALSA)
Routing:
- JACK
Processing (DSP):
- Carla (JACK plugin processor that can load LADSPA plugins)
Output:
- Analog output (Hifiberry 8-ch DAC ALSA) (to L/R speakers + subwoofer(s) )

Using the Chromecast IR remote, I'll be able to switch between the sources basically and set the output volume/mute.

Carla will be running a LADSPA plugin for room correction, which is the whole purpose of this setup (AFAICT CamillaDSP cannot load LADSPA plugins). And also, I need the analog input.


Forum Jump: