alsa Loopback Device for DSP action

Raspberry Pi related support

alsa Loopback Device for DSP action

Postby Slaughthammer » 09 Jan 2022, 12:33

Hi folks,

I'm in the process of setting up a RasPi 3 B v1.2 with runeaudio (version: rAudio1). I am using active speakers and want to integrate the necessary DSP-functionality into the Pi using ecasound, following the instructions by Richard Taylor

On other systems I was able to create an alsa loopback device, use that as default audio sink and than connect the other end of that to ecasound which then outputs into the actual multichannel soundcard.

I was able to create the loopback device in runeaudio by creating the files /etc/modprobe.d/alsa-aloop.conf containing "options snd-aloop enable=1 index=3 pcm_substreams=1 id=Loopback" and /etc/modules-load.d/snd_aloop.conf containing "snd_aloop". However, this loopback device is not recognised by runeaudio as output option. The gears next to the Output options give me the following:
Code: Select all
# cat /etc/asound.conf
defaults.pcm.card 2
defaults.ctl.card 2

# aplay -l | grep ^card
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
card 2: ICUSBAUDIO7D [ICUSBAUDIO7D], device 0: USB Audio [USB Audio]

but in ssh I get:
Code: Select all
rAudio:~  #  cat /etc/asound.conf
defaults.pcm.card 2
defaults.ctl.card 2
rAudio:~  #  aplay -l | grep ^card
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
card 2: ICUSBAUDIO7D [ICUSBAUDIO7D], device 0: USB Audio [USB Audio]
card 3: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
card 3: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]


Any suggestions how to proceed? My goal is to route all audio output to the Loopback device.

Thnaks in advance!
Slaughthammer
 
Posts: 4
Joined: 23 Apr 2015, 20:12

Re: alsa Loopback Device for DSP action

Postby Slaughthammer » 09 Jan 2022, 18:02

Ok, this problem was resolved.

loopback devices are filtered out of the aplay list. This can be removed by editing the files /srv/http/bash/player.sh and /srv/http/bash/mpd-devices.sh

just search for loopback and edit the line
Code: Select all
devices+=$'\n\n<bll># aplay -l | grep ^card</bll>\n'$( aplay -l | grep ^card  | grep -v Loopback )

to
Code: Select all
devices+=$'\n\n<bll># aplay -l | grep ^card</bll>\n'$( aplay -l | grep ^card )

in both files. No reboot required.
Slaughthammer
 
Posts: 4
Joined: 23 Apr 2015, 20:12

Re: alsa Loopback Device for DSP action

Postby Slaughthammer » 09 Jan 2022, 23:41

In case someone reads this far, this setups is now up and running nice. In case someone wants to recreate this, I used the cheap Logilink UA0099 7.1 USB for this.

I ran into one more Problem: If you want to run MPD into the Loopback without an HDMI-Device attached on boot you should use index 2 instead of index 3 as I did in my start post. Somehow MPD does not like to have to play into device 3 when there is no device 2 present. Somehow bluetooth audio still came through fine. Well, just be aware.
Slaughthammer
 
Posts: 4
Joined: 23 Apr 2015, 20:12

support RuneAudio Donate with PayPal


Return to Raspberry Pi

Who is online

Users browsing this forum: Bing [Bot] and 14 guests
cron