All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <james.dutton@gmail.com>
To: Ron Cococcia <ron.cococcia@request.com>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: prealloc/buffer time limit?
Date: Mon, 13 Feb 2006 18:16:19 +0000	[thread overview]
Message-ID: <ad2655cb0602131016t12db33dh@mail.gmail.com> (raw)
In-Reply-To: <43ED016D.9030301@request.com>

On 10/02/06, Ron Cococcia <ron.cococcia@request.com> wrote:
> 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
>

You are most likely running up against the hardware limitations of the
sound card.
If the hardware DMA pointer is only X bits long, it won't matter how
big you make the buffer, the sound card will not be able to use it.

James


-------------------------------------------------------
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\x103432&bid#0486&dat\x121642

      parent reply	other threads:[~2006-02-13 18:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-10 21:11 prealloc/buffer time limit? Ron Cococcia
2006-02-13  8:06 ` 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 [this message]

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=ad2655cb0602131016t12db33dh@mail.gmail.com \
    --to=james.dutton@gmail.com \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=ron.cococcia@request.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.