sink: move the streams to the default_sink when the sink is unlinked

When a sink is unlinked, all streams of this sink are moved to
default_sink, this action is implemented in the core rather than
modules now.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
This commit is contained in:
Hui Wang 2019-01-16 15:40:53 +08:00
parent 60d948618e
commit 43e3a7f3c3
6 changed files with 21 additions and 189 deletions

View file

@ -106,7 +106,7 @@ void pa_device_port_set_available(pa_device_port *p, pa_available_t status) {
sink = pa_device_port_get_sink(p);
if (sink && p == sink->active_port) {
if (sink->active_port->available == PA_AVAILABLE_NO)
pa_sink_move_streams_to_default_sink(p->core, sink);
pa_sink_move_streams_to_default_sink(p->core, sink, false);
else
pa_core_move_streams_to_newly_available_preferred_sink(p->core, sink);
}