From: "Clemens Ladisch" <cladisch@fastmail.net>
To: "Iovescu, Magdalena" <m-iovescu1@ti.com>, alsa-devel@alsa-project.org
Subject: Re: Noisy audio - ALSA Configuration
Date: Thu, 16 Aug 2007 09:05:40 +0200 [thread overview]
Message-ID: <1187247940.16551.1205659251@webmail.messagingengine.com> (raw)
In-Reply-To: <28FEEE653F330C4FA01F6C799E7BBA5E01CDD7D7@dlee10.ent.ti.com>
Iovescu, Magdalena wrote:
> Does anyone have examples or documentation on how to configure periods,
> frames and buffers for various sample rates?
Frames don't need configuration; they are dependent on the sample format
only. In your case (S16_LE, 2 channels), one frame = four bytes.
The buffer size determines latency. Low latency is only important when
the audio data is generated from user input in real time; when you can
read (and decode) ahead, you should better use a rather large buffer to
reduce the possibility of underruns.
Periods aren't that important. A period is the interval between two
interrupts, so it might be better to have more small periods than fewer
large ones (unless the interrupt overhead gets too high) so that your
application can get woken up more often, but there isn't much difference
in practice.
> [...] With a buffer this big, I do not get underruns, but all the
> writes are short writes. I have not been able to find the right
> configuration to avoid short writes,
Short writes happen where there is less free space in the buffer than
you are trying to write. This is the normal case, there's nothing wrong
with that. Is there a reason why you want to avoid them?
Regards,
Clemens
next prev parent reply other threads:[~2007-08-16 7:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-15 21:03 Noisy audio - ALSA Configuration Iovescu, Magdalena
2007-08-16 7:05 ` Clemens Ladisch [this message]
2007-08-16 17:36 ` Iovescu, Magdalena
[not found] <BAY133-F32D7F625C6B67D236D68CEC3DD0@phx.gbl>
2007-08-15 22:01 ` Eliot Blennerhassett
-- strict thread matches above, loose matches on Subject: below --
2007-08-15 23:27 Iovescu, Magdalena
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1187247940.16551.1205659251@webmail.messagingengine.com \
--to=cladisch@fastmail.net \
--cc=alsa-devel@alsa-project.org \
--cc=m-iovescu1@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.