[PlanetCCRMA] Re: Problem with /usr/bin/jackstart

Mark Knecht markknecht@gmail.com
Sun Aug 7 06:44:01 2005


On 8/6/05, Ron Pepper <feffer777@yahoo.com> wrote:
> --- Mark Knecht <markknecht@gmail.com> wrote:
> 
> > Right. You can see from the message above that it doesn't like n=4
> > and
> > sseems to want you to use n=2.
> >
> > In terms of latency, n=2/p=1024 is the same as n=4/p=512.
> 
> > So realtime is loaded but apparently your user account is not able
> > to
> > access the capability...
> 
> > I load realtime like this:
> >
> > modprobe realtime gid=408 any=1
> >
> > This grants group 408 the rights to use realtime capabilities. In
> > my
> > /etc/group file I have this line:
> > realtime:x:408:mark
> 
> > which places user mark in group 408. With my laptop I can then run
> > jackd -R
> 
> Thanks for breaking it down for me. So I added a group and then got:
> [rp@localhost ~]$ jackd -d alsa -r 44100 -n 2 -p 1024 -d hw
> result: a long string of "**** alsa_pcm: xrun of at least 0.031
> msecs"

Right, so without realtime capabilities your system needs to run with
more latency. You would try 2/2048 or 2/4096, etc. I'm not saying
these would be of any value in real life but rather it's jsut the way
you'd get things to run without realtime and without xruns.

Below why dod you switch beack to -n 4?????

> 
> Then tried:
> [rp@localhost ~]$ jackd -d alsa -r 44100 -n 4 -p 1024 -d hw
> jackd 0.99.36
> 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
> 
> JACK compiled with System V SHM support.
> `default' server already active
> 
> Does this mean jack is already running or that another sound server
> is running and blocking it? When I then try to run xmms, I must quit
> the terminal and use the ALSA plugin for output. The Jack plugin
> freezes xmms when I try it.

Yes, Jack was still running somewhere. This is not good and would have
stopped JAck from starting if it was already running. You would run

ps aux

to see the process stack and then kill any jack processes that are
running. Note that this may leave behind fifos in memory somewhere and
still confuse JAck. If you're not reasy to clean all this stuff up by
hand yet then possibly a reboot would be better for you.


> 
> > What confuses me about all of this is that I thought Fernando's
> > scripts set all this up automatically...
> 
> My system is somewhat of a hybrid. When I first installed FC3, it
> didn't recognize the soundcard. I found the ALSA site and finally
> sorted out that I needed to configure a module for my "special" sound
> chip. While struggling to do this, I was helped by Rick B. who also
> pointed me to CCRMA. I then loaded a CCRMA kernel and pointed
> Synaptic to Fernando's repositories. Since I finally got xmms etc
> working, I was worried about tearing it all down again to install a
> pure CCRMA system. I intend to do this at some point, but want to get
> more familiar with CLI and Linux in general first. 

There is no reason that I know of that would require you to do this.
If Synaptic says this are set up correctly then they probably are.

> Am I right in
> thinking that I need to use Jack as my sound server in order to do
> the dual activities of playing an audio-stream from xmms and
> recording it?

No, you have some terminology mixed up here:

1) Alsa is the sound server.
2) Alsa will only handle one client at a time so with Alsa running you
can run alsaplayer OR xmms or mplater one at a time.
3) Jack is a way of connecting multiple audio apps to each other and
to Alsa, but Jack is the only app that connects to Alsa so it's the
'one app' in #2 above.
4) Multiple apps can then connect to Jack. Jack does routing and
summing so Jack makes Alsa think there is only one app and Jack routes
all the Jackified audio from app to app.

If you are running Gnome or KDE and start their sound server then you
*may* get in the way of starting Alsa. It does not sound like you have
this problem. Most of these sound servers support being an Alsa client
these days but I find it best to not start them at all if possible, at
least until you get the other stuff working correctly.

I'm disappointed that no one else has stepped into this conversation.
I feel that I must be overlooking some obvious PlanetCCRMA/FCx item
that would make things work better for you. Unfortunately (for you) I
do most of my audio on Gentoo now where set p is not so mysterious for
me. Unfortunately that's not really a good option for someone newer to
Linux. I did spend a few minutes looking through Fernando's
installation instructions and admit I cannot see what you might have
forgotten.

Let's keep trying. 

- Mark