The purpose of this page
In order to ensure the correct sound card or audio interface is used some user and or system wide configuration may need
to be done but it only needs to be done once. It is likely that if the system just has onboard audio things will already work
just fine but there is probably some scope for performance tuning.
Configuring your system for JACK Audio Connection Kit
No JACK means no IDJC
I'm going to be talking about JACK Audio Connection Kit (or JACK) from now on
and its sound server, jackd. Forget IDJC exists for the moment as the information on this page
applies to all applications that require JACK in order to function.
Manually running jackd to see what happens
$ jackd -d alsa
jackd 0.121.0
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK is running in realtime mode, but you are not allowed to use realtime scheduling.
Please check your /etc/security/limits.conf for the following line
and correct/add it if necessary:
@audio - rtprio 99
After applying these changes, please re-login in order for them to take effect.
You don't appear to have a sane system configuration. It is very likely that you
encounter xruns. Please apply all the above mentioned changes and start jack again!
What just happened here is jackd just failed to start because it runs in realtime mode by default
and the system as currently configured won't supply it. Realtime mode helps to ensure that the small and
therefore low latency audio buffers are refilled without interruption. By choosing not to use realtime mode
the buffer fills become more erratic making solid performance rely on using larger buffers that result in higher latency.
This is an old example and jackd is more likely to start these days (perhaps under protest). In any event your mileage
may vary and in the above case the information most likely only applies to non systemd Linux installations (most modern distributions
use systemd so hopefully jackd would suggest something systemd specific or better yet perform the system changes quietly.
Let's get reconfiguring
Note that the following is just an example of what to do based on the example output above. Your mileage may vary.
Add the line mentioned above to the file also mentioned above.
The above change applies only to members of the audio group. Ensure your user account is a member.
Log out of your desktop and log back in again for the new settings to take effect.
Let's try starting jackd one more time.
$ jackd -d alsa
jackd 0.121.0
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK compiled with System V SHM support.
cannot lock down memory for jackd (Cannot allocate memory)
loading driver ..
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
This time it has successfully started so you can now run IDJC.
Making a simple JACK configuration file
The configuration file will determine the operating parameters of an automatically started JACK sound server.
$ echo "/usr/bin/jackd -d alsa -r 44100 -p 256" > ~/.jackdrc
In this example a sample rate of 44100 was selected matching the vast majority of digital music out there.
Making JACK use a particular sound card
It's a two step process of finding the names of all the sound cards and specifying
which one to use.
$ cat /proc/asound/cards
0 [Revolution71 ]: ICE1724 - M Audio Revolution-7.1
M Audio Revolution-7.1 at 0xd000, irq 19
1 [nanoKONTROL ]: USB-Audio - nanoKONTROL
KORG INC. nanoKONTROL at usb-0000:00:1d.0-2, full speed
$ jackd -d alsa -d Revolution71 -r 44100 -p 256
If specifying the card name failed try using the number to the left prefaced by 'hw:' without the quotes.
$ jackd -d alsa -d hw:0 -r 44100 -p 256
Normally you would not need to specify hw:0 since it is the first sound device however you may have onboard
audio disabled in the BIOS, at the driver level, or in ALSA itself resulting in card 0 not appearing in
/proc/asound/cards.
Enabling MIDI events
$ jackd -d alsa -r 44100 --midi raw
Only use the --midi option if you intend to use a MIDI device to control IDJC.
Finally
The program qjackctl can be used to start a JACK sound server. It has a nice graphical user
interface and can generate a .jackdrc file as well.
|