Q: Periodsize for capture, SBLive
As part of a research project I am writing some software for low latency transmission of audio samples over the network. For the audio part of this I am using ALSA. (Development takes place on a Dell box running Debian Sarge Linux.)
I open the sound card (a SoundBlaster Live) for capture, and request a period size (using set_period_size_near()) of 8 frames, but what I get is a period size of 384 frames.
At 44100 Hz, 384 frames corresponds to a delay of at least 8.7ms, and I would like to do quite a bit better. (And better should also be possible. As far as I know ALSA, latencies down to a couple of milliseconds should be possible.)
Is this large period size given by the sound card, and therefore unavoidable, or can the card give lower period sizes than 384?
If the card can do better, what can I do, programming wise, to achieve better performance?
(For now, my program is quite simple, it opens the sound card (snd_pcm_open()), sets hardware parameters to 2 channels, 44100hz, access to SND_PCM_ACCESS_RW_INTERLEAVED and format to SND_PCM_FORMAT_S16_LE. It then reads samples from the card using snd_pcm_readi().)
Asbjørn Sæbø
Signature · 11 lines
Asbjørn Sæbø, post.doc. Centre for Quantifiable Quality of Service in Communication Systems Norweigan University of Science and Technology http://www.q2s.ntnu.no ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl
Quoted 3 lines
I open the sound card (a SoundBlaster Live) for capture, and=20 request a period size (using
set_period_size_near()) of 8 frames, but what I get is a period size of 384 frames. =20
the SBlive can't go below 64 at best. 8 is about the minimum anyone has ever used with any device, and that requires a fully patched 2.6 kernel with ingo's latest patches. very few devices can accept that
setting: 64 is the typical minimum.
--p
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
Quoted 5 lines · Paul Davis
Quoted 3 lines
I open the sound card (a SoundBlaster Live) for capture, and request a period size (using
set_period_size_near()) of 8 frames, but what I get is a period size of 384 frames.the SBlive can't go below 64 at best.
OK. Any idea why I get 384?
Quoted 2 lines
8 is about the minimum anyone has ever used with any device, and that requires a fully patched 2.6 kernel with ingo's latest patches.
That touches on another thing I have been wondering about. How is the status of 2.6 with respect to latency? (I have googled, and searched the archives, without finding any definitive answer. Most of what I have found relates to 2.4.)
* Is it preferable to patch a 2.6 kernel to achieve low latency?
* Are these the patches you are talking about:
http://people.redhat.com/mingo/voluntary-preempt/ ?
(All I have found before have been 2.4-stuff, like e.g. http://people.redhat.com/mingo/lowlatency-patches/.)
* If you (or others) could give a recommandation for a good card for low latency work, that would also be appreciated.
Thanks for your help!
Asbjørn - ALSA newbie, but learning
Signature · 13 lines
Asbjørn Sæbø, post.doc. Centre for Quantifiable Quality of Service in Communication Systems Norwegian university of Science and Technology http://www.q2s.ntnu.no ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl
Quoted 8 lines · On Mon, Oct 18, 2004 at 04:22:29PM +0200…
Quoted 5 lines · Paul Davis
Quoted 3 lines
I open the sound card (a SoundBlaster Live) for capture, and request a period size (using
set_period_size_near()) of 8 frames, but what I get is a period size of 384 frames.the SBlive can't go below 64 at best.
OK. Any idea why I get 384?
This message appears to be missing a From: header. (That's strange, since most MUAs will forcibly add one. You might want to check your mailer.
Signature · 8 lines
Glenn Maynard ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl