Merge Multiple Soundcards

Hi, can modep use more than one soundcard? I’d like to enable all audio in and out ports available on my system. I’ve read about alsa_in and alsa_out, but I don’t understand how to use/configure it. Given following device list, how to merge the 8 inputs/outputs of the UMC1820 and the 2 inputs/outputs of the pisound?

aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
jack
    JACK Audio Connection Kit
pulse
    PulseAudio Sound Server
default
    Playback/recording through the PulseAudio sound server
output
sysdefault:CARD=LPD8
    Default Audio Device
usbstream:CARD=LPD8
    LPD8
    USB Stream Output
sysdefault:CARD=FIRE
    Default Audio Device
usbstream:CARD=FIRE
    FL STUDIO FIRE
    USB Stream Output
sysdefault:CARD=UMC1820
    UMC1820, USB Audio
    Default Audio Device
front:CARD=UMC1820,DEV=0
    UMC1820, USB Audio
    Front speakers
surround21:CARD=UMC1820,DEV=0
    UMC1820, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=UMC1820,DEV=0
    UMC1820, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=UMC1820,DEV=0
    UMC1820, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=UMC1820,DEV=0
    UMC1820, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=UMC1820,DEV=0
    UMC1820, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=UMC1820,DEV=0
    UMC1820, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=UMC1820,DEV=0
    UMC1820, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=UMC1820,DEV=0
    UMC1820, USB Audio
    Direct sample mixing device
dsnoop:CARD=UMC1820,DEV=0
    UMC1820, USB Audio
    Direct sample snooping device
hw:CARD=UMC1820,DEV=0
    UMC1820, USB Audio
    Direct hardware device without any conversions
plughw:CARD=UMC1820,DEV=0
    UMC1820, USB Audio
    Hardware device with all software conversions
usbstream:CARD=UMC1820
    UMC1820
    USB Stream Output
sysdefault:CARD=b1
    bcm2835 HDMI 1, bcm2835 HDMI 1
    Default Audio Device
dmix:CARD=b1,DEV=0
    bcm2835 HDMI 1, bcm2835 HDMI 1
    Direct sample mixing device
dsnoop:CARD=b1,DEV=0
    bcm2835 HDMI 1, bcm2835 HDMI 1
    Direct sample snooping device
hw:CARD=b1,DEV=0
    bcm2835 HDMI 1, bcm2835 HDMI 1
    Direct hardware device without any conversions
plughw:CARD=b1,DEV=0
    bcm2835 HDMI 1, bcm2835 HDMI 1
    Hardware device with all software conversions
usbstream:CARD=b1
    bcm2835 HDMI 1
    USB Stream Output
sysdefault:CARD=Headphones
    bcm2835 Headphones, bcm2835 Headphones
    Default Audio Device
dmix:CARD=Headphones,DEV=0
    bcm2835 Headphones, bcm2835 Headphones
    Direct sample mixing device
dsnoop:CARD=Headphones,DEV=0
    bcm2835 Headphones, bcm2835 Headphones
    Direct sample snooping device
hw:CARD=Headphones,DEV=0
    bcm2835 Headphones, bcm2835 Headphones
    Direct hardware device without any conversions
plughw:CARD=Headphones,DEV=0
    bcm2835 Headphones, bcm2835 Headphones
    Hardware device with all software conversions
usbstream:CARD=Headphones
    bcm2835 Headphones
    USB Stream Output
sysdefault:CARD=pisound
    pisound, PS-0BDMMR3 snd-soc-dummy-dai-0
    Default Audio Device
dmix:CARD=pisound,DEV=0
    pisound, PS-0BDMMR3 snd-soc-dummy-dai-0
    Direct sample mixing device
dsnoop:CARD=pisound,DEV=0
    pisound, PS-0BDMMR3 snd-soc-dummy-dai-0
    Direct sample snooping device
hw:CARD=pisound,DEV=0
    pisound, PS-0BDMMR3 snd-soc-dummy-dai-0
    Direct hardware device without any conversions
plughw:CARD=pisound,DEV=0
    pisound, PS-0BDMMR3 snd-soc-dummy-dai-0
    Hardware device with all software conversions
usbstream:CARD=pisound
    pisound
    USB Stream Output

Just don’t get how to and what devices I’ve to configure. Tried:

alsa_in -j "AUDIO" -d hw:CARD=UMC1820 -c 8 -r 48000 -p 256 & alsa_in -j "AUDIO" -d hw:CARD=pisound -c 2 -r 48000 -p 256

This throws an error:

[1] 3467
selected sample format: 32bit
Capture open error: Device or resource busy
delay = 1278

Could someone help me with this? Thanks a lot!

Hey there

Have you considered using JACK instead of ALSA?
I started off using ALSA but have recently switched to using JACK; using the Patchage app included on patchboxOS makes it really easy to connect all the inputs and outputs to whichever app/module you are using.

2 Likes

Looks like it starts one process fine, the other gives an error, as Pisound is busy being used by Jack as the main audio card. That means the 2nd alsa_in command is not necessary.

Try running this instead:

alsa_in -j "UMC" -d hw:CARD=UMC1820 -c 8 -r 48000 -p 256

Check whether Jack backend sees it:

jack_lsp

alsa_in is supposed to add an input port to the Jack backend that can then be used with other Jack applications. There can be slight sync issues with the audio, so it’s recommended to use a single audio card.

I’m not sure though if MOD UI will immediately see the difference. Maybe a browser refresh or service restart may be necessary:

sudo systemctl stop modep-mod-ui modep-mod-host
sudo systemctl start modep-mod-host modep-mod-ui
1 Like

Guys, have you managed how to do this?
Also, in which file are you entering these configurations?
Tnx!

Yes, it’s feasible, i managed to access and list all soundcards. But it’s such a long time ago, i don’t remember how. The alsa_in and alsa_out are terminal commands; not sure if there is a specific file to launch them on start or if the configuration is directly updated by the commands. Good luck, sorry for being that vague :} Wish i had more time, this is such a cool project!