[LAD] interrupt-drive ALSA returning buffers too small
Clemens Ladisch
clemens at ladisch.de
Thu Sep 9 07:31:42 UTC 2010
Gabriel M. Beddingfield wrote:
> I've set alsa to wake me up every N frames.
Setting the period size makes this possible. The avail_min parameter
only prevents waveups when less than N frames are available.
> However, when I awake, I find that I often have fewer than N frames
> available:
>
> snd_pcm_sw_params_set_avail_min (playback_handle, sw_params, N)
>
> err = snd_pcm_wait(playback_handle, 1000);
> frames_to_deliver = snd_pcm_avail_update(playback_handle);
> assert(frames_to_deliver >= N);
In theory, this should work. Which PCM plugin (device name) are you
using?
Regards,
Clemens
More information about the Linux-audio-dev
mailing list