Merged interfaces not merging - .asoundrc | AVLinux

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

User avatar
Primeval_Mudd
Established Member
Posts: 55
Joined: Fri Feb 11, 2022 10:46 pm
Location: Garlinge, Kent, UK
Has thanked: 31 times
Been thanked: 12 times
Contact:

Merged interfaces not merging - .asoundrc | AVLinux

Post by Primeval_Mudd »

Hi,

I'm trying to use a couple of Behringer interfaces together: a FLOW8 mixer and UMC404HD interface.

The FLOW8 sends ten channels: eight physical plus another two for the main output.
The UMC404HD sends four.

Following the Multiple Devices instructions on the Jack Audio website I've created an .asoundrc file assigning the FLOW8 to ten channels (0-9) and the UMC404HD to four (10-13).

I assumed that a new device would appear - 'merge' - in Jack etc but I can't see one.

Can anybody spot what I'm doing wrong? I'd guess it's something in the .asoundrc file but really don't know.

I think these are all the relevant bits of info:

The .asoundrc file:

Code: Select all

ctl.merge {
    type hw
    card 0
}

pcm.merge {
    type multi;
    slaves.a.pcm hw:F8
    slaves.a.channels 10;
    slaves.b.pcm hw:U192k
    slaves.b.channels 4;
    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 a;
    bindings.8.channel 8;
    bindings.9.slave a;
    bindings.9.channel 9;
    bindings.10.slave b;
    bindings.10.channel 0;
    bindings.11.slave b;
    bindings.11.channel 1;
    bindings.12.slave b;
    bindings.12.channel 2;
    bindings.13.slave b;
    bindings.13.channel 3;
   
}

aplay -l

Code: Select all

dave@primevalmuddmx:~
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: F8 [FLOW 8], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: U192k [UMC404HD 192k], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

aplay -L

Code: Select all

dave@primevalmuddmx:~
$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default
    Playback/recording through the PulseAudio sound server
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pulse
    PulseAudio Sound Server
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
merge
hw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC269VC Analog
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=9
    HDA Intel PCH, HDMI 3
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=10
    HDA Intel PCH, HDMI 4
    Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC269VC Analog
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=9
    HDA Intel PCH, HDMI 3
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=10
    HDA Intel PCH, HDMI 4
    Hardware device with all software conversions
sysdefault:CARD=PCH
    HDA Intel PCH, ALC269VC Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC269VC Analog
    Front output / input
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC269VC Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC269VC Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC269VC Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC269VC Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC269VC Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC269VC Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output
hdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    HDMI Audio Output
hdmi:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 3
    HDMI Audio Output
hdmi:CARD=PCH,DEV=4
    HDA Intel PCH, HDMI 4
    HDMI Audio Output
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, ALC269VC Analog
    Direct sample mixing device
dmix:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct sample mixing device
dmix:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Direct sample mixing device
dmix:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Direct sample mixing device
dmix:CARD=PCH,DEV=9
    HDA Intel PCH, HDMI 3
    Direct sample mixing device
dmix:CARD=PCH,DEV=10
    HDA Intel PCH, HDMI 4
    Direct sample mixing device
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output
hw:CARD=F8,DEV=0
    FLOW 8, USB Audio
    Direct hardware device without any conversions
plughw:CARD=F8,DEV=0
    FLOW 8, USB Audio
    Hardware device with all software conversions
sysdefault:CARD=F8
    FLOW 8, USB Audio
    Default Audio Device
front:CARD=F8,DEV=0
    FLOW 8, USB Audio
    Front output / input
surround21:CARD=F8,DEV=0
    FLOW 8, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=F8,DEV=0
    FLOW 8, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=F8,DEV=0
    FLOW 8, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=F8,DEV=0
    FLOW 8, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=F8,DEV=0
    FLOW 8, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=F8,DEV=0
    FLOW 8, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=F8,DEV=0
    FLOW 8, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=F8,DEV=0
    FLOW 8, USB Audio
    Direct sample mixing device
usbstream:CARD=F8
    FLOW 8
    USB Stream Output
hw:CARD=U192k,DEV=0
    UMC404HD 192k, USB Audio
    Direct hardware device without any conversions
plughw:CARD=U192k,DEV=0
    UMC404HD 192k, USB Audio
    Hardware device with all software conversions
sysdefault:CARD=U192k
    UMC404HD 192k, USB Audio
    Default Audio Device
front:CARD=U192k,DEV=0
    UMC404HD 192k, USB Audio
    Front output / input
surround21:CARD=U192k,DEV=0
    UMC404HD 192k, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=U192k,DEV=0
    UMC404HD 192k, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=U192k,DEV=0
    UMC404HD 192k, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=U192k,DEV=0
    UMC404HD 192k, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=U192k,DEV=0
    UMC404HD 192k, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=U192k,DEV=0
    UMC404HD 192k, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=U192k,DEV=0
    UMC404HD 192k, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=U192k,DEV=0
    UMC404HD 192k, USB Audio
    Direct sample mixing device
usbstream:CARD=U192k
    UMC404HD 192k
    USB Stream Output
sysdefault:CARD=RD6
    Default Audio Device
usbstream:CARD=RD6
    RHYTHM DESIGNER RD-6
    USB Stream Output
sysdefault:CARD=monologue
    Default Audio Device
usbstream:CARD=monologue
    monologue
    USB Stream Output
OS: AVLinux MX-21

Dave Plummer/Primeval Mudd*

Ubuntu Studio | Reaper (Linux native)

Facebook | YouTube

  • Should you be wondering, Primeval Mudd is an anagram of David Plummer.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by merlyn »

Using two interfaces at the same time is one of the more advanced things that can be done. It's not ideal. It's definitely better to use one interface with the number of input/outputs required. When ALSA is not behaving I have found that substituting hw: with plughw: can work. In your .asoundrc it would look like:

Code: Select all

 	slaves.a.pcm plughw:F8
    	slaves.a.channels 10;
    	slaves.b.pcm plughw:U192k
    	slaves.b.channels 4;
If that doesn't work it's possible to use the built-in JACK thing audioadapter. I've managed this in the past, and could dig out how I did it.
User avatar
milkii
Established Member
Posts: 477
Joined: Tue Jan 05, 2016 9:08 am
Location: Edinburgh
Has thanked: 92 times
Been thanked: 91 times
Contact:

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by milkii »

audioadapter is very old, alsa_in/out is old, afaiu zita-ajbridge is the newest and hottest solution, other than just using game changing PipeWire

they/them ta / libreav.org / wiki.thingsandstuff.org/Audio and related pages / gh

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by j_e_f_f_g »

milkii wrote: audioadapter... alsa_in/out... zita-ajbridge... PipeWire... ?
Do I really need to say it?

And the fact that they all exist means that, when you google for a solution, you won't know for which one of these a given solution worked... until you waste the time verifying that it doesn't work with your chosen "trojan horse". It's just so obvious that the existence of these "solutions" is actually the cause of most enduser's "problems".

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
milkii
Established Member
Posts: 477
Joined: Tue Jan 05, 2016 9:08 am
Location: Edinburgh
Has thanked: 92 times
Been thanked: 91 times
Contact:

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by milkii »

You can come across as an arse as much as you want, such are the rules of LM. As I've said before, it is funny. Not that it helps others.

they/them ta / libreav.org / wiki.thingsandstuff.org/Audio and related pages / gh

tavasti
Established Member
Posts: 2047
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 369 times
Been thanked: 208 times
Contact:

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by tavasti »

j_e_f_f_g wrote: Tue Mar 08, 2022 8:57 pm
milkii wrote: audioadapter is very old, alsa_in/out is old, afaiu zita-ajbridge is the newest and hottest solution, other than just using game changing PipeWire
Do I really need to say it?

And the fact that they all exist means that, when you google for a solution, you won't know for which one of these a given solution worked
I have used all of them except PipeWire. All of them have been working for me.

@milkii, can you tell why zita-ajbridge is better than alsa_in?

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

User avatar
Linuxmusician01
Established Member
Posts: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 135 times

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by Linuxmusician01 »

No matter what operating system one has, using two audio devices at once is not recommended. From the same Jack link from the top post:
trying to use multiple independent soundcards is problematic, because each soundcard has its own sample clock, running independently from the others. Over time, these different clocks drift out of sync with each other, and cause glitches in the audio.
I'm afraid that in the end you're gonna have use either the Behringer U-Phoria 404 or the Behringer Flow 8 audio device.
Last edited by Linuxmusician01 on Wed Mar 09, 2022 3:04 pm, edited 1 time in total.
User avatar
milkii
Established Member
Posts: 477
Joined: Tue Jan 05, 2016 9:08 am
Location: Edinburgh
Has thanked: 92 times
Been thanked: 91 times
Contact:

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by milkii »

tavasti wrote: Wed Mar 09, 2022 9:08 am @milkii, can you tell why zita-ajbridge is better than alsa_in?
AFAICR, better quality resampling.

JACK docs are subpar in various areas, people would benefit from a good comparative description regarding the options, at least on the GH wiki, maybe someone proficient could evaluate the code, or at least ask for enough details from developers in #jack. (I'm feeling too lazy atm to switch focus from adding software entries to libreav.org atm)

they/them ta / libreav.org / wiki.thingsandstuff.org/Audio and related pages / gh

asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by asbak »

I've dabbled with merging but there are many different mechanisms and all seem to bring their own sets of problems and trade-offs and not fully satisfactory and solid results and performance. If it were me I wouldn't place too many hopes on getting it working well. It may be possible in some cases but it's somewhat speculative imo.

Imo it's a better use of time and money (time = money) to get an interface with more I/O.
Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
tavasti
Established Member
Posts: 2047
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 369 times
Been thanked: 208 times
Contact:

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by tavasti »

asbak wrote: Wed Mar 09, 2022 8:00 pm Imo it's a better use of time and money (time = money) to get an interface with more I/O.
But even that isn't without problems. If you have interface with plenty of IO, that IO is flowing all the time, and more channels going, more latency. Or at least that is what I was told in irc :-)

So would need to have interface that has all you need, but not extra.

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by asbak »

Not sure I'd agree with that IRC advice people gave you, my 9652 worked OK in Linux apart from a MIDI bug, but that's another matter and easy enough to work around.

I think some of the other folks here have 9632's and I'd be extremely surprised if they had problems with them.

Those are examples I know about, obviously there are also interfaces from other vendors with IO counts around the 50 or more mark which should also work fine.
Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
User avatar
Primeval_Mudd
Established Member
Posts: 55
Joined: Fri Feb 11, 2022 10:46 pm
Location: Garlinge, Kent, UK
Has thanked: 31 times
Been thanked: 12 times
Contact:

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by Primeval_Mudd »

Hi all,

To those of you who have given constructive replies:

Thank you.

I've given up on the .asoundrc file but have got it working using alsa_in and Jack's patchbay.

Code: Select all

alsa_in -j umc -d hw:U192k -c 4
FowUMCJackPatchbay.png
FowUMCJackPatchbay.png (54.19 KiB) Viewed 2907 times
To a few others:

I asked a specific question about a solution which is known to work but I'm having difficulty with. Telling me that I should buy another interface with as much IO as I need is not helpful.

None of you know anything of my personal circumstances but, for the benefit of those who don't understand the difference between adding a bit of code to spending money on hardware:
  • If I could afford to buy another interface I would.
  • I can't so I'm making the most of the interfaces I already own.
Anyway, I've got it working and now have indvidual RD-6 outputs going to their own channels via the UMC404 while the mics, synths and guitars are going through the FLOW8.

Dave Plummer/Primeval Mudd*

Ubuntu Studio | Reaper (Linux native)

Facebook | YouTube

  • Should you be wondering, Primeval Mudd is an anagram of David Plummer.
asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by asbak »

Quit your annoying and ungrateful whining.

Merging soundcards is a troublesome endeavour and all we did was to make you aware of this. If that's not what you want to hear and insist on going down other routes - which may or may not work then that's OK too but don't presume to start handing out lectures about what advice people - based on experience they have gained - are allowed to give you.

Unbelieveable. Crying about your personal circumstances on forum posts is the most pathetic thing I've read here in some time.
Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
User avatar
Linuxmusician01
Established Member
Posts: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 135 times

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by Linuxmusician01 »

Primeval_Mudd wrote: Wed Mar 09, 2022 10:42 pm [...]I asked a specific question about a solution which is known to work but I'm having difficulty with. [...]
I can understand your disappointment. I don't like it either when people answer my question with: "You shouldn't even have asked the question.".

However, practical experience and theoretical knowledge from experienced (Linux) musicians differ with your opinion quoted above. Most people I know would argue that it is KNOWN NOT to work and therefore answering your question was almost impossible. You might get a result in the beginning, leading you and others to argue that "it is known to work". But after using this set-up in a single session for longer than an short time then clocks will start to drift. Now that's a known fact!

Let's be crystal clear about this: in practice one can not use two audio devices at the same time. This is because of physics, not because of software, operating system or divers. If you think differently, well, then you're plain wrong.

What we did is called Help to a newcomer even though its hard to hear and accept. I can understand that that is disappointing though. But for all we now you could be a newbie in physics, audio and Linux. :roll:
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Merged interfaces not merging - .asoundrc | AVLinux

Post by merlyn »

Linuxmusician01 wrote: Thu Mar 10, 2022 10:00 am Most people I know would argue that it is KNOWN NOT to work and therefore answering your question was almost impossible. You might get a result in the beginning, leading you and others to argue that "it is known to work". But after using this set-up in a single session for longer than an short time then clocks will start to drift. Now that's a known fact!
Clocks do drift, but this can be solved by resampling one of the streams. This is what alsa_in, zita-a2j and audioadapter do. I've tried all three and found audioadapter to be the most reliable. YMMV. I wanted to record a guitar synth over USB in Ardour. alsa_in had xruns. zita-a2j was better and worked xrun free until I connected it to Ardour, and then it started to xrun. Looking at the man page for zita-a2j the date is 2013, so it's hardly bang up to date as was suggested above. audioadapter worked once it was tweaked to get the latency to an acceptable level.

The quality of a resampler depends on the quality of the filter. There's a website infinite wave that compares resamplers, or sample rate convertors as sound engineers who don't like computers call them. The open source sox is as good as anything. On the graphs what marks a good resampler is a completely black background and a line that goes up to and stops at the Nyquist frequency. A better filter requires more CPU, so a resampler intended for realtime use is a compromise.

It could be that I got xruns with zita-a2j because my old computer wasn't up to running zita resampler in real time at the same time as Ardour. On a more powerful computer zita-a2j may work.

But, actually, for this application -- syncing two streams -- the filter is irrelevant if both streams are at the same sample rate. The filter is an anti-aliasing filter to remove components above the Nyquist frequency; if both streams are at the same sample rate there is nothing to remove.

So using two interfaces at the same time is possible but can be quite involved.
Post Reply