Re: Hang in snd_pcm_writei with alsa-pulse plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/11/2 Matthew Gregan <kinetik@xxxxxxxx>

> At 2010-11-02T10:43:54+0800, Raymond Yau wrote:
> > No much response because there are bugs in atest2.c
> >
> >   /* prefill sound buffers and begin playback */
> >   fill(pcm);
> >
> >   while (++count) {
> >
> > The program had filled the buffer but the output does not indicate those
> > write
>
> This doesn't affect the result of the testcase.  count is only used to
> pause
> and resume less frequently than every iteration of the write loop.
>
> > I can confirm that the program seem hang after a few pause/unpause when
> > using alsa-pulse plugin
> >
> > However it assert when using hw device
> >
> >   assert(bsize / psize >= 4);
>
> The assert is present because I've only tested on systems where this
> assertion holds true.  It's likely that the loop timing would need to be
> changed to work correctly in other cases.
>
> Thanks for confirming that you can reproduce the problem.  I've since
> discovered that it's possible to produce the same problem with the
> PulseAudio API directly, so I'll take this up on pulseaudio-discuss@.
>
> Cheers,
> -mjg
>

The interesting thing is it did not hang when I increase the sleep time to
one period


    /* sleep for half a period */
+    usleep(psize * 1000000 / RATE );
-    usleep(psize * 1000000 / RATE /2 );
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux