ALSA Multi Device Playback

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
xaptronic
Posts: 2
Joined: Wed Mar 02, 2016 8:24 pm

ALSA Multi Device Playback

Post by xaptronic »

Hello,

I've successfully setup an asoundrc file that merges two USB interfaces into "one" and am able to record audio off both of them simultaneously.

However, when I try to setup playback / output channels in the same way, I run into a weird problem.

My asoundrc

Code: Select all

pcm.scarlett2i2 {
    type hw
    card USB
}

ctl.scarlett2i2 {
    type hw
    card USB
}

pcm.umc1820 {
    type hw
    card UMC1820
}

ctl.umc1820 {
    type hw
    card UMC1820
}

pcm.multicard_capture {
        type multi;
        slaves.a.pcm "umc1820";
        slaves.a.channels 18;
        slaves.b.pcm "scarlett2i2";
        slaves.b.channels 2;
        bindings.0.slave a
        bindings.0.channel 0
        bindings.1.slave a
        bindings.1.channel 1
        bindings.2.slave a
        bindings.2.channel 2
        bindings.3.slave a
        bindings.3.channel 3
        bindings.4.slave a
        bindings.4.channel 4
        bindings.5.slave a
        bindings.5.channel 5
        bindings.6.slave a
        bindings.6.channel 6
        bindings.7.slave a
        bindings.7.channel 7
        bindings.8.slave b;
        bindings.8.channel 0;
        bindings.9.slave b;
        bindings.9.channel 1;
}

ctl.multicard_capture {
        type hw;
        card 0;
}

pcm.multicard_playback {
        type multi
        slaves.a.pcm "umc1820"
        slaves.a.channels 20
        slaves.b.pcm "scarlett2i2"
        slaves.b.channels 2
        bindings.0.slave a
        bindings.0.channel 0
        bindings.1.slave a
        bindings.1.channel 1
        bindings.2.slave b;
        bindings.2.channel 0;
        bindings.3.slave b;
        bindings.4.channel 1;
}

ctl.multicard_playback {
        type hw;
        card 0;
}
I test this using

Code: Select all

jackd -d alsa -P multicard_playback
But I get this:

Code: Select all

jackd 0.125.0
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

could not open driver .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory

could not open driver .so '/usr/lib/jack/jack_net.so': libcelt0.so.2: cannot open shared object file: No such file or directory

JACK compiled with System V SHM support.
loading driver ..
creating alsa driver ... alexcard_playback|-|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: no playback configurations available (Invalid argument)
ALSA: cannot configure playback channel
cannot load driver module alsa
If I comment out either slave and renumber the bindings accordingly, both audio devices work correctly in this configuration on their own. Once I put both of them, it gives the error above.

The capture section works as expected.

The full jack command I end up using is as follows, and gives the same error as above

Code: Select all

jackd -d alsa -C multicard_capture -P multicard_playback -r441 -n3 -p128
Appreciate any insight on this.
xaptronic
Posts: 2
Joined: Wed Mar 02, 2016 8:24 pm

Re: ALSA Multi Device Playback

Post by xaptronic »

For what it's worth, I ended up abandoning this approach and used Jack2 Audioadapters instead.

As fate would have it, I had a power surge hit my station and it seems to have fried my scarlett 2i2 that I was bridging to my UMC1820 :shock:
Post Reply