Re: alsa buffer size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have successfully increased the amount of buffer by writing a new value into
/proc/asound/cardX/pcm*/sub*/prealloc.

For a mono .wav file I was able to successfully change this from 64 to
512.  I was really happy with this.  I presume this value is in the
units of kBytes?  And that this value needs to be 2 to the n. ie
16,32,64 etc?  Dont know why but I couldn't change this to > 512, do
you?

I also tried this change on a stereo .wav file but it didnt scale as I
thought.  In fact I could only set this to 32!  Which doesnt make
sense.  Do you know why?

On 8/30/07, paul blakeley <pblakeley@xxxxxxxxx> wrote:
> Thanks for replying.
>
> I am writing an application that is generic enough to a number of
> different drivers.  If thats possible!  I am trying to achieve a 2
> second of buffer for a number of different sample rates.  This means
> that for a sample rate of 44.1KHz I require a buffer size of 88.2K
> frames!!!!  For all the different types of sound cards that I have
> used I havent seen a buffer size > 16K frames : (
>
> I have noticed that various drivers have certain behaviour which makes
> writing a application that is generic for all drivers very difficult.
> For example for an intel chipset I have found that the driver was very
> versatile and allowed me to choose various period sizes for different
> buffer sizes.  Whilst the driver for the CS4299 chipset, although
> allows a buffer size of upto 16K the period size has to be half that
> value.  Therefore this makes it impossible for me to use with the ALSA
> callback mechanism, which I need to use for the design to work!
>
> By the way how do I find out which driver is assigned to a chipset? I
> understand that I can use 'lsmod'.  Can a driver be used on multiple
> chipsets?  You will have to excuse my knowledge on this : )
>
> On 8/29/07, Clemens Ladisch <cladisch@xxxxxxxxxxxxxx> wrote:
> > paul blakeley wrote:
> > > Is it possible to increase the buffer size of a ALSA driver?
> >
> > Yes. No. Er, maybe.
> >
> > Each driver has a certain limit for the buffer size.  The ALSA framework
> > preallocates memory for the buffer, but usually only half the limit.
> > You can increase the amount by writing a new value into
> > /proc/asound/cardX/pcm*/sub*/prealloc.
> >
> > The limit is sometimes just an arbitrary value invented by the driver
> > writer, but in many cases a hard limit of the hardware.
> >
> > What driver are you using?
> >
> >
> > Regards,
> > Clemens
> >
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux