First, start with a device that allows multiple recording clients:
pcm.snooped {
type dsnoop
slave.pcm "hw:0" # or whatever
}
Then extract single channels:
pcm.channel1 {
type route
slave {
pcm snooped
channels 2
}
ttable [ [ 1 0 ] ]
}
pcm.channel2 {
type route
slave {
pcm snooped
channels 2
}
ttable [ [ 0 1 ] ]
}
Then put a softvol
on each of them:
pcm.channel1_softvol {
type softvol
slave.pcm channel1
control.name "Channel 1 Capture Volume"
}
pcm.channel2_softvol {
type softvol
slave.pcm channel2
control.name "Channel 2 Capture Volume"
}
Then merge them into a single device:
pcm.mixed_with_volumes {
type multi
slaves {
a { pcm channel1_softvol channels 1 }
b { pcm channel2_softvol channels 1 }
}
bindings [
{ slave a channel 0 }
{ slave b channel 0 }
]
}
... and use a plug
plugin to mix the channels together:
pcm.my_device {
type plug
slave.pcm mixed_with_volumes
ttable [ [ 0.5 0.5 ] ]
}