From: Esben S. <b0...@es...> - 2005-03-31 13:58:45
|
Julian Rendell <wan...@gm...> writes: > what are the RT patches? These are the patches from ingo-molnar to support posix 1.e for realtime capabilites. The patches are located at http://people.redhat.com/mingo/realtime-preempt/ > Which version of Alsa Recently, since the last CVS of asterisk, I've not been able to use alsa, but I've always used alsa before that. I use the kernel modules that comes with the kernel. To have my applications interface to that capability, I have four components: the libraries, the utilities, the tools and the OSS compatibility libraries: alsa-lib-1.0.4 alsa-oss-1.0.4 alsa-tools-1.0.4 alsa-utils-1.0.4 I guess I should install the 1.0.8 libraries tonight so that we can compare. You mentioned you ran 1.0.8?. I'll also compile linux-2.6.12-rc1 without the realtime patch just to check. I'll also grab CVS of asterisk to see if I can get my asterisk alsa output back. > I'm still convinced it's something to do with iaxclient's audio playback. I really should set up another computer on my lan with iaxcomm and asterisk to do some extensive testing. > echo test number at my voip provider Have you tried dialing the echo test application from the asterisk cli?. I mean the echo application in asterisk. I get a resonable delay here just calling myself. > even duplex record/play One way to test this is to use ecasound: multitrack recording (record first track) #ecasound -a:1 -i:alsahw,0,0 -o:firsttrack.wav (record track2 while track1 is playing) ecasound -a:1 -i:firsttrack.wav -a:2 -i:alsahw,0,0 -o:secondtrack.wav -a:1 -o:alsahw,0,0 > I've got the low-latency options on in my kernel, and pre-emt too. So you got the linux-2.4 series then. You should give linux-2.6 a try just to confirm. > I've set the Port_audio environment variables I have not played with these. I've seen them, but never tried them. What ENV variable did you give it?. > I've tweaked the buffer size in iaxclient. I've not done this either, but should probably check it out. > seems to be causing a buffer underrun no matter what I deal alot with realtime audio (though using jack), but the following tricks I don't think will help in your case since it's most likely not a problem with hardware. Set the spu at a reasonable IRQ, like IRQ9. Remember the order of interrupt priority on x86 computers: 0 1 8 9 10 11 12 13 14 15 3 4 5 6 7 Remember to enable DMA for your hd's using hdparm. # open PCI bus by allowing fairly long bursts for all devices, # increasing performance setpci -v -s "*:*.*" latency_timer=b0 # maximise latency for spu, thus allowing # more data per PCI transfer and minimizing xruns # use your own device here, of course setpci -v -s 00:0a.0 latency_timer=ff #issue max_sectors transfer for hd's echo 16 > /sys/block/hda/queue/max_sectors_kb echo 16 > /sys/block/hdb/queue/max_sectors_kb echo 16 > /sys/block/hdc/queue/max_sectors_kb echo 16 > /sys/block/hdd/queue/max_sectors_kb Let's just hope that portaudio, which iaxclient uses, soon support realtime audio with jack, http://jackit.sf.net > is there any way I can monitor audio buffer underruns? There is a alsa debug option in the kernel which will write xruns to your syslog. Jack also reports xruns, but not valid in this case. Also remember that it's impossible to report xruns that occur at the hardware dma level. You should also check out the realtime patches since realtime is what we need with voip. Please trim your post when replying and don't toppost;) -- Esben Stien is b0...@es... http://www.esben-stien.name irc://irc.esben-stien.name/%23contact [sip|iax]:esben-stien.name |