[Cs-dev] linux latency and alsa module issues
Date | 2005-11-19 21:25 |
From | Iain Duncan |
Subject | [Cs-dev] linux latency and alsa module issues |
Thanks for the pointers Istvan, I edited rtalsa.c to remove the limits on -b and -B ( only on my system, not the CVS! ). I am able to get realtime audio working as low as -b4 -B16 though it is iffy, -b8 -B32 seems rock solid. My kernel and IRQ setup is not as aggressively tuned as it could be though, I only ran the one patch, so I suspect that -b4 -B16 is doable with better IRQ sharing and the latest patch. ( it just barely cracks out once in a while ). As to the printout issue, it appears that the messages from Istvan's alsa module get printed only if -m1 or greater ( with the correct results ). At the same time, the incorrect messages from somewhere else also get printed ( showing whatever was typed in not what is being used ) and these get printed even at -m0. Considering that anything above -m0 doesn't work for low latency real time output, this is quite misleading. Below is the output before eliminating limits at the two different settings ( called with -b2 -B4 for examples sake ). ( at -m1 ) orch now loaded audio buffered in 1 sample-frame blocks ALSA output: total buffer size: 64, period size: 16 writing 4-byte blks of shorts to da ( at -m0 ) orch now loaded audio buffered in 1 sample-frame blocks writing 4-byte blks of shorts to dac It's a minor issue, but sure caused me some confusion. I would also like to know how does one calculate the total latency in samples from the above? For real time fx processing I would like to know the minimum delay I can get, as anything above 4-5 ms becomes quite noticeable under certain circumstances. Thanks Iain ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-11-19 21:36 |
From | Istvan Varga |
Subject | Re: [Cs-dev] linux latency and alsa module issues |
Iain Duncan wrote: > realtime audio working as low as -b4 -B16 though it is iffy, -b8 -B32 > seems rock solid. My kernel and IRQ setup is not as aggressively tuned Note that the limits are now changed to -b8 -B16, but maybe I will remove that. There are other checks elsewhere, though, that ensure that the buffer sizes are non-zero, and that -B is greater than and an integer multiple of -b. > It's a minor issue, but sure caused me some confusion. I would also like > to know how does one calculate the total latency in samples from the > above? For real time fx processing I would like to know the minimum > delay I can get, as anything above 4-5 ms becomes quite noticeable under > certain circumstances. Theoretically it is something like -B / sr, but you can only know for sure with actual tests. ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-11-19 21:52 |
From | Iain Duncan |
Subject | Re: [Cs-dev] linux latency correction |
> Note that the limits are now changed to -b8 -B16, but maybe I will > remove that. There are other checks elsewhere, though, that ensure > that the buffer sizes are non-zero, and that -B is greater than and > an integer multiple of -b. oops, I'm an idiot. I forgot --sched. with --sched I can do -b4 -B16 with no crack up! > Theoretically it is something like -B / sr, but you can only > know for sure with actual tests. I am interested in this. How would one test it? I can see how one could test round trip latency, which I intend to do later, but what about just synthesis? At anyrate, that gives a theoretical latency of .36 milliseconds! Thanks Iain ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |