Combine two devices

What other apps and distros do you use to round out your studio?

Moderators: MattKingUSA, khz

Post Reply
juergenmoeller
Established Member
Posts: 5
Joined: Tue Jan 17, 2017 2:14 pm

Combine two devices

Post by juergenmoeller »

Hi,

I have two RME MADI FX running on Ubuntu Studio 14.04. I installed a driver from here https://github.com/adiknoth/madifx it works, both cards have all their inputs and outputs working.

However, I need them to be one virtual device so applications can use the channels from both cards. This proves to be a tough road. I've tried everything suggested on this page: http://www.jackaudio.org/faq/multiple_devices.html

My setup:

Code: Select all

cat /proc/asound/cards
0 [MADIFXtest   ]: MADIFX - RME MADI FX_0
                          RME MADI FX S/N 0x0 at 0xsomecode, irq17
1 [MADIFXtest_1 ]: MADIFX - RME MADI FX_0
                          RME MADI FX S/N 0x0 at 0xsomecode, irq18
1. alsa_in and alsa_out
So I have jack set up to use the first card as input and output base from the jackqtl gui. Then I start the jack server.

There are lots of forum posts, stating you can specify the hardware like this

Code: Select all

alsa_in -d hw:1
This however, doesn't work for me, giving "Access type not available for playback: Invalid argument". All I can do is run

Code: Select all

alsa_in -d plughw:1
This at least brings the inputs to the jack server. However, I'm unable to see these in Ardour. Ardour only shows the 192 channels of the first card. What else do I have to do?
Additionaly, there is a warning in the terminal:

Code: Select all

WARNING: buffer size does not match: (requested 2048, got 8192)
Which is strange, because I set up the jack server to use "Frames/Period: 512" and "Periods/Buffers: 2", which should be something like 1024, not 8192. So why is the buffer size so large?

Now when I try to connect the second cards output channels via

Code: Select all

alsa_out -d plughw:1
I get the buffer warning and then

Code: Select all

Segmentation fault (core dumped)
So I'm without a clue what the problem is with alsa_out. What can I do here?

2. Mentioning of Jack2 audio adapters
The wiki suggests a second solution to the problem utilizing Jack2 audio adapters. Next, they write "More information is needed on this option". I tried to find information but all I could dig up is that it is a kind of generalized version of alsa_in and alsa_out. But how to use it?

3. .asoundrc
The last solution on Linux is to use the .asoundrc. As I have a lot of inputs and outputs, I wrote a small bash script that creates a valid .asoundrc-file. The problem is that when running the jack server with this configuration via

Code: Select all

jackd -R -d alsa -C madifx_record_all -P madifx_playback_all
I get this error:

Code: Select all

creating alsa driver ...
madifx_playback_all|madifx_record_all|1024|2|48000|0|0|nomon|swmeter|-|32bit
jackd: pcm_multi.c:1060: snd_pcm_multi_open: Assertion `!slave_map[sidxs[i]][schannels[i]]' failed.
It works howver when I reduce the used channels per card from 192 to 64. I also found out, that years ago you couldn't even assign 64 channels per card because of a fixed array size: https://ccrma.stanford.edu/mirrors/lali ... /0202.html
So I downloaded the source code of alsa-lib 1.0.28 (the version used on Ubuntu Studio 14.04), changed the fixed slave-array size in line 1016 to [1024] for both arrays, saved and compiled the project (./configure && sudo make install) and tested again after a restart. But that didn't fix the problem.
What could be the problem here?

I attached my alsa-info. I appreciate any help. Thanks!
Attachments
alsa-info.txt
(66.45 KiB) Downloaded 64 times
artek
Established Member
Posts: 107
Joined: Tue Nov 06, 2012 10:37 pm

Re: Combine two devices

Post by artek »

I have two RME MADI FX running on Ubuntu Studio 14.04. I installed a driver from here https://github.com/adiknoth/madifx it works, both cards have all their inputs and outputs working.
It works howver when I reduce the used channels per card from 192 to 64. I also found out, that years ago you couldn't even assign 64 channels per card because of a fixed array size: https://ccrma.stanford.edu/mirrors/lali ... /0202.html
So I downloaded the source code of alsa-lib 1.0.28 (the version used on Ubuntu Studio 14.04), changed the fixed slave-array size in line 1016 to [1024] for both arrays, saved and compiled the project (./configure && sudo make install) and tested again after a restart. But that didn't fix the problem.
What could be the problem here?
Have you tried to run jackd with one card? Are 194 input and 196 output channels working?

anyway I see that it is fixed
https://patchwork.kernel.org/patch/9541771/
olivier.petit
Posts: 1
Joined: Mon Jul 22, 2019 5:13 pm

Re: Combine two devices

Post by olivier.petit »

Hi,

I'm trying to get the exact same setup working.
When using one card as input device and one card as output device I have no issues. But when I combine them, even if using just a few channels on each, the audio is extremely glitchy. Audio applications like Reaper have their playhead move erratically, which makes me think that JACK or alsa has troubles with the two device setup and can not callback the audio app reliably. Of course both cards have the same wordclock signal going in.

Did you get this setup working in the end? If so what is your exact setup?

Cheers,
Olivier
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: Combine two devices

Post by khz »

I have successfully connected 2 RME audio cards. with the "audioadapter" it is stable and reliable.
Here I have written down how it works. Multiple Soundcards >> viewtopic.php?p=95025#p95025
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
Post Reply