[alsa-devel] [PATCH] alsa-lib: snd_pcm_delay and friends do not account for a write being currently in progress

John Lindgren john.lindgren at tds.net
Thu Jun 3 20:08:17 CEST 2010

On Thu, 2010-06-03 at 10:40 -0700, VDR User wrote:
> On Wed, Jun 2, 2010 at 2:29 PM, John Lindgren <john.lindgren at tds.net> wrote:
> > In a multi-threaded application it is possible for snd_pcm_delay or an
> > equivalent function to be called by one thread while another is sitting
> > in snd_pcm_writei.  In this case, snd_pcm_delay does not take into
> > account that there may not be enough space for all the data passed to
> > snd_pcm_writei to be written to the ring buffer at once, and will return
> > incorrect values.
> Hi.  I've been getting "pcm_hw.c: snd_pcm_hw_delay()
> SNDRV_PCM_IOCTL_DELAY failed." in my xine log and after some talks
> with one of the devs, he suggested that alsa was not getting data fast
> enough in some cases (iirc).  Could you please email me a copy of your
> patch (so I don't have to hand-patch) to try?  Hopefully it will fix
> this damn problem once and for all.

I don't think my patch has anything to do with that problem, but I
suppose you can try it.

John Lindgren
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alsa-timing.diff
Type: text/x-patch
Size: 7251 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20100603/b7a35ece/attachment.diff 

More information about the Alsa-devel mailing list