Ubuntu – How to get a NI Traktor Audio 2 sound card work with Mixxx

alsapulseaudiosound

I've got a NI Traktor Audio 2 sound card I'd like to get working with Mixxx, but I don't seem to have any success so far. The card seems to be supported in Ubuntu out of the box, and it seems to work well with ALSA, but I cannot select it in Mixxx and I'm not sure whether is something I can do to make it see it (e.g. through).

So for testing purposes, on the command line I can execute aplay to check each channel:

aplay -D plughw:2,0,0 test.wav

and

aplay -D plughw:2,0,1 test.wav

That works well: I can hear the test sound on each channel (A and B)

The relevant output for this card using aplay -D is:

hw:CARD=TraktorAudio2,DEV=0
     Traktor Audio 2, Traktor Audio 2
     Direct hardware device without any conversions
plughw:CARD=TraktorAudio2,DEV=0
     Traktor Audio 2, Traktor Audio 2
     Hardware device with all software conversions

From those 2 items on the output, plughw is the one that works, whereas hw doesn't.

The problem is that Mixxx only lets me select the hw card, which does not seem to work. I'd like to be able to select the plughw card, which is the one that's working.

I've tried suspending Pulse Audio as suggested by this question, but that did not seem to work. I also played around with an .asoundrc file similar to the one on this answer (which was for an older model of this sound card), but also without success.

Any ideas on how to make Mixxx show the right card (and channel, while we are at it)?

Thanks!

Best Answer

Thanks, this helped me making my TRAKTOR 2 working with Mixxx, which uses ALSA. For other apps, which mainly use pulseaudio on top of ALSA, it used to work out of the box. But suddenly, after some ubuntu update it stopped working.

I could fix this problem by adding a configuration file to pulseaudio.

As root, go to /usr/share/pulseaudio/alsa-mixer/profile-sets. You will see there are conf files for the audio6, audio8, etc, but nothing for the audio 2. THOUGH, surprisingly, a file named native-instruments-traktor-audio2.conf IS referenced in /lib/udev/rules.d/90-pulseaudio.rules . That's the source of the problem, maybe the file was omitted by the developpers, and pulseaudio complains about not finding it.

It's easy to create this file, i copied the audio6 file and stripped everything about inputs - as the audio2 has outputs only. Then it has to be named exactly : native-instruments-traktor-audio2.conf

Now it works again, and as a bonus I can choose between channels A and B. Formerly i was restricted to channel A in pulseaudio.

Here is my file, hope it can help someone. I guess this omission will be fixed in a pulseaudio update to come.

[General]
auto-profiles = no

[Mapping analog-stereo-a]
description = Analog Stereo Channel A
device-strings = hw:%f,0,0
channel-map = left,right

[Mapping analog-stereo-b-output]
description = Analog Stereo Channel B (Headphones)
device-strings = hw:%f,0,1
channel-map = left,right
direction = output

[Profile output:analog-stereo-all]
description = Analog Stereo Duplex Channels A, B (Headphones)
output-mappings = analog-stereo-a analog-stereo-b-output
priority = 3
skip-probe = yes

[Profile output:analog-stereo-a]
description = Analog Stereo Output Channel A
output-mappings = analog-stereo-a
priority = 1
skip-probe = yes

[Profile output:analog-stereo-b]
description = Analog Stereo Output Channel B (Headphones)
output-mappings = analog-stereo-b-output
priority = 2
skip-probe = yes
Related Question