pcm buffer size
Hi!
I'm using alsa 1.0.4. How can I get a larger alsa buffer size? The maximum size returned by snd_pcm_hw_params_get_buffer_size_max is too small. I found no module option and nothing apropriate within the driver code. Mainly I'm using the snd-usb-audio module but others are also of interest.
best regards
Nicolas Hueppelshaeuser
--
nicolas hueppelshaeuser, emlix gmbh, http://www.emlix.com,
mailto:[email protected]
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Quoted 11 lines · Nicolas Hüppelshäuser
Hi!
I'm using alsa 1.0.4. How can I get a larger alsa buffer size? The maximum size returned by
snd_pcm_hw_params_get_buffer_size_maxis too small. I found no module option and nothing apropriate within the driver code. Mainly I'm using the snd-usb-audio module but others are also of interest.best regards
Nicolas Hueppelshaeuser
--
You cannot. the value returned by snd_pcm_hw_params_get_buffer_size_max() is based on the hardware limitations. If you need more buffer space, buffer up the data in your application.
Cheers
James
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Quoted 1 line · Nicolas Hüppelshäuser
I'm using alsa 1.0.4. How can I get a larger alsa buffer size?
PCM devices have a default maximum buffer size and a maximum maxmimum buffer size. For example, in the snd-usb-audio driver, it's 64 KB and 128 KB.
The current value (in KB) can be seen in the file /proc/asound/cardX/pcmXY/subX/prealloc. You can change it with
echo 128 > /proc/asound/card0/pcm0p/sub0/prealloc
In most cases, the maxmimum buffer size is constrained by hardware limitations, but in the case of snd-usb-audio, it should be safe to raise this value (look for the call to snd_pcm_lib_preallocate_pages() in usbaudio.c).
HTH
Clemens
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id�66&op=click