From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ron Cococcia Subject: prealloc/buffer time limit? Date: Fri, 10 Feb 2006 16:11:09 -0500 Message-ID: <43ED016D.9030301@request.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org 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