Skip to content

Instantly share code, notes, and snippets.

@Solonarv

Solonarv/.asoundrc

Created May 31, 2015
Embed
What would you like to do?
The ALSA setup that lets me choose to record, hear or both each source separately
pcm.!default {
type asym
playback.pcm "LoopAndReal"
capture.pcm "plug:realrecds"
}
pcm.realrecds {
type dsnoop
ipc_key 1026
slave.pcm "realrec"
}
pcm.realrec {
type hw
card 0
device 0
}
pcm.looprecds {
type dsnoop
ipc_key 1027
slave.pcm "looprec"
}
pcm.looprec {
type hw
card "Loopback"
device 1
subdevice 0
}
pcm.LoopAndReal {
type plug
slave.pcm mdev
route_policy "duplicate"
}
pcm.mdev {
type multi
slaves.a.pcm pcm.MixReale
slaves.a.channels 2
slaves.b.pcm pcm.MixLoopback
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.MixReale {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
rate 48000
#rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192
}
}
pcm.MixLoopback {
type dmix
ipc_key 1025
slave {
pcm "hw:Loopback,0,0"
rate 48000
#rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment