Hi,

> > Usually this works. Unfortunately if the input thread is in the
> > middle of actually writing to the buffer then things can go pear
> > shaped, because the sample buffer itself is freed earlier, by
> > audio_pcm_hw_gc_in():
> >
> >         glue (s->nb_hw_voices_, TYPE) += 1;
> >         glue (audio_pcm_hw_free_resources_ ,TYPE) (hw);
> >         glue (hw->pcm_ops->fini_, TYPE) (hw);
> >
> > So we end up freeing hw resources (like the conv_buf) before we
> > give the pulseaudio backend a chance to actually shut down its
> > helper thread.
> >
> > Does anybody know how this is supposed to work? Is the fix as
> > simple as just moving the free_resources call below the fini?

I suspect the code simply wasn't written with threads in mind and the
fix actually is that simple ...

The submitted patch looks fine to me.  Do you just commit it yourself?
I don't have any other audio stuff pending atm.

cheers,
  Gerd



Reply via email to