Note
This Tutorial is now a little bit outdated and needs some points changed and/or replaced. I've started already writing a new completely new version of this document, but i currently i dont have much time to work on that and verify everything. So it will take a while until i have it finished.

Introduction
In my last tutorial, "Kernel support for MISC binaries" & Wine i showed how to run Windows (and other) binaries on Linux by just typing their names. While writing it i discovered that Wine now has JACK support and i just had to try it out. I never played with JACK before but read lots of good stuff about it and decided to install it myself and see if it works so well as people used to say. But that really gave me a hard time on hunting for howto's (which i havent found at all), Documentation etc., so i just started to write my own Howto. Although i havent recompiled Wine yet - therefore could not test it's JACK capabilities - i felt this paper is already good enough for a release.

But before we go on:

A BIG FAT WARNING: THIS HOWTO IS NOT FOR BEGINNERS OR PEOPLE THAT JUST WANT TO PLAY AROUND! THE SOFTWARE DISCUSSED (JACK) IS STILL UNDER DEVELOPMENT AND HAS SOME NASTY BUGS -> IT WILL CRASH YOUR MACHINE UNDER MANY CIRCUMSTANCES AND YOU MIGHT LOOSE PRECIOUS DATA. DO NOT TRY THIS IF YOU DONT KNOW WHAT THE SYSRQ KEY IS AS THAT ONE IS VERY LIKELY TO SAVE YOUR A**!

Jack, the Jack Audio Connection Kit, is still some pretty experimental stuff and to get the highest possible performance out of it , it still requires lots of hacking around. Right now there is no easy way to "just install" it and have it working. Also most audio applications still dont have support for it, but the ones that provide JACK support already are worth the time and effort installing it.

As it is still under development it still has quite some nasty downsides - you either have to run JACK and all the Applications that use it ass root or if you run JACK as a user, you loose most of it's advantages (that is it's high speed and low latency). But right now there is also another way available, but you should only do it on workstations without external services and you should be the only user on it.

Linux provides the so called "POSIX draft capabilities", which are a very nice idea for audio and video workstations, but in generall they are more likely to be consideresd as a security risk. These capabilities enable a setuid root program to get rights from the Kernel and give them to it's child's. Technically nothing bad, but this also allows these userspace programs to crash the kernel if they are not very carefully designed and as i said already, JACK will crash the machine under some certain circumstances. But as it seems it just likes to crash when a user presses the wrong button ... later more on that :)

I am using Linux-2.6.0-test-3-mm1 on my workstation with statically built ALSA drivers inside and i've had some weird effects here and there. I also could not compile everything i wanted (see the end of this document), but i assume that some of the problems that occured on my machine are very likely related to the gcc version i am running (3.2.3). I assume if you have a older kernel (2.4.x) and some older gcc (2.95.x) you will probably get much better results than i had with some of those packages.

However, the JACK installation itself worked well and alsaplayer works great ... with 2.67 milliseconds latency :)

REQUIREMENTS: A working ALSA installation and a properly configured soundcard -> this means YOU ALREADY HEAR SOUND out of it.

Step 1. - Kernel Setup
Make sure that you have the following Kernel Options Enabled:

To run JACK as a normal user but with realtime scheduling, you also need to enable the "POSIX draft capabilities" but right now there is no "nice" way to do this. Open /usr/src/linux/include/linux/capability.h with your favorit text editor and look for the following line:

Code:

#define CAP_INIT_EFF_SET to_cap_t(~0 & ~CAP_TO_MASK(CAP_SETPCAP))

and replace it with

Code:

#define CAP_INIT_EFF_SET to_cap_t(~0)

below this line, there should be another line that should look like this:

Code:

#define CAP_INIT_INH_SET to_cap_t(0)

replace it with

Code:

#define CAP_INIT_INH_SET to_cap_t(~0)

or if you know how to handle the patch program, apply this patch.
now recompile your kernel, install it and reboot.

Step 2. - Building alsa-lib with JACK plugin
As soon JACK is running later, even ALSA applications won't be able to use the Soundcard unless they have JACK support. As there are right now only a hand full of applications that have native JACK support we need a workaround here for all our ALSA apps. Luckily, alsa-lib provides us with a jack-plugin that enables ordinary ALSA applications to work together with jack.

Unfortunately, the module doesnt get build by default and somebody of the alsa folks decided that it might be a good idea to require everybody to compile it by hand. The handy "--with-jack" flag (which already existed once and was well documented) got removed again, so i've just hacked up the alsa-lib ebuild to have the module built automatically. This is actually a really ugly hack, but it works.

Open /usr/portage/media-sound/alsa-lib/alsa-lib-0.9.6.ebuild with your favorite texteditor and do the following additions:

at the end of function scr_compile() add the following line:

Code:

(cd src/pcm/ext && (make jack || die "make jack failed"))

in function src_install add a new line after "make DESTDIR=${D} install || die" that reads

if you have done that, (re)emerge alsa-lib-0.9.6, which has to be done right now using the followin command:

Code:

ACCEPT_KEYWORDS="~x86" emerge alsa-lib

Step 3. - Install libcap
Libcap is required by the jackstart tool that gets compiled later when we install jack itself. But as there is no dependency in the ebuild you have to emerge it yourself.

Code:

emrge sys-libs/libcap

Step 4. - Which JACK version?
Now you have to choose which JACK version you want to use. There is the CVS version (media-sound/jack-cvs) and the release version (media-sound/jack-audio-connection-kit). For this tutorial it doesnt matter which version you are going to use; the steps to do are basically the same, but you do them on diffrent files. On the following Steps i will use the current version 0.80.0 as example (which is right now still masked, but works very well).

Be carefull, there is a package named jack which is also in media-sound but that one has nothing to do with the JACK Audio connection Kit. One of media-sound/jack-cvs or media-sound/jack-audio-connection-kit is what you want.

Step 5. - Installing JACK
because i am a lazy guy i am not going to use the PORTAGE_OVERLAY directory in this example as this would require lots more of typing :)
but you should use it. see the portage user document on how to use it. really.

Code:

cd /usr/portage/media-sound/jack-audio-connection-kit

open the jack-audio-connection-kit-0.80.0.ebuild file in your favorite texteditor and goto line 45 and modify it so it will read

Step 6. - Configure ALSA
to make jack and alsa work as a team, we will have to tell jack which soundcard's it should use. this is done either through /etc/asound.conf or ~/.asoundrc. if none of these files exist, create one of them (i prefer /etc/asound.conf) and read this document. as a example i provide my configuration here:

remember, this is my configuration from my workstation, so you have to read the alsa-docs and create a config file for your own soundcard (it probably looks very similar if you dont have a MIDIMAN or RME HAMMERFALL card). my workstation has only a very cheap onboard soundchip - a C-MEDIA 8738 MC6. but as it has fiber ports which are connected directly to my hifi, so it doesnt matter much if it is onboard or not. the sound is superb.

Step 7. - Testing JACK
now login as a user and start jackd via the following command remeber to use the name of your soundcard and not cmipci, unless you've got the same card):

Code:

jackstart -v -R -d alsa -d cmipci -H -M -m

WARNING: DO NOT PRESS CTRL+S NOW TO STOP THE SCROLLING! IT WILL CRASH YOUR MACHINE - YOU CANNOT RECOVER BY PRESSING CTRL-Q! Happend to me and i was lucky that i had the magic sysrq enabled which still allowed me to sync and unmount the disks so nothing really important got lost, and vim also recovered this tutorial :)

The output shown is there for debugging reasons and you probably want to see it in the next step. If you want to stop it scrolling, press CTRL-C. This will stop JACK, but it wont crash your machine :)

Step 8. - Alsaplayer
Since version 0.99.70, the alsaplayer supports jack as a output-plugin, but it will not be compiled unless it's configure script detects the installed jackd. therefore you probably will have to recompile the alsaplayer if you had it installed already.

Code:

emerge alsaplayer

by default, the alsaplayer wants to use alsa directly for playback. this we're going to fix i a later step, so for now run

Code:

alsaplayer -o jack

play some tune and look at the output of jackd. if you hear sound and see no errormessages from jack (alsaplayer might throw a notice that your "interface" is running at some higher number than 44100) the hard part has been done. For testing you might want to start 10 other alsaplayers, all playing the same track (electrionic music is nice) and play with the pitch and the volume on all of them :)

Step 9. - Starting JACK
there are two ways to start jack:

manually like in step x. but you probably don't want the debug output

Code:

jackstart -R -d alsa -d cmipci

jackstart has a few options you can set - but watch it, the first occuring "-d alsa" separates the jackstart options from the alsa driver options which you can (and probably want) set as well. so

Code:

jackstart --help

shows the first set of options (the jackstart options) and

Code:

jackstart -d alsa --help

shows the driver options. Remember to put the jackstart options in front of the "-d alsa".

or emerge qjackctl (HIGHLY RECOMMENDED)

Code:

ACCEPT_KEYWORDS="~x86" emerge qjackctl

which is kind of a multifunctional jack control tool. with it you can start and stop jack, setup connections between applications and see a complete status. when it's done emerging run

Code:

qjackctl &

you cannot yet start JACK as a real deamon, and as it's used right now by very few applications. some alsa applications will work directly with JACK as we've created the asound config file above containing the jack plugin. Others that have a poorly designed ALSA driver will try to connect to the hardware device and wont work at all.

Step 10. - Setup Alsaplayer to use JACK whenever it's available.
Open the file ~/.alsaplayer/config with your favorite text editor. look for a line that says

Code:

main.default_output=alsa

and change it into

Code:

main.default_output=jack

if you start alsaplayer now, it will automatically use JACK if it's running. otherwise it will fall back to use ALSA.

Unsolved Problemsmedia-libs/libjackasyn

This tool can connect OSS applications to JACK. of course, they wont work in synchronous mode, but for stuff like mplayer, xine etc this should be good enough. It doesnt find jack/error.h, and there really is no such file. So i uncommented the include in the source and tried to compile by hand. That worked, but the resulting app did nothing more than crash the alsaplayer which was connected at that time through jackd. So i didnt do much more with it as i think this app is kinda outdated and needs to be "synced" with JACK.

too bad, would have loved to use it.

media-libs/ladcca-0.3.1

ladcca doest compile on my machine - dies with the following error message

The End (?)
Nope, for sure not. Although JACK is not finished yet, i see a great future for the project. I will also update this document as soon as i have new informations, got more stuff running or got feedback from you folks :)

I hope someone can provide some patches or hacks to get more stuff working with JACK and please, people, provide some feedback on other applications that you've got working with JACK!_________________A mathematician is a machine for turning coffee into theorems. ~ Alfred Renyi (*1921 - †1970)

Last edited by rojaro on Fri Apr 30, 2004 11:01 am; edited 1 time in total

I got most of these things to work last night, and then I found your guide - doh! So let me add my experiences with the things you mention.

- I've never had JACK crash my machine. Not even when running in realtime.

- I'm using a 2.4.20-gentoo-r7 kernel, so I can't use the "Enhanced Real Time Clock". Things are still working fine, though.

- The changes in /usr/src/linux/include/linux/capability.h also work with my kernel. They are described on the JACK homepage also.

- Building alsa-lib with JACK plugin is the one thing I can't get to work. As I understand it, this should route all calls to ALSA through the JACK server. It won't work. Maybe my asoundrc is wrong, I'll try again when I get the time.

- I can't get JACK to work when I use the ebuild. I can't get the realtime capabilities to work, no matter what arrangement of permissions on jackstart and jackd I try. Compiling it manually with the same configure parameters works for me, after I change the permissions on those two files.

- Configuring ALSA is a big problem. There's simply aren't any thorough guides to asoundrc, and it difficult to find specific hardware documentation. My soundcard is a Terratec DMX 6Fire 24/96. It's very nice, and has a lot of channels and mixers and monitors, and it's completely impossible for me to understand how to write a good asoundrc. The ALSA project obviously has a hard time getting hardware details from the hardware makers, and their sparse documentation is rarely helping us users. IMO. I'll try to find better documentation, and work more with it.

- qjackctl would be much more useful if it could store several settings for JACK, so you could start the server with different parameters. I haven't really looked into this, I must admit.

The reason I started looking on this was that I wanted to use a MIDI interface with ALSA. I started by cleaning out all traces of OSS in /etc/modules.d/alsasound (which turned out to be most of it...), and after several tries it actually started working.

I then emerged JACK 0.80, but it turns out that this blocks emerging other audio applications. They simply won't compile. So I downgraded JACK to 0.7? (latest stable), and emerged a couple of synths and stuff. They were rather disappointing, and mostly used OSS (bummer!). That's when I decided to get JACK working properly, OSS be damned. After too many hours of going through all of the above I had a working JACK, Rosegarden, Hydrogen and Alsaplayer. Then I found your guide.

It would be nice to replace Arts (in KDE) with JACK, or at least get XMMS, Xine and Mplayer to use JACK and then disable Arts. None of this is possible, to the best of my experience. It's just too new, and we have to patch a lot of programs to get JACK working at all. I suppose we'll just have to wait, and that's an awful solution to any problem! ( There is an JACK plugin for XMMS, but I can't get it to work.)

I have three sound devices: The aforementioned Terratec, which is my main soundcard. A small C-media 8738 that I'm not really using. And a Roland UM-1 USB MIDI interface. The ALSA layer works fine with the drivers in 0.9.6/7. There is a special mixer application for the ice1712 chip (in the Terratec) called envy24control. It is reportedly very good, but it has so many knobs and buttons that I go dizzy. And it's not clear wether all these options apply to my specific card - they probably don't. What I mean by "the ALSA layer works fine" is that the sound I get is indistinguisable from what I get from the same hardware in Windows, and directly from an audio CD-player. The UBS MIDI works fine also, which was a bit of a surprise - not much to say about that.

Running JACK with ASIO enabled actually works, which was a nice surprise after just about everything else failed to. Starting JACK with "jackstart -v -R -a -d alsa -d hw:0 -r 44100 -p 64" gives me a playback and record latency of 2 and 1 ms, as reported by Rosegarden. This with jackd having 10-15% cpu-load when running idle (Athlon 1800+), so it's not really usable, but it shows that it's possible to get the latency low enough for real audio work, which was my main concern. I'll look into this later.

I recommend qjackconnect, which gives a good overview of the current jack connections.

And now to something completely different: Maybe some of this should be added to the Gentoo sound guide (from the user docs)? It's actually "Gentoo Linux ALSA Guide", and doesn't touch upon JACK or MIDI. Judging from the questions in the Multimedia forum, many people have problems getting started, despite of this user doc. And the "only one sound at a time"-question is asked three times a day. That particular question (and others like it) should be answered in the Gentoo documentation (ie. the user docs), but the "Gentoo Linux ALSA Guide" doesn't cover everything. What does everybody think? Should we try to make a larger "Gentoo Linux sound Guide"?_________________Excelsior!

- I've never had JACK crash my machine. Not even when running in realtime.

well, i've got it running now for quite some time, and i also havent found anymore problems so far, except the ones which i've explained already

Herodot wrote:

- Building alsa-lib with JACK plugin is the one thing I can't get to work. As I understand it, this should route all calls to ALSA through the JACK server. It won't work. Maybe my asoundrc is wrong, I'll try again when I get the time.

i found out that it will work with any alsa application that uses alsalib for playback (which are just very few) while the ones that use the alsa-devices will not work. e.g. xine, xmms (with alsa driver) and mplayer won't work (which is a real pity).

Herodot wrote:

- I can't get JACK to work when I use the ebuild. I can't get the realtime capabilities to work, no matter what arrangement of permissions on jackstart and jackd I try. Compiling it manually with the same configure parameters works for me, after I change the permissions on those two files.

hmm.. works fine for me .. although i've modified the ebuild (as i wrote in the tutorial)

Herodot wrote:

- Configuring ALSA is a big problem. There's simply aren't any thorough guides to asoundrc, and it difficult to find specific hardware documentation. My soundcard is a Terratec DMX 6Fire 24/96. It's very nice, and has a lot of channels and mixers and monitors, and it's completely impossible for me to understand how to write a good asoundrc. The ALSA project obviously has a hard time getting hardware details from the hardware makers, and their sparse documentation is rarely helping us users. IMO. I'll try to find better documentation, and work more with it.

actually, the whole alsa documentation seems to be VERY outdated and very incomplete. the only document about the asoundrc i've found was a basic parameter listing (which looked like being generated with doxygen or something similar) which doesnt contain a single example.

Herodot wrote:

- qjackctl would be much more useful if it could store several settings for JACK, so you could start the server with different parameters. I haven't really looked into this, I must admit.

qjackctl 0.0.8 stores it's settings in ~/.qt/qjackctlrc, but it seems it only does this when it is creating the file. if you change something later on, it won't be saved.

Herodot wrote:

After too many hours of going through all of the above I had a working JACK, Rosegarden, Hydrogen and Alsaplayer. Then I found your guide.

still could not get ardour, rosengarten and hydrogen working on my machine, but mostly due to compilation errors of other libraries (as noted above) :(

Herodot wrote:

It would be nice to replace Arts (in KDE) with JACK, or at least get XMMS, Xine and Mplayer to use JACK and then disable Arts. None of this is possible, to the best of my experience. It's just too new, and we have to patch a lot of programs to get JACK working at all. I suppose we'll just have to wait, and that's an awful solution to any problem! ( There is an JACK plugin for XMMS, but I can't get it to work.)

I don't use Arts at all. i found it to be too slow for me, memory consuming and completely laggy to do anything with it. there are options to disable it completely in kcontrol. I also configured all the other programms (like xmms, mplayer and xine) to use alsa natively. there is no need for the big bloated artsd ...

Herodot wrote:

I have three sound devices: The aforementioned Terratec, which is my main soundcard. A small C-media 8738 that I'm not really using.

thats the one i have ... it's analogue outputs are really bad, but the sp/dif is pretty much flawless :)

Herodot wrote:

This with jackd having 10-15% cpu-load when running idle (Athlon 1800+), so it's not really usable, but it shows that it's possible to get the latency low enough for real audio work, which was my main concern. I'll look into this later.

i think the cpu-load which jackd reports is kinda unreliable. on my machine (which is a p4/3ghz) it also always reports something around 10% but my top actually never ever reported it to be using more than 1.7%. i've also ran for testing like 10 alsaplayers simultaneously together with freqtweak (which produced kind of a very weird sound as all where playing diffrent shoutcast streams) but even then top reported it to be just around 4% which is f***ing cool.

Herodot wrote:

I recommend qjackconnect, which gives a good overview of the current jack connections.

well, qjackctl also provides that feature, and it even looks better ... :)

- I can't get JACK to work when I use the ebuild. I can't get the realtime capabilities to work, no matter what arrangement of permissions on jackstart and jackd I try. Compiling it manually with the same configure parameters works for me, after I change the permissions on those two files.

hmm.. works fine for me .. although i've modified the ebuild (as i wrote in the tutorial)

I tried again, and this time it worked. I didn't even have to chmod anything.

rojaro wrote:

actually, the whole alsa documentation seems to be VERY outdated and very incomplete. the only document about the asoundrc i've found was a basic parameter listing (which looked like being generated with doxygen or something similar) which doesnt contain a single example.

Exactly - it's borderline worthles. Many projects need better documentation, but ALSA is certainly one of the worst.

rojaro wrote:

still could not get ardour, rosengarten and hydrogen working on my machine, but mostly due to compilation errors of other libraries (as noted above)

I'm also having problems with several programs. At first I managed to get some compiled by having a JACK 0.7, not 0.8. But ladcca and ardour still won't compile. Somebody ought to file a bug!

rojaro wrote:

I don't use Arts at all. i found it to be too slow for me, memory consuming and completely laggy to do anything with it. there are options to disable it completely in kcontrol. I also configured all the other programms (like xmms, mplayer and xine) to use alsa natively. there is no need for the big bloated artsd ...

True, I've seen that particular light as well. But it would certainly be preferable to go through JACK, to get multiple streams.

rojaro wrote:

i think the cpu-load which jackd reports is kinda unreliable. on my machine (which is a p4/3ghz) it also always reports something around 10% but my top actually never ever reported it to be using more than 1.7%.

I agree. Not do I think top is completely reliable.

rojaro wrote:

i've also ran for testing like 10 alsaplayers simultaneously together with freqtweak (which produced kind of a very weird sound as all where playing diffrent shoutcast streams) but even then top reported it to be just around 4% which is f***ing cool.

Yes! I'll have to try that!

rojaro wrote:

Herodot wrote:

I recommend qjackconnect, which gives a good overview of the current jack connections.

well, qjackctl also provides that feature, and it even looks better ...

You're absolutely right. It seems that checking "Details" in qjackctl was too difficult for me, so I thought it was just a start/stop button. Now that I've seen what it really does, I use it all the time.

I claimed that there's no "CONFIG_RTC (Character Devices -> Enhanced Real Time Clock)" in the 2.4.20 kernel. That's wrong, it's there. But there's no "CONFIG_SND_RTCTIMER (Sound -> Advanced Linux Sound Architecture -> RTC Timer support)" - I wonder if I can emerge the alsa-driver with a similar parameter?

I just got fluidsynth to work with JACK, that's important. But I'm still having problems with figuring out how everything connects._________________Excelsior!

I'm not exactly sure what to do AFTER that, though. How exactly do you make libjackasyn do it's thing? I've tried using LD_PRELOAD and jacklaunch, but the result is the same: /dev/dsp is considered busy.

Also, anybody know how to get one machine's client to communicate with another? Is this beyond jack's capabilities?

First of all: I mainly followed the howto of the original poster rojaro (thanks man) and now i have JACK running in realtime as an ordinary user on my MAudio Delta 66 (which is one the none standard cards i guess). I'm currently working with JACK version 0.90.1, ALSA-lib v 0.9.8, ALSA driver v 0.9.8 (kernel modules) and everything described below was tested with this configuration. Here are my little additions to some of the steps:

1) Kernel setup for JACK realtime-priority

Besides the kernel setup i needed to suid root the jackstart executable via

Code:

chmod u+s `which jackstart`

to be able to run JACK with realtime-priority as an ordinary user.
I am using kernel-2.6.0 (development-sources-2.6.0) and everything described under Step 1 worked well with this kernel.

2) Building alsa-lib with JACK plugin

In my portage tree alsa-lib is no longer in media-sound but rather in media-libs.
Additionally the alsa-lib-0.9.8.ebuild already contains the code to build the jack-plugin when your USE flags contain "jack".

5) Installing JACK

The jack-audio-connection-kit-0.90.1-r1.ebuild (and above) already contains the described modifications. They are activated only if your USE flags contain "jack-tmpfs jack-caps". Summarized my JACK part of the USE environment variable contains the three items "jack jack-tmpfs jack-caps". With this you should be able to emerge alsa-lib and jack-audio-connection-kit without ebuild modifications.

Now on to the applications. Since i want music during the day i need an MP3 player. And here the struggle begins. I know there is alsaplayer which is working with JACK but i'm into xmms for years now and i wanted to get it JACKified.

XMMS

In short: it should work - but not for me. It only works if your JACK demon is running at 44100hz. My soundcard is driven by 48000hz so xmms complains about incompatile sample rates (most of the mp3 files are 44100hz). So if you're running JACK at 44100hz this should work and here's what i've done:

1) Used this (selfmade) ebuild:

Code:

# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

Put this into your PORTDIR_OVERLAY dir under media-plugins/xmms-jack and name it xmms-jack-0.6.ebuild.
Then do

Code:

ebuild $PORTDIR_OVERLAY/xmms-jack/xmms-jack-0.6.ebuild digest

and

Code:

emerge $PORTAGE_OVERLAY/xmms-jack/xmms-jack-0.6.ebuild

and xmms now offers an jack output plugin. Hurray - one may say at 44100hz. As described above my card runs 48000hz. When running JACK with this rate (which is possible) the sound is pitched up because my card interprets it as 48000hz. What is necessary here is some kind of sample-rate conversion. Can anybody tell me if this should theoretically be done by the JACK demon or the xmms output plugin?

Hydrogen
Hydrogen is a drum-machine with JACK support. Compiled cleanly and works fine here.

Ardour
Compiled and running. Never tried it, though.

KDE, Arts and JACK
Short story.. doesn't work for now. There are some bugs filed at bugs.kde.org which vote for JACK support in arts. If you are a registered kde developer vote for these over there.
Bug 62465: aRts: more output modules needed, expecially JACK
Bug 64696: Make artsd able to use alsa and especially jackd

Interesting also (it's ALSA related only):
Bug 70802: showstopper: artsd fails at using a modern alsa setup: pcm.default not used_________________"Without music, life would be a mistake - I would only believe in a god who knew how to dance." (Nietzsche)

just an update, i followed the guide and everything works fine. I'm using alsa-lib 1.0.2, jack .94, and 2.6.2 kernel. getting alsa to emerge took a couple steps though. i had to emerge alsa-lib without the jack flags, then emerge jack, then re-emerge alsa-lib with the jack flags. xmms-jack now works again as of version .8. also, i think it is because of the version of jack i am using, i had to modify the headers of spiral modular to get it to compile. i'll look up what I did and post it.

@orb9: Your soundcard is not 'driven' at any rate. You can set your sample rate to 44100--or whatever proper number you want for that matter--with envy24control (media-sound/alsa-tools). Starting jack with '-r 44100' should automagically set your card to 44100 hz. But seeing as it apparently doesn't, just set it with envy24control. Always remember, young grasshopper, resampling is bad!

'tis a shame to not know the full capabilities of one's own $200+ sound card : ) j/k, we're all here to learn.

I loosely followed this tutorial for getting jack working and want to mention some points:

1) Great! Many thanks for this tutorial!!
2) Some things are easier as described, using the USE-flags jack, jack-caps and jack-tmpfs which may not have existed when this tutorial was written.
3) An updated Version (using the USE-flags) of this tutorial would be very nice! Also, as suggested by Herodot , I think a "Gentoo Linux sound Guide" is a great idea. In my opinion, gentoo with its huge possibilities to tweak and optimize makes it a perfect joice for serious linux audio work.
4) I may be blind, but where can I look up the actual latency of my system?
5) As far as I can see, the jackstart parameter -a for using ASIO got removed. Does anyone know why?
6) My card is a Terratec EWX 24/96 (ice1712 alsa-driver). This card is capable of 96kHz sampling frequency. When running

Code:

jackstart -v -R -d alsa -d ice1712 -r 96000

i get this output:

Code:

back from read, ret = 1 errno == Success
getting driver descriptor from /usr/lib/jack/jack_dummy.so
getting driver descriptor from /usr/lib/jack/jack_alsa.so
jackd 0.94.0
Copyright 2001-2003 Paul Davis 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

I don't get the delay lines with other frequencies, and I do not really understand what they mean. Are these the good old XRuns? Does anyone have an idea on this? I want to get rid of them._________________"Work is the curse of the drinking classes."
-Oskar Wilde

Today I learned that DRI / GLX aren't compatible with jack running in realtime. It caused many things to hang on my system, including ps and top. Disabling the glx line in my xf86config seems to have fixed it. Here's a link to a thread on the jack developer mailing list: http://sourceforge.net/mailarchive/message.php?msg_id=7005966

I'm planning on tackling this soon, but using the 2.4.x kernel. My question is this: The 2.4.25-gentoo-sources kernel doesn't seem to have the low latency patches, so I thought I'd apply Andrew Morton's 2.4.25 patches and do it myself.

If I do it that way, should I be using the 2.4.25 vanilla sources, or is there another set of 2.4 sources that has the low latency patches in it?

I tried patching the 2.4.25-gentoo-r2 sources, but I had a few failed patched. I made a best guess to resolve them, and the kernel did compile, but I'm not a kernel hacker, so I'm not sure that's the best way to do it.

As far as I know, the gentoo-sources already should contain the low-latency patch. But you have to enable it in make menuconfig._________________"Work is the curse of the drinking classes."
-Oskar Wilde