All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ron Cococcia <ron.cococcia@request.com>
To: alsa-devel@lists.sourceforge.net
Subject: prealloc/buffer time limit?
Date: Fri, 10 Feb 2006 16:11:09 -0500	[thread overview]
Message-ID: <43ED016D.9030301@request.com> (raw)

Hello,

Recently I've been playing around with buffering in ALSA to reduce the 
number of underruns I observe when playing audio under heavy system 
load.  The playback device has 64k allocated by default, and I upped it 
to 128k (echo 128 > /proc/asound/card0/pcm0p/sub0/prealloc).  I observed 
a significant reduction in underruns with this change.  The buffer time 
went from 371519 to 743038 (using snd_pcm_hw_params_set_buffer_time_near 
to 5000000 (not .5 sec, but 5 sec)).  I am assuming that the value is 
updated to give the actual available buffer time after snd_pcm_hw_params 
has complete (please inform me if I am wrong!!).

I then tried to up it to 256, and it didn't work (prealloc remained at 
128).  I went into the driver for the sound device (intel8x0), and 
noticed the buffer_max being set to 128.  I modified the max values to 
512k (overkill, but I want to experiment a little), recompiled, 
installed, etc.

When I tried to increase it to 256, prealloc reports 256 successfully 
(same for 512).  The buffer time did not increase, however.  I am 
looking to be able to increase the buffer time a little further.  I have 
been poking through code (at a snail's pace unfortunately) to see if I 
can find some other place where this value is limited (driver, lib, 
etc).  Either prealloc reports the value and doesn't actually have a 
larger buffer, or some other buffer time limit is in place that I 
haven't been able to find yet.

Is there some other place I can check to increase the buffer time (in 
particular, if I increase the prealloc size).

TIA,
Ron


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

             reply	other threads:[~2006-02-10 21:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-10 21:11 Ron Cococcia [this message]
2006-02-13  8:06 ` prealloc/buffer time limit? Clemens Ladisch
2006-02-13 15:07   ` Ron Cococcia
2006-02-13 15:52     ` Clemens Ladisch
2006-02-13 19:08       ` Ron Cococcia
2006-02-14  8:13         ` Clemens Ladisch
2006-02-13 18:16 ` James Courtier-Dutton

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=43ED016D.9030301@request.com \
    --to=ron.cococcia@request.com \
    --cc=alsa-devel@lists.sourceforge.net \
    /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.