Hi, I have a need for USB hotplugging to work for pulse audio. Normally it works but sometimes I get this scenario: snd_pcm_close(), then snd_pcm_drop(), snd_pcm_ioplug_drop(), pulse_stop() is called with pcm->stream == 0, this causes a pointer exception and a crash. If I change pulse_stop() so that it tests for a pcm->stream == 0 condition and returns an error, sound stops working. In this situation it looks like the main thread is in -> snd_pcm_close(), pulse_free(), pa_threaded_mainloop_stop(), pthread_join() and stuck there waiting for the "helper thread" to do something. Almost like a deadlock. Normally when you hotplug you see two threads, one is always the same tid, the other (probably the "helper thread") gets killed and restarted. When it reaches the deadlock above hotplugging doesn't cause the "helper thread" to restart, the two threads are always the same tid. Any help or ideas would be greatly appreciated. Rick Bronson _ | | / /__ .----------------------------------------------------------._____/ (___) | Rick Bronson rick at efn dot org Tel 541-485-7264 | (___) | Amazonia Computing http://www.efn.org/~rick __ o |_____ (___) | 5050 Donald Street "Onde esta dinheiro?" _`\<, | \_(___) | Eugene, OR 97405 -- Gal Costa __( )/( )__ | `----------------------------------------------------------'