AUDIO KONTROL 1 on Linux - NI User Forums

User Forum


Helpful Links and Info
Search
Use Advanced Search
Go Back   NI User Forums > KOMPLETE Area > NI Audio Interfaces > Technical Issues

Closed Thread
 
Thread Tools
  #1  
Old 04-09-2007, 13:20
Forum Newcomer
Thread Starter  
Join Date: Sep 2007
Posts: 4
AUDIO KONTROL 1 on Linux

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.
  #2  
Old 04-09-2007, 14:39
NI Product Owner
 
Join Date: Oct 2002
Posts: 1,445
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.

Best,
plangin
__________________
Robert Ham | RH Podcast | Facebook | RH @ Twitter | Plangin @ Twitter

 MacBook Air 13", Intel Core i7 1.8 GHz, 4 GB RAM
 iMac 27", Intel Core i7 2.93 GHz, 16 GB RAM


NI Traktor Kontrol S2, F1, X1, 2x NI Audio 8 DJ, 2x Technics SL-1210 MK2

Traktor (Scratch) Pro 2.6.0 @ OS 10.8.2
  #3  
Old 05-09-2007, 13:26
Forum Newcomer
Thread Starter  
Join Date: Sep 2007
Posts: 4
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  
Old 19-09-2007, 08:39
Forum Newcomer
 
Join Date: Sep 2007
Posts: 3
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!

Ivan
  #5  
Old 25-09-2007, 14:45
Forum Newcomer
Thread Starter  
Join Date: Sep 2007
Posts: 4
"News"

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  
Old 14-10-2007, 20:32
Forum Newcomer
 
Join Date: Sep 2007
Posts: 3
Hi there, linuxer.

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

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):

Code:
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.

Cheers!
  #7  
Old 01-03-2008, 16:10
Forum Newcomer
 
Join Date: Mar 2008
Posts: 17
Hello,
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.
Code:
user@debian:~$ su
Password:
debian:/home/user# cd /etc/modprobe.d/
debian:/etc/modprobe.d# vim sound
In there you should read something like this:
Code:
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:
Code:
#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

Type
Code:
aplay -l
This command should list the two cards.

Reboot.

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

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

Code:
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:
Code:
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.

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
Code:
aplay -D hw:1 ...
Now imagine, you have 5 sound cards. Then it would be more comfortable to be able to simply type
Code:
aplay -D AK-1 ...
or
Code:
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.
Code:
user@debian:~$ vim .asoundrc
In this file you can now specify aliases for you cards.
Mine looks like this:
Code:
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
Code:
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.

noizquake
  #8  
Old 01-03-2008, 23:43
Forum Newcomer
 
Join Date: Sep 2007
Posts: 3
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  
Old 25-03-2008, 19:27
Forum Member
 
Join Date: Feb 2008
Posts: 22
noizquake wrote:
Hello,

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.

noizquake
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,
Daniel
  #10  
Old 30-03-2008, 22:41
Forum Newcomer
 
Join Date: Mar 2008
Posts: 17
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  
Old 09-04-2008, 17:55
Forum Member
 
Join Date: Feb 2008
Posts: 22
Hi,

noizquake wrote:
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.
Audacity indeed seems to have a problem, yes. But not necessarily with that hardware only - I'll do some more tests.

noizquake wrote:
On the other side, all the native GNOME audio software simply uses AK1 without complaining.
What about aplay and arecord? xmms?

noizquake wrote:
I also updated ALSA a while ago. I use the 1.0.16 Debian packages now.
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.

noizquake wrote:
The red light still doesn't work, as well as the jog, i suppose.
Well, it does work. All controls and all LEDs are supported on all NI devices. try this:

Code:
$ amixer  controls
For AK1, this should return

Code:
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

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

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


One more question: Does AK1 work as secondary audio device on your computer oder did you also have to set it as primary?
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,
Daniel
  #12  
Old 10-04-2008, 10:45
Forum Member
 
Join Date: Feb 2008
Posts: 22
linux support feedback

Hi,

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:

Code:
/sbin/modinfo snd_usb_caiaq | grep ver
Thanks and best regards,
Daniel
  #13  
Old 15-04-2008, 18:40
Forum Newcomer
 
Join Date: Mar 2008
Posts: 17
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:
Code:
noizquake@batman:~$ amixer -D hw:1 controls //plughw didn't work in this case
noizquake@batman:~$

noizquake@batman:~$ amixer -c 1 controls
noizquake@batman:~$
Last but not least, the driver version info you requested:
Code:
description:    caiaq USB audio, version 1.2.0
vermagic:       2.6.24.2-noizquake 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?

noizquake
  #14  
Old 15-04-2008, 22:52
Forum Member
 
Join Date: Nov 2007
Posts: 147
Oh this is !fantastic! I am a linux N3rd and this seems like a great way to pass my time.
__________________
::twistedpickles :: :
::download latest mix here::-->
http://www.discowhore.com
  #15  
Old 16-04-2008, 11:03
Forum Member
 
Join Date: Feb 2008
Posts: 22
noizquake wrote:
Hi Daniel,
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?
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:.

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.
what about that command:

Code:
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?

Third, I also tried to access the control lights of AK1 as you described but it did not work for me:
Code:
noizquake@batman:~$ amixer -D hw:1 controls //plughw didn't work in this case
noizquake@batman:~$

noizquake@batman:~$ amixer -c 1 controls
Last but not least, the driver version info you requested:
Code:
description:    caiaq USB audio, version 1.2.0
vermagic:       2.6.24.2-noizquake SMP preempt mod_unload CORE2
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.

Daniel
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:23.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.