LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-30-2004, 02:33 PM   #1
exitium
LQ Newbie
 
Registered: Nov 2004
Posts: 12

Rep: Reputation: 0
Using Jack audio connection kit with Fedora Core 2


Hi!

I'm trying to install and use Rosegarden audio application on my Fedora Core 2 x86_64 box running a 2.6.9 kernel.

My system is the following:
AMD Athlon 64 3000+
Asus K8V SE mobo
1GB of DDR400 memory
SATA-150 RAID0 with 2xSeagate Barracuda 7200.2 120MB disks on promise controller

I have succeeded to recompile my kernel so that I have selected a proper CPU (AMD Athlon 64), pre-emptive kernel option and Default security set to module so that I'm able to load realtime-lsm-0.1.1 kernel module.

The module loads up fine and I''m using following command:
Code:
modprobe --first-time realtime allcaps=1 any=1
I have compiled the JACK audio connection kit 0.99 with following options:
Code:
./configure --with-default-tmpdir=/mnt/ramfs --enable-capabilities
I'm using qjackctl to control my jack server and have been able to tweak the configuration so that the latency is ie. 5,9ms. However when running the jackd or jackstart there is a huge amount of XRuns and when the latency is around 5,9ms my processor usage is up to 89% even there is only jackd running.

It seems that most of the how-to and project documentations handle only 2.4 series kernels. Also it seems that 64bit version help is hard to find.

Should I consider to install another distro (ie SuSe 9.2 or Debian with agnus?) or is there any hope for me to get this system working?

If you need any more details (config files, commands that I've used etc.) please ask for them since I have not necessarily provided all the needed info.

Best Regards:
Exitium
 
Old 11-30-2004, 06:40 PM   #2
exitium
LQ Newbie
 
Registered: Nov 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Just some more bits of information for my case.

Audacity was able to play 20 cd quality mono tracks on Fedora Core 2 stock kernel 2.6.9-1.6FC2 with no problems after I had it compiled (does not use Jack)
Ardour plays the track but I've only tried it with latency of about 50ms so the sound breaks up badly even with one mono track
Rosegarden seems like it's playing, but there's no sound. This is only tested with 50ms latency too...

Last edited by exitium; 11-30-2004 at 06:42 PM.
 
Old 11-30-2004, 06:51 PM   #3
exitium
LQ Newbie
 
Registered: Nov 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Oh, I forgot.

I have tried LD_ASSUME_KERNEL=2.4.19 but then the Jack will not even do ./configure saying that my selected processor does not support x86 command set
 
Old 11-30-2004, 08:43 PM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
hi,

i can't really help but can at least fill in a little bit
i'm using jack on LFS with kernel 2.6.3
kernel is compiled with ICC not GCC (Pentium 4) 32 bit
never used the realtime module like you said
just use sudo on jackd and jack apps so they run as root
with jackd and ladccad running CPU usage is from 0.2 to 0.4 percent
the jackcontroll configuration page says down in the corner latency is 42.7 msec
never tweeked those settings at all..
never had any latency troubles at all and never had sound breaking up.
both midi keyboard and mic input is perfectly in sync with playback.

something is definitly wack about the high cpu usage and that's what is causing sound troubles i think
 
Old 12-01-2004, 08:37 AM   #5
exitium
LQ Newbie
 
Registered: Nov 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Hi!

I also tried executing the Jack as a root when still running the FC2 stock kernel. The latency reported by qjackctll was then about that 48 - 50ms and then there was no overwhelming CPU usage. However with Ardour the sound broke up badly.

Best Regards:
Exitium
 
Old 12-01-2004, 12:00 PM   #6
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
possibly some alsa software mixing thing -- just guessing
i have this in .asoundrc (i give the whole thing cause i don't know what might effect)
Code:
pcm.jackplug {
	        type plug
	        slave { pcm "jack" }
	}

	pcm.jack {
	        type jack
	        playback_ports {
 	               0 alsa_pcm:playback_1
 	               1 alsa_pcm:playback_2
 	       }
 	       	capture_ports {
 	               0 alsa_pcm:capture_1
                	1 alsa_pcm:capture_2
        	}
	}
# this makes OSS apps use dmix
pcm.dsp0 {
    type plug
    slave.pcm "dmix"
}
# mixer0 can stay unchanged, because it isn't used anyway, I guess ;)
ctl.mixer0 {
    type hw
    card 0
}

# this makes native ALSA apps default to using dmix
pcm.!default {
    type plug
    slave.pcm "dmix"
}
or possibly some setting in ardour itself
in the mixer window thingy down at the bottom you have those buttons labled "output"
click on them and choose edit to see what's what
you can either output each individual track to alsa_pcm:playback_1 alsa_pcm:playback_2
or output each track to Ardour/master/in and run master to alsa_pcm:playback
(i think that's how it works anyway)
just play with it
it is possible to make some horrible feedback loops here i found out
my suspicion is just alsa not set up to do software mixing ?

edit to turn off those smily faces
 
Old 12-01-2004, 12:18 PM   #7
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
another thought
make sure you are not overdriving your soundcard with things turned up too loud
ardour mixer sliders as well as alsamixer settings
seems to be real easy to do with alsa drivers for some reason
and some effects plugins don't work and break up sound real bad in ardour
but i bet you haven't goten to them yet
 
Old 12-01-2004, 06:00 PM   #8
exitium
LQ Newbie
 
Registered: Nov 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Hi!

Thank you for your suggestions foo_bar_foo.

Did you mean with that .asoundrc a file that shoud be located at ~/.asoundrc ? I checked out my /usr/share/alsa//alsa.conf and it tries to load some configuration from

Code:
@hooks [
        {
                func load
                files [
                        "/etc/asound.conf"
                        "~/.asoundrc"
                ]
                errors false
        }
]
However Ardour will not connect with Jack now and prints out the following error message. Is this the problem that was mentioned somewhere about Jack unable to create realtime threads? I really don't know if the .asoundrc had anything to do with this since I think I saw this message allready yesterday...

Code:
ardour
Ardour/GTK 0.536.1 running with libardour 0.838.0
Copyright 1999-2004 Paul Davis
Ardour 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
Loading UI configuration file /usr/local/etc/ardour/ardour_ui.rc
Loading system configuration file /usr/local/etc/ardour/ardour_system.rc
Loading user configuration file /home/romu/.ardour/ardour.rc
ardour: [WARNING]: No MMC control (MIDI port "seq" not available)
ardour: [WARNING]: Your system generates "Mod2" when the NumLock key is pressed. This can cause problems when editing so Ardour will use Mod3 to mean Meta rather than Mod2
jack_create_thread: error -1 switching current thread to rt for inheritance: Unknown error 18446744073709551615
Loading session /home/romu/test using snapshot test
Segmentation fault
Oh. That segmentaton fault comes up when I try to play a wav file in Ardour...

Last edited by exitium; 12-01-2004 at 06:03 PM.
 
Old 12-01-2004, 10:13 PM   #9
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
yea ~/.asoundrc sorry for not being clear
(if things are running as root /root/.asoundrc)
i put it both places
try
arecord -L
if that reads out without complaint then alsa understands .asoundrc ok i think
the other issue i have never seen
it looks lke the kernel module is not loaded
/sbin/lsmod | grep real
should give you realcap and commoncap
have never tried to patch kernel for realtime so not alot of help
jack_create_thread: error -1
that's a jack error not arbour
try this for starting realcap before you start jack
http://ccrma.stanford.edu/planetccrm...init.d/realcap
then
/sbin/service realcap start
/sbin/service realcap stop

i tried reading about the planetccrma build for fedora core2 and they are having the same xrun troubles you were having with jack -R option so even very experienced people can't seem to get this to work yet
you can follow changelog here and try to install planetccrma packages using apt after they get it working
http://ccrma.stanford.edu/planetccrm...changelog.html
or i guess like you said try another distribution
appearently everything works great with fedora core 1
i personally would go with the debian or audioslack version
might also want to first try building the fastest smallest kernel you can (change the makefile otpimizations)
and trim out all the fat but leave out all the patches that don't seem to work then use sudo to safely get mlock and realtime access. But it is possible that only works for me because i have kernel compiled with intel compiler which is a huge performance gain ? i wonder ?

Last edited by foo_bar_foo; 12-01-2004 at 10:26 PM.
 
Old 12-02-2004, 02:41 AM   #10
exitium
LQ Newbie
 
Registered: Nov 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Hi and thanks again foo_bar_foo!

It seems that I have to work a bit more to get that .asoundrc working. At the end of this message is the output from arecord -L. It does not contain the changes you proposed so the configuration is not propably loading.

realcap is apparently an another way to patch the kernel realtime capable. I propably have to check that out too. I'm using the realtime-lsm-0.1.1 and grepping with lsmod tells:

Code:
/sbin/lsmod | grep real
realtime               13328  0
Actually the reason I haven't allready installed Fedora Core 1 and Planet CCRMA is that I would like to use 64bit distro with my 64bit computer. Currently Planet CCRMA is not supporting 86_64 distros. One possibility could be Debian AMD64 port once it's officially available. It's really strong candidate for me since I used to have Woody on my workplace laptop some time ago and still like setting up Linux servers with Debian. I don't know however is there going to be trouble considering that Debian packages are updated quite conservatively. Perhaps the unstable distro would be the choise for audio system?

I'll check out your proposals in more detail at the evening.

Best Regards:
Exitium


Code:
 arecord -L
PCM list:
hw {
        @args.0 CARD
        @args.1 DEV
        @args.2 SUBDEV
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars {
                                0 ALSA_PCM_CARD
                                1 ALSA_CARD
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.card'
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars {
                                0 ALSA_PCM_DEVICE
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.device'
                        }
                }
        }
        @args.SUBDEV {
                type integer
                default {
                        @func refer
                        name 'defaults.pcm.subdevice'
                }
        }
        type hw
        card $CARD
        device $DEV
        subdevice $SUBDEV
}
plughw {
        @args.0 CARD
        @args.1 DEV
        @args.2 SUBDEV
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars {
                                0 ALSA_PCM_CARD
                                1 ALSA_CARD
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.card'
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars {
                                0 ALSA_PCM_DEVICE
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.device'
                        }
                }
        }
        @args.SUBDEV {
                type integer
                default {
                        @func refer
                        name 'defaults.pcm.subdevice'
                }
        }
        type plug
        slave.pcm {
                type hw
                card $CARD
                device $DEV
                subdevice $SUBDEV
        }
}
plug {
        @args.0 SLAVE
        @args.SLAVE {
                type string
        }
        type plug
        slave.pcm $SLAVE
}
dmix {
        @args.0 SLAVE
        @args.1 FORMAT
        @args.2 RATE
        @args.SLAVE {
                type string
                default 'hw:0,0'
        }
        @args.FORMAT {
                type string
                default S16_LE
        }
        @args.RATE {
                type integer
                default 48000
        }
        type dmix
        ipc_key 5678293
        ipc_key_add_uid yes
        slave {
                pcm $SLAVE
                format $FORMAT
                rate $RATE
        }
}
dsnoop {
        @args.0 SLAVE
        @args.1 FORMAT
        @args.2 RATE
        @args.SLAVE {
                type string
                default 'hw:0,0'
        }
        @args.FORMAT {
                type string
                default S16_LE
        }
        @args.RATE {
                type integer
                default 48000
        }
        type dsnoop
        ipc_key 5778293
        ipc_key_add_uid yes
        slave {
                pcm $SLAVE
                format $FORMAT
                rate $RATE
        }
}
shm {
        @args.0 SOCKET
        @args.1 PCM
        @args.SOCKET {
                type string
        }
        @args.PCM {
                type string
        }
        type shm
        server $SOCKET
        pcm $PCM
}
tee {
        @args.0 SLAVE
        @args.1 FILE
        @args.2 FORMAT
        @args.SLAVE {
                type string
        }
        @args.FILE {
                type string
        }
        @args.FORMAT {
                type string
                default raw
        }
        type file
        slave.pcm $SLAVE
        file $FILE
        format $FORMAT
}
file {
        @args.0 FILE
        @args.1 FORMAT
        @args.FILE {
                type string
        }
        @args.FORMAT {
                type string
                default raw
        }
        type file
        slave.pcm null
        file $FILE
        format $FORMAT
}
null {
        type null
}
cards 'cards.pcm'
front 'cards.pcm.front'
rear 'cards.pcm.rear'
center_lfe 'cards.pcm.center_lfe'
surround40 'cards.pcm.surround40'
surround41 'cards.pcm.surround41'
surround50 'cards.pcm.surround50'
surround51 'cards.pcm.surround51'
iec958 'cards.pcm.iec958'
spdif 'cards.pcm.iec958'
jackplug {
        type plug
        slave {
                pcm jack
        }
}
jack {
        type jack
        playback_ports {
                0 alsa_pcm:playback_1
                1 alsa_pcm:playback_2
        }
        capture_ports {
                0 alsa_pcm:capture_1
                1 alsa_pcm:capture_2
        }
}
dsp0 {
        type plug
        slave.pcm dmix
}
default {
        type plug
        slave.pcm dmix
}
 
Old 12-08-2004, 04:44 PM   #11
exitium
LQ Newbie
 
Registered: Nov 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Hi!

Just solved my problem. 2 minutes ago!-) (I'll propably go out and throw
a party ;-)

My solution was to disable the onboard sound chipset and install SB
Audigy Platinum Ex to PCI slot 4 (only slot that does not share the IRQ
channel). I had the card standing unused on my another computer. Then I
just recompiled Jack and everything was working fine!

I suspect that the problem I had might been related to the fact that the
VIA82xxx sound card (onboard) did not have any latency setting when I
looked at it with lspci. Also I had Dlink WLan (ACX111) on my PCI4 slot
and now it is moved to the slot 2 sharing with Marvel Gigabit
controller.

Also I had to tweak modules.conf manually to load Audigy driver
(snd-emu10k1) at startup. Currently I'm loading snd-emu10k1-synth
manually. Should I add it to the modules.conf also? What should be the
alias for the driver? How do I get Alsa/Jack/another software to know
about the synth?

So. Only thing to resolve is how to get sound out of Rosegarden. Ardour
seems to work fine now.

Thank you all for your help!

Best Regards:
Exitium
 
Old 12-09-2004, 06:29 AM   #12
exitium
LQ Newbie
 
Registered: Nov 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Forgot to mention that I now run jackd with following command line.

Code:
/usr/local/bin/jackd -R -P17 -dalsa -dhw:0 -r44100 -p128 -n2
qjackctl reports 5.8ms latency on the setup page and I have no more XRuns. CPU usage with jackd and qjackctl running is about 0.8%

Best Regards:
Exitium
 
Old 12-09-2004, 06:40 AM   #13
Hano
Member
 
Registered: Sep 2001
Location: Venezuela, Caracas
Distribution: RedHat 9.0
Posts: 196

Rep: Reputation: 30
You can also get great help for linux audio on irc at irc.freenode.net, channel #lad.

Hope it helps
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Realtek AC97 Audio + Fedora Core 3 furtivefelon Linux - Laptop and Netbook 4 01-05-2006 12:06 PM
audio capture on Fedora Core 4 kilgor Linux - General 1 11-06-2005 06:55 AM
I can't get the jack audio library to work! ingar Linux - Newbie 0 01-08-2005 05:06 AM
Jack audio connection kit not working with kernel? linuxpyro Linux - Software 3 04-08-2004 07:04 PM
JACK audio connection kit storyteller Linux - Software 4 11-23-2003 01:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration