summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pulsecore/sink.c3
-rw-r--r--src/pulsecore/source.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 71121ca0b..43dad516a 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -3375,6 +3375,9 @@ int pa_sink_set_port(pa_sink *s, const char *name, bool save) {
pa_sink_set_port_latency_offset(s, s->active_port->latency_offset);
+ /* The active port affects the default sink selection. */
+ pa_core_update_default_sink(s->core);
+
pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_PORT_CHANGED], s);
return 0;
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 15b1eecda..cfbc62688 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -2650,6 +2650,9 @@ int pa_source_set_port(pa_source *s, const char *name, bool save) {
s->active_port = port;
s->save_port = save;
+ /* The active port affects the default source selection. */
+ pa_core_update_default_source(s->core);
+
pa_source_set_port_latency_offset(s, s->active_port->latency_offset);
pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_PORT_CHANGED], s);