On Sun, 28 Feb 2010, John Lindgren wrote: > Hi, > > A couple of weeks ago I reported a rather serious bug #4914 that can > cause a multi-threaded using ALSA to lock up so that it can only be > ended with SIGKILL. > > I maintain the ALSA output part of Audacious, and I need to be able to > play audio in one thread of the program and then signal that thread to > stop from another. The way to do this in ALSA, if I understand > correctly, is to interrupt the thread that is sending audio with a call > to snd_pcm_drop. But using DMix makes the first thread hang up in a > snd_pcm_wait call with a timeout of -1. > > Is anyone working on this bug? Is there any more help I can provide? Could you try this patch? diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c index d9e596e..8c7ca06 100644 --- a/src/pcm/pcm_direct.c +++ b/src/pcm/pcm_direct.c @@ -1274,6 +1274,7 @@ int snd_pcm_direct_set_timer_params(snd_pcm_direct_t *dmix) snd_timer_params_set_ticks(params, 1); if (dmix->tread) { filter = (1<<SND_TIMER_EVENT_TICK) | + (1<<SND_TIMER_EVENT_STOP) | dmix->timer_event_suspend | dmix->timer_event_resume; snd_timer_params_set_filter(params, filter); Jaroslav ----- Jaroslav Kysela <perex@xxxxxxxx> Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc. _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel