summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2011-08-24 14:01:00 +0200
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-08-24 17:38:05 +0530
commitb746e09448f64ec6f33f80be52fe8a5a4879660a (patch)
treef1d1f2c387837bf58390c9bdc53f05e889fd3d40
parentd6b9e61b90c4b242fa6dcff4f258c62213e18a47 (diff)
switch-on-connect: Don't switch to a monitor source
Buglink: http://bugs.launchpad.net/bugs/831675 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
-rw-r--r--src/modules/module-switch-on-connect.c5
1 files changed, 5 insertions, 0 deletions
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 <pulsecore/core.h>
#include <pulsecore/sink-input.h>
#include <pulsecore/source-output.h>
+#include <pulsecore/source.h>
#include <pulsecore/modargs.h>
#include <pulsecore/log.h>
#include <pulsecore/namereg.h>
@@ -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"))