You are not logged in.

#1 2024-12-27 11:23:50

Sotem
Member
Registered: 2024-01-21
Posts: 4

Configure multi-card asoundrc

Hello,

I'm trying to configure ALSA to combine two PCI audio interfaces as one.
The files are sample synced on hardware level.
The amount of documentation online is really low, so I'm having a hard time to properly configure the interface.

Currently I have the following config:

~/.asoundrc

pcm.raydat {
	type hw
	card 1
	device 0
}

pcm.aio {
	type hw
	card 2
	device 0
}

ctl.multi {
	type hw;
	card 0;
}

pcm.multi {
	type multi
	slaves.a.pcm "hw:2,0"
	slaves.a.channels 20
	slaves.b.pcm "hw:1:0"
	slaves.b.channels 36


	# aio channel bindings
	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 a;
	bindings.10.channel 10;
	bindings.11.slave a;
	bindings.11.channel 11;
	bindings.12.slave a;
	bindings.12.channel 12;
	bindings.13.slave a;
	bindings.13.channel 13;
	bindings.14.slave a;
	bindings.14.channel 14;
	bindings.15.slave a;
	bindings.15.channel 15;
	bindings.16.slave a;
	bindings.16.channel 16;
	bindings.17.slave a;
	bindings.17.channel 17;
	bindings.18.slave a;
	bindings.18.channel 18;
	bindings.19.slave a;
	bindings.19.channel 19;
	bindings.20.slave a;
	bindings.20.channel 20;

	# raydat channel bindings
	bindings.21.slave b;
	bindings.21.channel 0;
	bindings.22.slave b;
	bindings.22.channel 1;
	bindings.23.slave b;
	bindings.23.channel 2;
	bindings.24.slave b;
	bindings.24.channel 3;
	bindings.25.slave b;
	bindings.25.channel 4;
	bindings.26.slave b;
	bindings.26.channel 5;
	bindings.27.slave b;
	bindings.27.channel 6;
	bindings.28.slave b;
	bindings.28.channel 7;
	bindings.29.slave b;
	bindings.29.channel 8;
	bindings.30.slave b;
	bindings.30.channel 9;
	bindings.31.slave b;
	bindings.31.channel 10;
	bindings.32.slave b;
	bindings.32.channel 11;
	bindings.33.slave b;
	bindings.33.channel 12;
	bindings.34.slave b;
	bindings.34.channel 13;
	bindings.35.slave b;
	bindings.35.channel 14;
	bindings.36.slave b;
	bindings.36.channel 15;
	bindings.37.slave b;
	bindings.37.channel 16;
	bindings.38.slave b;
	bindings.38.channel 17;
	bindings.39.slave b;
	bindings.39.channel 18;
	bindings.40.slave b;
	bindings.40.channel 19;
	bindings.41.slave b;
	bindings.41.channel 20;
	bindings.42.slave b;
	bindings.42.channel 21;
	bindings.43.slave b;
	bindings.43.channel 22;
	bindings.44.slave b;
	bindings.44.channel 23;
	bindings.45.slave b;
	bindings.45.channel 24;
	bindings.46.slave b;
	bindings.46.channel 25;
	bindings.47.slave b;
	bindings.47.channel 26;
	bindings.48.slave b;
	bindings.48.channel 27;
	bindings.49.slave b;
	bindings.49.channel 28;
	bindings.50.slave b;
	bindings.50.channel 29;
	bindings.51.slave b;
	bindings.51.channel 30;
	bindings.52.slave b;
	bindings.52.channel 31;
	bindings.53.slave b;
	bindings.53.channel 32;
	bindings.54.slave b;
	bindings.54.channel 33;
	bindings.55.slave b;
	bindings.55.channel 34;
	bindings.56.slave b;
	bindings.56.channel 35;
	bindings.57.slave b;
	bindings.57.channel 36;
}

I've used aplay to identify the proper cards, the output is the following:

card 1: HDSPe24018716 [RME RayDAT_24018716], device 0: RME RayDAT [RME RayDAT]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDSPe14651866 [RME AIO_14651866], device 0: RME AIO [RME AIO]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

edit: I have changed the config and have it working right now.
The only problem I still have is the following:
I've created the a multi device to which I can output audio using: aplay -d multiplug 'audio.wav'

But this multi device is not visible in either Bitwig or Qjackctl or something similar.
How can I make a multi device be exposed?

Last edited by Sotem (2024-12-27 17:44:51)

Offline

#2 2024-12-27 11:32:51

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,679
Website

Re: Configure multi-card asoundrc

Sotem wrote:

How can I verify if the config is actually being used?

Try alsa-info.sh(1).

Sotem wrote:

What is a good resource which explains how to properly configure these files?

https://www.alsa-project.org/wiki/Asoundrc

Sotem wrote:

How can I debug issues as to get any direction as in what may or may not be wrong?

https://wiki.archlinux.org/title/Systemd/Journal


Para todos todo, para nosotros nada

Offline

#3 2024-12-27 11:39:39

Sotem
Member
Registered: 2024-01-21
Posts: 4

Re: Configure multi-card asoundrc

Thanks for your help Head_on_a_Stick.

I wasn't aware of alsa-info.

I've looked at the alsa-project link, which is how I build my config in the first place.
I've also tried to use journalctl to see if I have any alsa related logging, but I couldn't find anything noticeable.

Still in front of a brick wall concerning how to properly configure these things.

Offline

#4 2024-12-28 10:51:14

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,225

Re: Configure multi-card asoundrc

pulseaudio & pipewire both try to take over from alsa and probably mess this up .

Since they are started on demand, it's hard to disable them.
The few people (like me) that prefer a pure alsa system install just enough to let pa/pw supporting applications know there are no pa/pw devices available and force those apps to use  alsa.

On archlinux that can be achieved by having only libpulse and libpipewire installed and nothing else from pa/pw .

Please post the output of

$ pacman -Qs pulse
$ pacman -Qs pipewire

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2024-12-28 17:55:39

Sotem
Member
Registered: 2024-01-21
Posts: 4

Re: Configure multi-card asoundrc

Thanks for the suggestion.
My aim with the ALSA config was precisely to eliminate the need for pipewire or other software.
For configuring ALSA I have disabled pipewire.
The only thing you need to do for as far as I can tell is to simply disable the pipewire.service and pipewire.socket.
That way ALSA isn't being handled by pipewire.

That said, the only problem remaining for me is that the virtual multi-device that I've configured (and that I can confirm to work using aplay) is not selectable by audio applications.
These simply enumerate the physical devices, and that way I cannot select the virtual device which isn't physical.
So I'm really close, but not quite there yet.

I'm from the Netherlands as well by the way!

Offline

#6 2024-12-29 11:11:43

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,225

Re: Configure multi-card asoundrc

It looks like pipewire/wireplumber use systemd user functions instead of dbus to manage things, if you disable wireplumber it may be enough .

Please post full output of

$ aplay --list-devices
$ aplay --list-pcms

I'm from the Netherlands as well by the way!

Nice to see another dutch person.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB