Skip to content

Instantly share code, notes, and snippets.

@gusano
Created November 13, 2012 09:09
Show Gist options
  • Save gusano/4064782 to your computer and use it in GitHub Desktop.
Save gusano/4064782 to your computer and use it in GitHub Desktop.
NI Audio2dj ~/.asoundrc
# Setup for NI audio2dj
# It's seen by default as 2 different stereo devices by jack.
# This makes it one single 4 output channels device.
# The outputs are then mapped so instead of using a stereo cable in output0,
# I can use 2 mono jack cables in each stereo out, i.e. in L[0] and R[0]
# which are respectively output 0 and 2.
pcm_slave.DJ0 {
pcm "hw:1"
format S16_LE
}
pcm.usb {
type plug
slave DJ0
}
ctl.usb {
type plug
slave DJ0
}
pcm_slave.DJ1 {
pcm "hw:1"
format S16_LE
}
pcm.usb1 {
type plug
slave DJ1
}
ctl.usb1 {
type plug
slave DJ1
}
pcm.multi {
type multi;
slaves.a.pcm "hw:1";
slaves.a.channels 2;
slaves.b.pcm "hw:1,0";
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;
}
ctl.multi {
type hw;
card 1;
}
pcm.ttable {
type route;
slave.pcm "multi";
# invert channels a[1] & b[0] so we use one jack mono in A & B instead
# configure 4 channels to use only 2 but this is for cables reason =)
ttable.0.0 1; # a.0
ttable.2.1 1; # b.0
ttable.1.2 1; # a.1
ttable.3.3 1; # b.1
}
ctl.ttable {
type hw;
card 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment