Re: [LAD] interrupt-drive ALSA returning buffers too small

From: Gabriel Beddingfield <gabrbedd@email-addr-hidden>
Date: Wed Sep 08 2010 - 23:44:17 EEST

Hello,

On Wed, Sep 8, 2010 at 9:18 AM, Gabriel M. Beddingfield
<gabrbedd@email-addr-hidden> wrote:
>
> I've set alsa to wake me up every N frames.  However, when I awake, I find
> that I often have fewer than N frames available:
[snip]
>
>  snd_pcm_sw_params_set_avail_min (playback_handle, sw_params, N)
>
>  /* ... */
>  while(1) {
>     err = snd_pcm_wait(playback_handle, 1000);
>     assert(err >= 0); /* OK */
>
>     frames_to_deliver = snd_pcm_avail_update(playback_handle);
>     assert(frames_to_deliver >= 0); /* OK */
>
>     /* this fails about every other cycle: */
>     assert(frames_to_deliver >= N);
>
>  }

FYI, I compiled Paul's example code and it did the same thing.

Is this a limitation of this method? Should I switch to the "polling" API?

...or perhaps switch to clalsadrv? :-)

Thanks in advance,
Gabriel
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Thu Sep 9 00:15:05 2010

This archive was generated by hypermail 2.1.8 : Thu Sep 09 2010 - 00:15:05 EEST