From: Eliot Blennerhassett <linux@audioscience.com>
To: alsa-devel@alsa-project.org
Cc: Magdalena Iovescu <magdab@hotmail.com>
Subject: Re: Noisy audio - ALSA Configuration
Date: Thu, 16 Aug 2007 10:01:17 +1200 [thread overview]
Message-ID: <200708161001.17944.linux@audioscience.com> (raw)
In-Reply-To: <BAY133-F32D7F625C6B67D236D68CEC3DD0@phx.gbl>
> Eliot,
> Thank you very much. Here is the message. If Hotmail is the problem I can
> subscribe using my work e-mail; I wanted to avoid that in the first place.
> Magdalena
The Hotmail message is all HTML, with no plaintext version. I'm not sure if
this list accpets html mails. OR The text of the mail is all encapsulated in
a number of HTML <DIV> blocks, maybe confused html to text converter...
Here is the original question:
> Does anyone have examples or documentation on how to configure periods,
> frames and buffers for various sample rates? I am writing a program to
> route a mp3 decoder output to ALSA on an ARM processor, and I get noisy
> audio. For a CD quality stream (S16_LE, 44100 kHz, Stereo, 128 bps) I am
> using an output buffer of 44100 bytes, a period of 44100/(channels*2). With
Be careful about the distinction between bytes and frames (i.e. a frame of
stereo S16 is 4 bytes)
Start with the period
1024 frames = 4096 bytes
then make your buffer at least 2x this:
8192 bytes
(I'm not an app developer, so others may jump in with a better explanation)
Did you look at the code in alsa-lib/test?
> a buffer this big, I do not get underruns, but I do get all short writes. I
> have not been able to find the right configuration to avoid short writes,
> and more importantly, to get good quality audio. What do 'short writes' (I
> am using writei) really mean? Is this a performance issue in the driver, or
> is mainly because of buffer setup? I would really appreciate any help with
> this.
> Magdalena
next parent reply other threads:[~2007-08-15 21:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BAY133-F32D7F625C6B67D236D68CEC3DD0@phx.gbl>
2007-08-15 22:01 ` Eliot Blennerhassett [this message]
2007-08-15 23:27 Noisy audio - ALSA Configuration Iovescu, Magdalena
-- strict thread matches above, loose matches on Subject: below --
2007-08-15 21:03 Iovescu, Magdalena
2007-08-16 7:05 ` Clemens Ladisch
2007-08-16 17:36 ` 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=200708161001.17944.linux@audioscience.com \
--to=linux@audioscience.com \
--cc=alsa-devel@alsa-project.org \
--cc=magdab@hotmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox