Single PC solution - Use of 2 USB sound cards as crossovers using PAX Rack

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
In this thread Pulseaudio Crossover Rack - multi-way crossover design & implementation with linux, I asked whether it is possible to use two separate USB sound cards, each placed in separate speaker boxes, as crossovers controlled by PAX rack. It is my hope to get rid of all electronics between one PC and the active speakers – a one box solution.

phofman answered with this;
I do not think there is any conflict. What the current version supports out of the box:

1 soundcard = both left/right channels of one branch (bass, mid, high, whatever). The branch is always stereo.

But what you want is:

1 soundcard = left channel of bass branch + left channel of mid branch + left channel of high branch

To solve, just create one "virtual" multichannel soundcard and route branches to respective channels as needed. Alsa-lib below pulseaudio will split the channels to corresponding physical cards, according to the multi config in .asoundrc.

The only issue is configuring stable sound card IDs since identical USB sound cards have identical names. This has been a common requirement too, solved by adding udev rules. A very nice tutorial is Persistent USB Mapping of Audio devices (Linux) * dh1tw/remoteAudio Wiki * GitHub - the card text ID (e.g. SPEAKER or HEADSET in that tutorial) will be tied to the fixed usb port. That text ID will then be used instead of the card numeric ID in the .asoundrc multi configuration (hw:NAME instead of e.g. hw:0).

Persistent USB Mapping of Audio devices (Linux) * dh1tw/remoteAudio Wiki * GitHub

Having also offered his assistance, for which I am grateful, I will now chronicle my (mis)adventures for others (foolish enough) to follow this path.

I plan to test with two cheapy USB sound cards, using RJ45 to USB extension adaptors and Cat5 cable. If successful, I plan to then route the cable through the walls, as is the current balanced cable.

More details to follow.
 
Last edited:
USB has some length limits, make sure to check if your final soundcards work OK with the extension adapters of choice. If a USB storage or HID device drops a packet, no problem, the data is resent or ignored, but in this case every data drop will result in an audible click.

Also some RF45 adapters work only with USB1.1 (12MHz). Check if it is compatible with your soundcards.
 
Putting the electronics inside a speaker box is the worst scenario.
You would say: but the Pros are doing it!
For me it's very bad to put the passive crossover in that environment.
Not to mention the cables passing in the wall ( oh, but they carry digital; but I see someone complaining about the length ... )
 
I have the second USB sound card installed, exactly the same but one blue, the other black. They are plugged into adjacent USB 2 ports.

This is the output from lsusb;
B
us 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 045e:00cb Microsoft Corp. Basic Optical Mouse v2.0
Bus 003 Device 004: ID 413c:2003 Dell Computer Corp. Keyboard
Bus 003 Device 007: ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device
Bus 003 Device 006: ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

This is the output from udevadm monitor --kernel --subsystem-match=sound;

KERNEL[4543.003220] remove /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card0/controlC0 (sound)
KERNEL[4543.003302] remove /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card0/pcmC0D0p (sound)
KERNEL[4543.003325] remove /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card0/pcmC0D0c (sound)
KERNEL[4543.003342] remove /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card0 (sound)
KERNEL[4545.426330] add /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card0 (sound)
KERNEL[4545.426463] add /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card0/pcmC0D0p (sound)
KERNEL[4545.426528] add /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card0/pcmC0D0c (sound)
KERNEL[4545.426603] add /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card0/controlC0 (sound)
KERNEL[4545.835925] change /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card0 (sound)
KERNEL[4546.249317] remove /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card1/controlC1 (sound)
KERNEL[4546.249831] remove /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card1/pcmC1D0p (sound)
KERNEL[4546.250088] remove /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card1/pcmC1D0c (sound)
KERNEL[4546.250721] remove /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card1 (sound)
KERNEL[4550.921087] add /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card1 (sound)
KERNEL[4550.921257] add /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card1/pcmC1D0p (sound)
KERNEL[4550.921400] add /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card1/pcmC1D0c (sound)
KERNEL[4550.921493] add /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card1/controlC1 (sound)
KERNEL[4551.047335] change /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card1 (sound)


This is output from aplay -l;
**** List of PLAYBACK Hardware Devices ****
card 0: Device_1 [USB Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: Device [USB Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 2: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 2: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0

This is the file 70-alsa-permanent.rules;
SUBSYSTEM!="sound", GOTO="my_usb_audio_end"
ACTION!="add", GOTO="my_usb_audio_end"

DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card3", ATTR{id}="BLUE"
DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card2", ATTR{id}="BLACK"

LABEL="my_usb_audio_end"

This is the file .asoundrc;
pcm.multi {
type multi;
slaves.a.pcm "hw:BLACK,0";
slaves.a.channels 4;
slaves.b.pcm "hw:BLUE,0";
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 b;
bindings.4.channel.0;
bindings.5.slave b;
bindings.5.channel 1;
bindings.6.slave b;
bindings.6.channel 2;
bindings.7.slave b;
bindings.7.channel 3;
}
ctl.multi {
type hw;
card 0;
}
pcm.ttable {
type route;
slave.pcm "multi";
ttable.0.0 1;
ttable.1.1 1;
ttable.2.2 1;
ttable.3.3 1;
ttable.4.4.1;
ttable.5.5.1;
ttable.6.6.1;
ttable.7.7.1;
}
ctl.ttable {
type hw;
card 0;
}

When I first tried PAX crossover after doing this, both sound cards appeared as Outputs, but only with Front Left and Front Right as options. After a Google search, I installed pavucontrol which allowed the sound card settings to be altered to 4.1 outputs rather than stereo. Now all output channels appear.

As I know virtually nothing about Linux, it seems to me that it the sound cards are installed correctly (may be totally wrong though) but instead of one virtual card, I get two "CM106 like 4.1".

I will reboot and see what happens.
 
Last edited:
No success. No sound cards appear at all, apart from "Dummy Card".

frank@MintMusic:~$ udevadm monitor --kernel --subsystem-match=sound
monitor will print the received events for:
KERNEL - the kernel uevent

KERNEL[509.144956] remove /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card2/controlC2 (sound)
KERNEL[509.156093] remove /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card2/pcmC2D0p (sound)
KERNEL[509.156119] remove /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card2/pcmC2D0c (sound)
KERNEL[509.156137] remove /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card2 (sound)
KERNEL[512.741963] remove /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card3/controlC3 (sound)
KERNEL[512.742619] remove /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card3/pcmC3D0p (sound)
KERNEL[512.742676] remove /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card3/pcmC3D0c (sound)
KERNEL[512.742720] remove /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card3 (sound)
KERNEL[514.997455] add /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card2 (sound)
KERNEL[514.997780] add /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card2/pcmC2D0p (sound)
KERNEL[514.998045] add /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card2/pcmC2D0c (sound)
KERNEL[514.998266] add /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card2/controlC2 (sound)
KERNEL[515.081138] change /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card2 (sound)
KERNEL[517.233941] add /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card3 (sound)
KERNEL[517.234253] add /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card3/pcmC3D0p (sound)
KERNEL[517.234436] add /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card3/pcmC3D0c (sound)
KERNEL[517.234551] add /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card3/controlC3 (sound)
KERNEL[517.316912] change /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card3 (sound)


70-alsa-permanent.rules
SUBSYSTEM!="sound", GOTO="my_usb_audio_end"
ACTION!="add", GOTO="my_usb_audio_end"

DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card3", ATTR{id}="BLUE"
DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card2", ATTR{id}="BLACK"

LABEL="my_usb_audio_end"

Please phofman, where have I gone wrong?
 
I am glad you have not given up and keep pushing forward, very good.

Your config procedure consists of two parts:

1) Configuring udev to provide stable identifications to two identical usb cards which differ only in their USB port. The output is either stable numerical card ID or stable card name. You have chosen the stable card name option (ATTR{id})


2) Configuring alsa to merge the two cards into one multichannel. In this config you use either the card IDs or the card names, depending on what you choose to configure in your udev rule.

If you look at the current results:

ad 1) - aplay -l shows the card names have not changed => the udev rules did not have any effect . The config looks OK, but I would try using the question mark instead of specific card ID which can be changed - Changing card IDs with udev - AlsaProject

Code:
DEVPATH=="/devices/pci0000:00/0000:00:12.2/usb1/1-4/1-4.3/1-4.3:1.0/sound/card?", ATTR{id}="MyDev_A"

ad 2) your .asoundrc uses the changed card names (BLUE, BLACK) but the cards still have their original names (Device_1, Device)

Either fix the udev rules first, or test .asoundrc + PAXOR with your current card names.
 
Last edited:
Well, some progress, I think.

With this rule file ( 70-alsa-permanent.rules in /etc/udev/rules.d),
SUBSYSTEM!="sound", GOTO="my_usb_audio_end"
ACTION!="add", GOTO="my_usb_audio_end"

DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card3", ATTR{id}="BLACK"
DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card2", ATTR{id}="BLUE"

LABEL="my_usb_audio_end"
this happens;
frank@MintMusic:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: BLUE [USB Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: BLACK [USB Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
so the cards are named "BLUE" and "BLACK", however, when I run lsusb, this is output;
frank@MintMusic:~$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 007: ID 045e:00cb Microsoft Corp. Basic Optical Mouse v2.0
Bus 003 Device 004: ID 413c:2003 Dell Computer Corp. Keyboard
Bus 003 Device 003: ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device
Bus 003 Device 002: ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
One has the allocated names but the other shows otherwise.

When the .asoundrc is added,
pcm.#!default {
type hw;
card "multi"
device 0;
}

ctl.default {
type hw;
card "multi"
device 0;
}

pcm.multi {
type multi;
slaves.a.pcm "hw:BLACK";
slaves.a.channels 6;
slaves.b.pcm "hw:BLUE";
slaves.b.channels 6;
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 b;
bindings.4.channel.0;
bindings.5.slave b;
bindings.5.channel 1;
bindings.6.slave b;
bindings.6.channel 2;
bindings.7.slave b;
bindings.7.channel 3;
}

ctl.multi {
type hw;
card 0;
}

pcm.ttable {
type route;
slave.pcm "multi";
ttable.0.0.1;
ttable.1.1.1;
ttable.2.2.1;
ttable.3.3.1;
ttable.4.4.1;
ttable.5.5.1;
ttable.6.6.1;
ttable.7.7.1;
}

ctl.ttable {
type hw;
card 0;
}

this happens;
frank@MintMusic:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
ALSA lib conf.c:1856:(snd_config_load1) :5:1:Unexpected }
ALSA lib conf.c:3615:(config_file_open) /home/frank/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3537:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3986:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:279: control open (0): Invalid argument
ALSA lib conf.c:1856:(snd_config_load1) :5:1:Unexpected }
ALSA lib conf.c:3615:(config_file_open) /home/frank/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3537:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3986:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:279: control open (1): Invalid argument
ALSA lib conf.c:1856:(snd_config_load1) :5:1:Unexpected }
ALSA lib conf.c:3615:(config_file_open) /home/frank/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3537:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3986:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:279: control open (2): Invalid argument
ALSA lib conf.c:1856:(snd_config_load1) :5:1:Unexpected }
ALSA lib conf.c:3615:(config_file_open) /home/frank/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3537:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3986:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:279: control open (3): Invalid argument

Removing the .asoundrc file again shows;
frank@MintMusic:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: BLUE [USB Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: BLACK [USB Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

It seems, to the ignorant, that the problem lies with the .asoundrc file, perhaps incorrect syntax.
 
Hash mark starts a comment. Therefore your first line is a comment and thus there is a dangling bracket on line 5. Remove the hash mark, it should not be there.

Apart of that I do not see any problem, the udev rules seems to work OK, your cards are renamed correctly.
 
One more thing.

What happens if USB devices get enumerated in a different order, i.e. the soundcard ID changes? That is why the added udev rules specify the fixed name of your card by the USB coordinates. But will these rules work if the card name is changed?

Code:
DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card3", ATTR{id}="BLACK"
DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card2", ATTR{id}="BLUE"

IMO not since the card IDs are hard-coded in the DEVPATH. That is why the question mark should be used, standing for any letter.

Code:
DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/sound/card?", ATTR{id}="BLACK"
DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/sound/card?", ATTR{id}="BLUE"
 
Thanks phofman,
I did as above and renamed the cards to 101 and 202 as well.

I found an error in the .asoundrc file (a few misplaced full stops (periods?) too many)and it now looks like this;
pcm.multi {
type multi;
slaves.a.pcm "hw:101,0";
slaves.a.channels 6;
slaves.b.pcm "hw:202,0";
slaves.b.channels 6;
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 b;
bindings.6.channel 0;
bindings.7.slave b;
bindings.7.channel 1;
bindings.8.slave b;
bindings.8.channel 2;
bindings.9.slave b;
bindings.9.channel 3;
bindings.10.slave b;
bindings.10.channel 4;
bindings.11.slave b;
bindings.11.channel 5;
}

ctl.multi {
type hw;
card 0;
}

pcm.ttable {
type route;
slave.pcm "multi";
ttable.0.0.1;
ttable.1.1.1;
ttable.2.2.1;
ttable.3.3.1;
ttable.4.4.1;
ttable.5.5.1;
ttable.6.6.1;
ttable.7.7.1;
ttable.8.8.1;
ttable.9.9.1;
ttable.10.10.1;
ttable.11.11.1;




}

ctl.ttable {
type hw;
card 0;
}

Now, I get this error message. At least the error has moved further down, but I'm at loss to see where it is.

frank@MintMusic:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
ALSA lib conf.c:1852:(snd_config_load1) _toplevel_:42:5:Unexpected char
ALSA lib conf.c:3615:(config_file_open) /home/frank/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3537:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3986:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:279: control open (0): Invalid argument
ALSA lib conf.c:1852:(snd_config_load1) _toplevel_:42:5:Unexpected char
ALSA lib conf.c:3615:(config_file_open) /home/frank/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3537:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3986:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:279: control open (1): Invalid argument
ALSA lib conf.c:1852:(snd_config_load1) _toplevel_:42:5:Unexpected char
ALSA lib conf.c:3615:(config_file_open) /home/frank/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3537:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3986:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:279: control open (2): Invalid argument
ALSA lib conf.c:1852:(snd_config_load1) _toplevel_:42:5:Unexpected char
ALSA lib conf.c:3615:(config_file_open) /home/frank/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3537:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3986:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:279: control open (3): Invalid argument
 
Thanks phofman
That did work and the error messages disappeared, but it didn't get me much further. No matter what I tried. from a few websites including the ALSA Project, nothing would create a virtual sound card.

I have found this website, linux - pulseaudio - simultanious - add two devices - Unix & Linux Stack Exchange, that used the command line to actually create a virtual device for the first time.

The poster had this to say;
To repeat: No, you cannot use names like hw:1 for Pulseaudio. These are ALSA names for ALSA devices accessed through ALSA libraries. You can use them in Pulseaudio in exactly one place, namely when an ALSA module (module-alsa-devices or module-aslsa-card) is loaded that makes the ALSA devices available to Pulseaudio. Everywhere else you use the Pulseaudio sink names obtained from the list commands above (or by loading modules that provide sinks like module-null-sink and giving them names).

The example from the poster;
Sink names on my system:

$ pacmd list-sinks | grep name:
name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
name: <alsa_output.usb-Roland_UA-25EX-00.analog-stereo>

$ pactl list short sinks
0 alsa_output.pci-0000_00_1b.0.analog-stereo module-alsa-card.c s16le 2ch 44100Hz IDLE
1 alsa_output.usb-Roland_UA-25EX-00.analog-stereo module-alsa-card.c s16le 2ch 44100Hz RUNNING
So, on my system:

pacmd load-module module-combine-sink sink_name=combined sink_properties=device.description=CombinedSink slaves=alsa_output.pci-0000_00_1b.0.analog-stereo,alsa_output.usb-Roland_UA-25EX-00.analog-stereo

I then inserted my sink names from tpactl list command and ran this;
pacmd load-module module-combine-sink sink_name=combined sink_properties=device.description=CombinedSink slaves=alsa_output.usb-0d8c_USB_Sound_Device-00.analog-surround-51,alsa_output.usb-0d8c_USB_Sound_Device-00.analog-surround-51.2

Now, a virtual sound card, names CombinedSink, appears in PulseAudio Volume Control AND PAX Rack, and while it shows all channels, it doesn't show two sets of channels, one group for each side.

Now, I am stuck as to what to do next and have questions;
Will the pacmd command persist after a reboot?
How do I convert this to code for the .asoundrc file so slaves and ttable mapping can happen?
Is there something I have missed?
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.