* Q: Periodsize for capture, SBLive
@ 2004-10-18 13:36 Asbjørn Sæbø
2004-10-18 13:42 ` Paul Davis
0 siblings, 1 reply; 10+ messages in thread
From: Asbjørn Sæbø @ 2004-10-18 13:36 UTC (permalink / raw)
To: alsa-devel
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ø
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: Periodsize for capture, SBLive
2004-10-18 13:36 Asbjørn Sæbø
@ 2004-10-18 13:42 ` Paul Davis
2004-10-18 14:22 ` Unknown
0 siblings, 1 reply; 10+ messages in thread
From: Paul Davis @ 2004-10-18 13:42 UTC (permalink / raw)
To: Asbj rn S b; +Cc: alsa-devel
>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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: Periodsize for capture, SBLive
2004-10-18 13:42 ` Paul Davis
@ 2004-10-18 14:22 ` Unknown
2004-10-18 19:52 ` Glenn Maynard
0 siblings, 1 reply; 10+ messages in thread
From: Unknown @ 2004-10-18 14:22 UTC (permalink / raw)
To: Paul Davis
On Mon, Oct 18, 2004 at 09:42:11AM -0400, Paul Davis wrote:
> >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?
> 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
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: Periodsize for capture, SBLive
2004-10-18 14:22 ` Unknown
@ 2004-10-18 19:52 ` Glenn Maynard
0 siblings, 0 replies; 10+ messages in thread
From: Glenn Maynard @ 2004-10-18 19:52 UTC (permalink / raw)
To: alsa-devel
On Mon, Oct 18, 2004 at 04:22:29PM +0200, alsa-devel-admin@lists.sourceforge.net wrote:
> On Mon, Oct 18, 2004 at 09:42:11AM -0400, Paul Davis wrote:
> > >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.
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: Periodsize for capture, SBLive
@ 2004-10-19 8:07 Peter Zubaj
2004-10-19 8:19 ` Asbjørn Sæbø
0 siblings, 1 reply; 10+ messages in thread
From: Peter Zubaj @ 2004-10-19 8:07 UTC (permalink / raw)
To: asbjs; +Cc: alsa-devel
> OK. Any idea why I get 384?
I think hardware can't do less. If you need less latency use hw:0,2
and set more channel count (1, 2, 4, 8, 16, 32)
Peter Zubaj
____________________________________
http://www.pobox.sk/ - spolahliva a bezpecna prevadzka
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: Periodsize for capture, SBLive
2004-10-19 8:07 Q: Periodsize for capture, SBLive Peter Zubaj
@ 2004-10-19 8:19 ` Asbjørn Sæbø
2004-10-19 20:28 ` Lee Revell
0 siblings, 1 reply; 10+ messages in thread
From: Asbjørn Sæbø @ 2004-10-19 8:19 UTC (permalink / raw)
To: Peter Zubaj; +Cc: alsa-devel
On Tue, Oct 19, 2004 at 10:07:23AM +0200, Peter Zubaj wrote:
> > OK. Any idea why I get 384?
> I think hardware can't do less. If you need less latency use hw:0,2
> and set more channel count (1, 2, 4, 8, 16, 32)
Thanks for your advice. I do however not think I understand this fully.
Why will increasing the channel count give lower latency?
Asbj.S.
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: Periodsize for capture, SBLive
2004-10-19 8:19 ` Asbjørn Sæbø
@ 2004-10-19 20:28 ` Lee Revell
2004-10-20 7:15 ` Asbjørn Sæbø
0 siblings, 1 reply; 10+ messages in thread
From: Lee Revell @ 2004-10-19 20:28 UTC (permalink / raw)
To: Asbjørn Sæbø; +Cc: Peter Zubaj, alsa-devel
On Tue, 2004-10-19 at 04:19, Asbjørn Sæbø wrote:
> On Tue, Oct 19, 2004 at 10:07:23AM +0200, Peter Zubaj wrote:
> > > OK. Any idea why I get 384?
> > I think hardware can't do less. If you need less latency use hw:0,2
> > and set more channel count (1, 2, 4, 8, 16, 32)
>
> Thanks for your advice. I do however not think I understand this fully.
> Why will increasing the channel count give lower latency?
>
http://sourceforge.net/mailarchive/message.php?msg_id=9514175
Lee
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: Periodsize for capture, SBLive
2004-10-19 20:28 ` Lee Revell
@ 2004-10-20 7:15 ` Asbjørn Sæbø
2004-10-20 7:57 ` Lee Revell
0 siblings, 1 reply; 10+ messages in thread
From: Asbjørn Sæbø @ 2004-10-20 7:15 UTC (permalink / raw)
To: Lee Revell; +Cc: Peter Zubaj, alsa-devel
On Tue, Oct 19, 2004 at 04:28:08PM -0400, Lee Revell wrote:
> On Tue, 2004-10-19 at 04:19, Asbjørn Sæbø wrote:
> [...]
> > Why will increasing the channel count give lower latency?
>
> http://sourceforge.net/mailarchive/message.php?msg_id=9514175
Thanks! That made things at least a bit clearer. "Still confused, but
on a higher level", as it has been said.
When the post says that the EMU10k1 can record 16 channels, is that for
digital sources only? (I am using the analog inputs.) I have been of the
impression that the SBLive was an 5.1 card.
And what is the EFX device? What inputs does it correspond to?
Asbjørn Sæbø
--
Asbjørn Sæbø, post.doc.
Q2S, NTNU
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: Periodsize for capture, SBLive
2004-10-20 7:15 ` Asbjørn Sæbø
@ 2004-10-20 7:57 ` Lee Revell
2004-10-20 8:42 ` Asbjørn Sæbø
0 siblings, 1 reply; 10+ messages in thread
From: Lee Revell @ 2004-10-20 7:57 UTC (permalink / raw)
To: Asbjørn Sæbø; +Cc: Peter Zubaj, alsa-devel
On Wed, 2004-10-20 at 03:15, Asbjørn Sæbø wrote:
> On Tue, Oct 19, 2004 at 04:28:08PM -0400, Lee Revell wrote:
> > On Tue, 2004-10-19 at 04:19, Asbjørn Sæbø wrote:
>
> > [...]
> > > Why will increasing the channel count give lower latency?
> >
> > http://sourceforge.net/mailarchive/message.php?msg_id=9514175
>
>
> Thanks! That made things at least a bit clearer. "Still confused, but
> on a higher level", as it has been said.
>
> When the post says that the EMU10k1 can record 16 channels, is that for
> digital sources only? (I am using the analog inputs.) I have been of the
> impression that the SBLive was an 5.1 card.
>
> And what is the EFX device? What inputs does it correspond to?
The emu10k1 contains a DSP called the FX8010. On the emu10k1 this has
16 hardware effects buses, on the emu10k2 has 64. The FX8010 also has
32/64 (emu10k1/10k2) inputs and outputs. Some (not all) of these map to
physical inputs and outputs. The EFX device captures these outputs.
Each PCM stream has an FX bus routing associated with it. You would use
DSP code to connect the FX buses to outputs, then you can record these
outputs via the EFX device, whether or not they correspond to physical
outputs.
The userspace code to support all this is not quite there yet but it is
close.
Lee
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: Periodsize for capture, SBLive
2004-10-20 7:57 ` Lee Revell
@ 2004-10-20 8:42 ` Asbjørn Sæbø
0 siblings, 0 replies; 10+ messages in thread
From: Asbjørn Sæbø @ 2004-10-20 8:42 UTC (permalink / raw)
To: Lee Revell; +Cc: Peter Zubaj, alsa-devel
On Wed, Oct 20, 2004 at 03:57:37AM -0400, Lee Revell wrote:
> [...]
> The emu10k1 contains a DSP called the FX8010. [...]
Thanks again!
Asbjørn
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-10-20 8:42 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-19 8:07 Q: Periodsize for capture, SBLive Peter Zubaj
2004-10-19 8:19 ` Asbjørn Sæbø
2004-10-19 20:28 ` Lee Revell
2004-10-20 7:15 ` Asbjørn Sæbø
2004-10-20 7:57 ` Lee Revell
2004-10-20 8:42 ` Asbjørn Sæbø
-- strict thread matches above, loose matches on Subject: below --
2004-10-18 13:36 Asbjørn Sæbø
2004-10-18 13:42 ` Paul Davis
2004-10-18 14:22 ` Unknown
2004-10-18 19:52 ` Glenn Maynard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.