Native Instruments Audio2 DJ interface and Linux 4 channel alsa config

I was recently given a Native Instruments Audio2 DJ interface, this is a great little card with working Linux drivers that works well with MIXXX using a variation of the .asoundrc available on the MIXXX site and other locations.

But either my version of the card, or the Linux driver has changed, as my card identifies differently so the config files available elsewhere don’t work with my OS (Xubuntu 14.04 with kernel 4.2.0-18-lowlatency).

Now the card I have identifies with the following using “lsusb”:

user@mixxx:~$ lsusb | grep Native
Bus 002 Device 006: ID 17cc:041c Native Instruments Audio 2 DJ

And gave the following info into “dmesg” when plugged in:

[ 647.334290] usb 2-1.4: new high-speed USB device number 6 using ehci-pci
[ 647.421685] usb 2-1.4: New USB device found, idVendor=17cc, idProduct=041c
[ 647.421691] usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[ 647.421696] usb 2-1.4: Product: Audio 2 DJ
[ 647.421699] usb 2-1.4: Manufacturer: Native Instruments
[ 647.421703] usb 2-1.4: SerialNumber: SN-5ywqed89
[ 647.441571] usbcore: registered new interface driver snd-usb-caiaq

And here is the working .asoundrc file that works for me with this particular setup – this also works fine in 4channel mode, unlike the other versions of this config around the net. You don’t need the 4 channel mode to work with MIXXX, as using the TraktorAudio2ChannelA and TraktorAudio2ChannelB audio devices work fine, but I was trying to get 4 channel mode working cleanly for another bit of software, though this is still a work in progress.


#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Native Instruments :: Traktor Audio 2 ALSA Configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Device Channels Ports
# ------ -------- -----
# TraktorAudio2ChannelA 2 12xx
# TraktorAudio2ChannelA 2 xx34
#
# TraktorAudio2ChannelAB 4 1234

#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# TraktorAudio2Channel{A,B} :: Raw 1x1 Stereo Devices
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
pcm.TraktorAudio2ChannelA {
type plug;
slave {
pcm "hw:Audio2DJ,0,0"
rate 44100
channels 2
format S24_3BE
}
}
pcm.TraktorAudio2ChannelB {
type plug;
slave {
pcm "hw:Audio2DJ,0,1"
rate 44100
channels 2
format S24_3BE
}
}

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# TraktorAudio2ChannelAB :: Multi 2x2 Stereo Device (Ports 1-4, Channels A+B)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
pcm.TraktorAudio2ChannelAB {
type plug;
slave {
format S24_3BE
pcm {
type multi

# Bind hardware devices
slaves.a.pcm TraktorAudio2ChannelA
slaves.a.channels 2
slaves.b.pcm TraktorAudio2ChannelB
slaves.b.channels 2

# Bind channels to virtual device
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
}
}
}

As can be seen above apart from the different physical device ID, the alsa config also makes clear the 24 bit big endian audio format, etc, through all the mappings.