I investigated a bug in module-loopback reported[1] by Fr?d?ric Dalleau last year. The instructions for reproduction were as follows: 1. Have one sound card (index 0) loaded with one sink (index 0) and one source (index 1), plus the monitor source (index 0) 2. pactl load-module module-loopback sink=0 source=0 3. pactl set-card-profile 0 off These steps caused reliable crashing, and after fixing the first issue, two more cropped up. The first three patches fix these three issues. When I investigated in more detail the exact conditions that caused the first crash, I found out that module-alsa-card was doing something that it shouldn't do: it was moving streams. The last patch fixes that. Removing the stream moving from module-alsa-card causes a change in behavior that perhaps isn't acceptable: if a sink is removed due to a profile change and a new sink is created, the streams connected to the old sink aren't necessarily moved to the new sink. If this is unacceptable, the old policy should be reimplemented somewhere else, perhaps in module-rescue-streams. [1] http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/13408 Tanu Kaskinen (4): loopback: Fix segfault in may_move_to() callbacks filter-apply: Fix segfault with moving streams loopback: Flush asyncmsgq from the right context alsa: Don't move streams when changing profiles src/modules/alsa/module-alsa-card.c | 19 ------------ src/modules/module-filter-apply.c | 10 +++++-- src/modules/module-loopback.c | 55 ++++++++++++++++++++++++----------- 3 files changed, 45 insertions(+), 39 deletions(-) -- 1.7.10.4