This was the last migration regression I have had since I left windows for linux. I have one integrated sound card and a USB FM radio transmitter, both have worked individually since day 1, but getting both working at the same time has not been easy. The past week I’v spent perhaps 20 hours to get a .asoundrc that does this, I have to say that the official ALSA documentation may be the worst I’v seen this far and the unofficial isn’t much better, so I had to read lots of e-mails in the ALSA-users mailing list looking for ppl with similar problems and get my own solution built up by small bits and peace’s from the answers there, the usual answer to my question ‘how can i get the same output on 2 sound cards’ was almost always ‘you don’t want it, they will go out of sync, fast’ while this is indeed true I don’t care about that issue since sending the signal through FM it would always be out of sync compared to cables anyway. If anyone wants the same thing and need to know how I did it, here’s my .asoundrc
pcm.!default {
type plug
slave.pcm "quad"
route_policy duplicate
}
ctl.!default {
type hw
card mb
}
pcm.quad {
type multi;
slaves.a.pcm "mb";
slaves.a.channels 2;
slaves.b.pcm "usb";
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.3.channel 1
}
pcm.mb {
type dmix
ipc_key 1024
slave {
pcm "hw:0"
period_time 0
period_size 2048
buffer_size 65536
buffer_time 0
periods 128
rate 48000
channels 2
}
}
pcm.usb {
type dmix
ipc_key 2048
slave {
pcm "hw:1"
period_time 0
period_size 2048
buffer_size 65536
buffer_time 0
periods 128
rate 48000
channels 2
}
}
ctl.mb {
type hw
card 0
}
ctl.usb {
type hw
card 1
}