Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question
add comment

2 Answers

Ok, while I still don't understand why Mixxx cannot select the right sound card, I was able to find a solution that works for me in the Mixxx wiki. I've modified the .asoundrc file from there slightly to make it clear which channel I'm choosing, but it's essentially the same config.

In summary, what I did was to create a file named .asoundrc with the contents below and I put it in my home folder.

What works:

  • I can now select each individual channel (A or B) as separate sound devices in Mixxx, sound is output onto each correct channel

What doesn't work:

  • The resulting sound device from the combination of channels (TraktorAudio2ChannelAB) outputs some garbled sound

What I haven't figured out:

  • Why in Mixxx for each individual sound device (e.g. TraktorAudio2ChannelA) I've got a choice of 128 channels (see screenshot below), where I would only expect "Channels 1 - 2"

So any comments or tips appreciated!

enter image description here

ALSA configuration file (~/.asoundrc)

#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# 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:TraktorAudio2,0,0"; }
pcm.TraktorAudio2ChannelB { type plug; slave.pcm "hw:TraktorAudio2,0,1"; }

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# TraktorAudio2ChannelAB :: Multi 2x2 Stereo Device (Ports 1-4, Channels A+B)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
pcm.TraktorAudio2ChannelAB {
        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
}
share|improve this answer
add comment

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
share|improve this answer
    
Awesome, thanks a lot! –  David Planella Jan 16 at 9:26
    
I've filed bug #1269747 to track this issue –  David Planella Jan 16 at 10:19
    
Looks like the bug will be fixed in the next Pulseaudio release. In the meantime, here's the original Audio2 file that was omitted in the last release –  David Planella Jan 16 at 13:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.