From b746e09448f64ec6f33f80be52fe8a5a4879660a Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Wed, 24 Aug 2011 14:01:00 +0200 Subject: [PATCH] switch-on-connect: Don't switch to a monitor source Buglink: http://bugs.launchpad.net/bugs/831675 Signed-off-by: David Henningsson --- src/modules/module-switch-on-connect.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/module-switch-on-connect.c b/src/modules/module-switch-on-connect.c index b121fd9ae..b1570b1ad 100644 --- a/src/modules/module-switch-on-connect.c +++ b/src/modules/module-switch-on-connect.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -113,6 +114,10 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source, if (c->state != PA_CORE_RUNNING) return PA_HOOK_OK; + /* Don't switch to a monitoring source */ + if (source->monitor_of) + return PA_HOOK_OK; + /* Don't switch to any internal devices */ if ((s = pa_proplist_gets(source->proplist, PA_PROP_DEVICE_BUS))) { if (pa_streq(s, "pci"))