Skip to content

Instantly share code, notes, and snippets.

@triss
Created December 1, 2022 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save triss/226515331ce16a5ac58e182d14a06160 to your computer and use it in GitHub Desktop.
Save triss/226515331ce16a5ac58e182d14a06160 to your computer and use it in GitHub Desktop.
Audio Kontrol 1 Config
# Makes the subdevices aka channel 1&2 and 3&4 available for alsa applications
pcm_slave.sl12 {
pcm "hw:AudioKontrol1,0,0"
}
pcm.channel12 {
type plug
slave sl12
}
pcm_slave.sl34 {
pcm "hw:AudioKontrol1,0,1"
}
pcm.channel34 {
type plug
slave sl34
}
# create a virtual four-channel device with two sound devices:
# This is in fact two interleaved stereo streams in
# different memory locations, so JACK will complain that it
# cannot get mmap-based access. see below.
pcm.multi {
type multi;
slaves.a.pcm "channel12"
slaves.a.channels 2;
slaves.b.pcm "channel34";
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;
}
# JACK will be unhappy if there is no mixer to talk to, so we set
# this to the usb card.
ctl.multi {
type hw;
card AudioKontrol1;
}
# This creates a 4 channel interleaved pcm stream based on
# the multi device. JACK will work with this one.
pcm.ttable {
type route;
slave.pcm "multi";
slave.channels 4;
ttable.0.0 1;
ttable.1.1 1;
ttable.2.2 1;
ttable.3.3 1;
}
# see above.
ctl.ttable {
type hw;
card AudioKontrol1;
}
card 2: AudioKontrol1 [Audio Kontrol 1], device 0: Audio Kontrol 1 [Audio Kontrol 1]
Subdevices: 0/1
Subdevice #0: subdevice #0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment