1. Hi everyone,

    This forum is now closed for posting! If you require technical support from NI or have a questions about activating your product, please head over to our new Support Community!


    The Support Community is the new location where you can expect to receive assistance and feedback on technical support, sales or installation issues from our Support Agents and other users.

    Please also note, questions about the status of an order should always be directly sent to our Order Support team HERE.

    Best wishes, 
    The NI Team


Discussion in 'Technical Issues - KOMPLETE (Archive)' started by luxin, Sep 4, 2007.

Thread Status:
Not open for further replies.
  1. luxin

    luxin New Member

    Hi folks,

    I just got to know AUDIO KONTROL 1 via the internet and was amazed by what it can do for this relatively low price.

    Now I would like to buy one, but the problem, or better noteworthiness, is that I am a GNU/Linux user (Ubuntu).
    I neither want to go back in evolution and use Windows, nor do I want to use Macintosh.

    So, I am, of course, highly interested in any experience gained with this product on Linux.

    If there is no experience at all, I will ask NI to give me an AUDIO CONTROL 1 for free, and the I'll check things out for this device on Linux. ;)

    This is gonna be a hopefully small step for a man, but would be a giant leap for mankind, I guess. :D
  2. Plangin

    Plangin NI Product Owner

    Hi Linux mate,

    good news for you: NI provides native ALSA drivers in the official kernel sources!

    => http://img143.imageshack.us/img143/8895/nialsajl1.png

    I own an Audio 8 DJ and did not compile it, yet. But will test it this week. Ask me if you have any specific questions.

  3. luxin

    luxin New Member

    Cool thing!

    That sounds good!

    Tell me, how it works, when you have compiled everything.

    By the way, this is a nice graphical Kernel-Menu!

    Just one more question: Which kernel versions do support NI USB-Devices?
  4. iclavijos

    iclavijos New Member

    Any news on this?

    I recently bought a Kontrol 1 and even if when plugging it in I can see it as a recognized soundcard (asoundconf list shows it as A1), I cannot make it work properly, as sometimes I can configure xmms to use it (and it worked fine) but sometimes not.

    Should I do something else? Is there something I should check?

    I'm using Kubuntu Feisty.

    Thanks a whole lot!

  5. luxin

    luxin New Member


    Well, which kernel version are you using?
    If you use the standard 2.6.20-xx, you won't find an NI - device driver, as far as I know.

    2.6.22-xx, however, has that driver listed in the config menu.

    Do you know how to compile your own kernel? If so, simply check out the latest version from kernel.org.
    Should work. But I cannot ensure it, since I still haven't bought the device.

    Have fun! And give us a test report!

    If you have any further questions, simply ask. I will stop by here from time to time.
  6. iclavijos

    iclavijos New Member

    Hi there, linuxer.

    Sorry for being silent for so many days, but life can be a bit tough sometimes :p ;)

    Unfortunately, AK1 is not working properly on Linux.

    Yes, I have a 2.6.22-xx kernel and when I plug it in, it is properly detected. See (sorry, the text is in Spanish, but I think it is pretty understandable):

    ivan@rst-server:~$ aplay -l
    **** Lista de PLAYBACK Dispositivos Hardware ****
    tarjeta 0: CMI8738MC8 [C-Media PCI CMI8738-MC8],  ...
    tarjeta 1: A1 [Audio Kontrol 1], dispositivo 0: Audio Kontrol 1 [Audio Kontrol 1]
      Subdispositivos: 2/2
      Subdispositivo #0: subdevice #0
      Subdispositivo #1: subdevice #1
    ivan@rst-server:~/mixxx$ cat /proc/asound/cards
     0 [CMI8738MC8     ]: CMI8738-MC8 - C-Media PCI CMI8738-MC8
                          C-Media PCI CMI8738-MC8 (model 68) at 0xb800, irq 21
     1 [A1             ]: snd-usb-caiaq - Audio Kontrol 1
                          Native Instruments Audio Kontrol 1 (serial SN-9BL40N7XET, usb-0000:02:02.2-2)
    So, as you can see, it is properly detected by my Kubuntu 7.10.

    The first problem (and I don't know if it's really a problem) is that no red lights on AK1 are working. Neither the jog nor any of the three buttons are light up when I use them (not even when the AK1 is plugged in). Maybe this is a non issue, but the best thing I can do is to just write it down. ;)

    Once the soundcard is plugged in, I configure my system to use it as the default sound card and reboot it just for the sake of it. Once the system is restarted, all of the system sounds can be listened through AK1, but no sound application (amaroK, xmms, audacity...) can use AK1. The error message usually is that "The device is busy".

    Also, the other problem that I have is that even if the system sounds can be heard, sometimes, after rebooting my computer, there is a kind of "cracking" (hard to express in English, sorry) noise when anything is being reproduced through AK1.

    I will try to upgrade AK1 firmware and see if it makes any difference at all.

  7. noizquake

    noizquake New Member

    I've been trying to get AUDIO KONTROL 1 to work on my Linux laptop for several months now and today I finally made it.
    A guy from the local university helped me and now (nearly) everything works.

    So, here is what we did (as far as I remember):


    First of all, some general requirements and information:

    Operating system: I run Debian Lenny on this computer.

    Kernel version: 2.6.22 or higher. We used a slightly customized 2.6.24 vanilla kernel here. However, you do not necessarily have to change the kernel configuration for being able to use AUDIO KONTROL 1.

    ALSA version: 1.0.15 or higher. We used the 1.0.15 Debian packages here. So, you don't need to build ALSA from source.

    Steps we took:

    1. Configuring the kernel (optional)

    Here I just selected the correct processor family and set the preemption model to "Low-Latency Desktop" to reduce latency.

    2. Setting AUDIO KONTROL 1 as the primary soundcard

    NOTE: The device only works if set as primary soundcard. We think that this may be a bug.

    Open a shell, become root and open the file /etc/modprobe.d/sound with an editor of your choice, e.g.
    user@debian:~$ su
    debian:/home/user# cd /etc/modprobe.d/
    debian:/etc/modprobe.d# vim sound
    In there you should read something like this:
    alias snd-card-0 snd-x-y
    alias sound-slot-0 snd-x-y
    This is data concerning your internal soundcard, which is, at the moment, set as primary audio device (card 0).

    Now, you will have to add the information for AUDIO KONTROL 1 and "swap" the primary and secondary audio device.
    Therefore, the file should then look approximately like this:
    #AUDIO KONTROL 1 (primary device)
    alias snd-card-0 snd-usb-caiaq
    alias sound-slot-0 snd-usb-caiaq
    options snd-usb-caiaq index=0
    #internal card (secondary device)
    alias snd-card-1 snd-x-y
    alias sound-slot-1 snd-x-y
    options snd-x-y index=1
    Save this file.

    3. Testing the new configuration

    aplay -l
    This command should list the two cards.


    You need a WAVE file in your home directory for testing the sound cards.

    To check things out, type (in normal user mode)

    aplay -D hw:1 [yours].wav
    If you hear something now, your internal audio device (card 1) still works.

    Now, it's time to check out AUDIO KONTROL 1:
    aplay -D hw:0 [yours].wav
    If that gives you sound, AUDIO KONTROL 1 (card 0) has been sucessfully installed as your primary audio device. :D

    So, now you can go on solving the next "problem": Making your programs use the soundcard of your choice.

    4. Giving names to your cards (optional)

    This is just something we found useful during the configuration process.
    And it is probably a good thing to do if you have more than 2 cards.

    As I wrote, to test a sound card via aplay, you will have to specify the device (except for the primary one).
    So if you wanted to address the secondary card (card 1), you would have to type
    aplay -D hw:1 ...
    Now imagine, you have 5 sound cards. Then it would be more comfortable to be able to simply type
    aplay -D AK-1 ...
    aplay -D RME ...
    because then you don't have to keep the device numbers in mind.

    For this reason, open a shell and create a file called .asoundrc in your home directory.
    user@debian:~$ vim .asoundrc
    In this file you can now specify aliases for you cards.
    Mine looks like this:
    pcm.usb {
            type hw
            card 0
    ctl.usb {
            type hw
            card 0
    pcm.internal {
            type hw
            card 1
            device 0	#i am not really shure about devices
            subdevice 0     #and subdevices, but as far as now, everything works
    ctl.internal {
            type hw
            card 1
            device 0
            subdevice 0
    So, if I want so address my secondary/internal sound card via aplay, I simply type
    aplay -D internal [soundfile]

    So far that's it.

    What still doesn't work is the beautiful red light AUDIO KONTROL 1 normally shows.

    I hope this post is useful to people who want to run this card under Linux.
    If you have any problems or hints, simply post back.

  8. iclavijos

    iclavijos New Member

    Thanks a whole lot, noizquake!

    Unfortunately I have my Linux desktop broken (motherboard most probably), but as soon as I get it back, I will follow these steps and report you back my results.

    Thanks again for this (I have started thinking about selling AK1).
  9. conque

    conque Forum Member

    There was an update in the ALSA driver recently which enables all input controllers (as Linux input device) as well as all the LEDs (using ALSA's mixer control interface). So you can go ahead an either write your own applications for those devices or use them to control applications as far as they already suport that. In my tests, I used the jog dial of AK1 to select colors in GIMP :)

    Best regards,
  10. noizquake

    noizquake New Member

    Nice to see the device is working for you!

    I must say that I am facing rather big problems getting my software to use AK1.
    Audacious simply doesn't play anything with it and Audacity even crashes.
    On the other side, all the native GNOME audio software simply uses AK1 without complaining.

    Did you face similar problems? If yes, how did you solve them? (can provide more info on that if needed)

    I also updated ALSA a while ago. I use the 1.0.16 Debian packages now.
    The red light still doesn't work, as well as the jog, i suppose.
    Did you build ALSA from source?

    One more question: Does AK1 work as secondary audio device on your computer oder did you also have to set it as primary?
  11. conque

    conque Forum Member


    Audacity indeed seems to have a problem, yes. But not necessarily with that hardware only - I'll do some more tests.

    What about aplay and arecord? xmms?

    I released another 2 patches the last days on the alsa-devel mailing list. You should either manually install them in case you know how that works or wait until offical kernel versions with that patches are released. Sorry for not offering you a more convenient way.

    Well, it does work. All controls and all LEDs are supported on all NI devices. try this:

    $ amixer  controls
    For AK1, this should return

    numid=1,iface=HWDEP,name='LED left'
    numid=2,iface=HWDEP,name='LED middle'
    numid=3,iface=HWDEP,name='LED right'
    numid=4,iface=HWDEP,name='LED ring'
    Other devices show different output, of course.
    But for AK1, to switch on the ring, type

    $ amixer cset numid=4 1
    to switch it off:

    $ amixer cset numid=4 0
    If the above doesn't work, you don't have the most current kernel module running.

    No, it works as both primary and secondary. You simply need to tell your applications which device to use in this ALSA-specific way:

    plughw:0,0,0 means "card 0, device 0, subdevice 0"

    If your AK1 is not card 0 (see /proc/asound/cards), you need to provide a different number as first parameter. For the time being, all NI devices only have one ALSA "device", so the 2nd number is always 0. If you wanna play to the outputs 3&4, choose 1 as last parameter.

    Hope that helps a bit.

    Best regards,
  12. conque

    conque Forum Member

    linux support feedback


    for all further problem reports, please attach an output of the following command (to be entered in a terminal window) to clarify which version of the driver you're actually using:

    /sbin/modinfo snd_usb_caiaq | grep ver
    Thanks and best regards,
  13. noizquake

    noizquake New Member

    Hi Daniel,

    first of all thanks for your support.

    I've tested the things you suggested and was partly successful.
    Here's my report:

    First, setting AK1 as the secondary device now works and probably also did before.
    The problem was that I always used hw:1,0,1 instead of plughw:1,0,1 to address the device.
    How come that I have to say "plughw" here?
    I mean, the expression "hw:0" perfectly works for my internal sound card (Intel HDA).
    For example, when I create a dial-up connection with my winmodem (respectively a linmodem now), I tell the programm to use "hw:0,6".

    Second, some of my software is now able to access AK1 for playing or creating music. Things work well for Audacious and Linux Multimedia Studio.
    By the way: Using arecord seemed to work in the first place (the input LED was lighting up), but when I listened to what I recorded, there was just silence.
    I then openened the file with Audacity: Nothing. Just one straight line at 0dB.

    Audacity itself simply doesn't seem to work with AK1. I mean, probably it does, but how do I tell it that AK1 is not "hw:1,0,x" but "plughw:1,0,x"?
    I haven't found a way yet.
    The same holds for Alsa Modular Synth. But I guess these two apps do not run stable on my system at the moment. I'm getting xruns all the time, especially with the synth.
    That even leads to a kernel panic sometimes.
    Hopefully, this problem will be gone after installing my new Debian system.

    Third, I also tried to access the control lights of AK1 as you described but it did not work for me:
    noizquake@batman:~$ amixer -D hw:1 controls //plughw didn't work in this case
    noizquake@batman:~$ amixer -c 1 controls
    Last but not least, the driver version info you requested:
    description:    caiaq USB audio, version 1.2.0
    vermagic: SMP preempt mod_unload CORE2
    P.S.: As I don't really know how to patch my kernel, I will simply have to wait for an offcicial version including your updates.
    Any idea how long this going to take?

  14. twistedpickles

    twistedpickles Forum Member

    Oh this is !fantastic! I am a linux N3rd and this seems like a great way to pass my time.
  15. conque

    conque Forum Member

    plugwh enables a certain layer in the ALSA system which cares for conversion of channels and sample formats. If your application uses the same layout for samples than your hardware does, you can go for hw:, otherwise you should choose plughw:.

    what about that command:

    arecord -f cd -D plughw:DJ,0,0 | aplay -D plughw:DJ,0,0
    It should capture the input and echo the output straight away without recording to a file. Does that work for you?

    1.2.0 is a version which does not support setting of the controls, sorry. We are at version 1.3.6 at the moment which also corrects the order of input channels (they're twisted in the version you run) as well as sudden lockups of the whole system.

    As patching your own kernel requires quite some inside knowledge, I'd like to ask you to wait until your favorite distribution vendor comes along with a newer version. Not sure yet whether the 1.3.6 version will make it to Linux' official kernel release 2.6.25. You probably have to wait until 2.6.26-rc2 or -rc3. I'll post here as soon as things get merged.

  16. conque

    conque Forum Member

    Ok guys, the most current version of the driver (1.3.6) was included into the current release candidates of Ubuntu 8.04, even though they run Linux kernel 2.6.24. The patches were pushed into their tree manually, not via the official kernel repositories. I guess this driver will become part of 2.6.26-rc1 or -rc2.

    So everyone who does not want to compile an own kernel can just go ahead and install that very piece of software to give it a try. http://www.ubuntu.com/

    Best regards,
  17. noizquake

    noizquake New Member

    Ok, my hardware in this case is AK1. How can I tell an application to use the same sample layout as AK1(generally)?

    That works indeed, BUT:

    There is a latency of about 1s and every sound I direct through the device get's some kind of a delay effect. (repetitions with declining volume)
    The first issue is probably due to kernel configuration since it occured on all of my computers and they are not running as low latency desktops at the moment.
    But what about the delay?

    When I plug my guitar amp into AK1, I get some chaotic high frequency noise.
    If I move the cursor over my desktop in addition to that things get totally out of control (in terms of unwanted noise) - just beeping and crackling.
    I tried the same command with the internal soundcard of my desktop computer (cheap intel stuff) and there was nearly nothing to be heard apart from what I played.
    Could that be because of the old driver version I am using?

    Nice to hear that. But still, this really going to take a while, isn't it?
    At the moment, kernel.org states the latest stable kernel version is 2.6.25.

    So well, how do I patch the kernel? I think I really want to try this. ;)

    P.S.: NI should probably update the Linux compatibility page now, telling people either to use the latest Ubuntu, wait until kernel 2.6.26 or patch the kernel by themselves and - most importantly - not to use the driver version included in kernel 2.6.22 and it's follow-ups if they want things to just work.
  18. conque

    conque Forum Member

    That depends on the application. In general, you have to tell the application to use 24bit samples in 3 bytes, little-endian encoded, 2 channels per stream. That's a thing you normally don't want to care about, hence plughw is the better way to go.

    That command is just for testing. It uses your shell's pipe mechanisms which have large buffers, hence the latency. No worries, that's not related to the driver. It is, however, a good setup to test the channel mapping and see whether all inputs and output are functional.

    However, I can't explain the delay you describe. Could you take the efford and record the output for me?

    No, thats not related to the driver version but rather to the rest of your setup. The noise you describe usually comes from bad USB power supply, i.e. noise generated from other components poisioning the power used by the device to drive its input and output stages. You could prevent that by using a powered USB hub, many others have successfully eliminated similar effects by that.


    These are the patches to be applied on top of the current 2.6.25 kernel sources (the order matters):


  19. noizquake

    noizquake New Member

    I'll try to get that done in the next days...

    Ok, so I'll just try to fix it that way.

    Just some more questions about those patches:

    I was just wondering about the file types and names of the downloaded patches: The attachment notes in the articles always state that the file is called something like snd-caiaq-1.3.x.diff. But when you download it, you get something like 52464-001.bin.
    Is that okay? I mean can I simply apply those files as patches like you normally do?
    And second: Can I rename them before just to keep track of the correct order?

    You probably know about the RT Preemption Patch provided by kernel.org.
    I mean, currently there is none for 2.6.25. But in the near future there will be one, certainly.
    So, if I also want to use that patch, what should I apply first: The caiaq patches or the real time patch?

    Last but not least, another problem with Audacious:
    When I use that audio player with AK 1, it often happens that when I stop one song and immediately start to play another, the whole system totally freezes.
    That error occurs with AK 1 only, not with my internal audio device.
    Any idea why that is?

    Thanks for the support so far!
  20. conque

    conque Forum Member

    Yes. The content matters.

    Yes, the patch utility doesn't care about the name.

    As they touch entirely different files, you can do it both ways around. It's just that the 3 patches I postet depend on each other, so they have to be lined up correctly.

    That is fixed by one of the 3 patches. Shouldn't happen any more as soon as you got your patched kernel up and running. One more motivation, isn't it? :)

Thread Status:
Not open for further replies.