[alsa-devel] Unable to set ALSA buffer size

Irfan Shaikh irfan.shaikh at sasken.com
Fri Dec 10 12:03:52 CET 2010

Hello All,

             I am trying to set my alsa buffer size as 1024*8. But my playback device is not able to set to requested ALSA buffer size.

  snd_pcm_hw_params_set_periods(handle, params, 8, 0);
  snd_pcm_hw_params_set_period_size(handle, params, 1024, 0);
  snd_pcm_uframes_t frames1;
  retVal=snd_pcm_hw_params_set_buffer_size_near(handle, params, &frames1);

                         (snd_pcm_uframes_t *) &val);

/*Expected Output*/
==============>>>>>>>  buffer size = 8192 frames

==============>>>>>>>  buffer size = 1325 frames

           Return value for above APIs is coming as zero. but still i am unable to get expected result. Is there any other forcible way to do the above.


SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary or legally privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email.
Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html

More information about the Alsa-devel mailing list