summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2011-11-23 16:46:12 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-11-24 12:35:48 +0530
commitaaf0f5bd6e29c86dd5b96f2185bedc520d745ad4 (patch)
treef85c52053a94119ead29858035d5968ef8c39621
parentac3d66f978f4276317e11ba9f1f156926a90b30c (diff)
filters: Fix the master source/sink when autoloaded
When autoloaded, it is expected that module-filter-apply (or whatever is loading us) will take care of applying the filter on the correct sink/source master. Instead of adding complexity by tracking what is currently being filtered, we just disallow filtering anything except the original master sink/source and let module-filter-apply or whatever is loading us deal with dynamic sink/source changes.
-rw-r--r--src/modules/echo-cancel/module-echo-cancel.c4
-rw-r--r--src/modules/module-equalizer-sink.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index b810a4eda..64e17bffb 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -1399,7 +1399,7 @@ static pa_bool_t source_output_may_move_to_cb(pa_source_output *o, pa_source *de
pa_assert_ctl_context();
pa_assert_se(u = o->userdata);
- if (u->dead)
+ if (u->dead || u->autoloaded)
return FALSE;
return (u->source != dest) && (u->sink != dest->monitor_of);
@@ -1412,7 +1412,7 @@ static pa_bool_t sink_input_may_move_to_cb(pa_sink_input *i, pa_sink *dest) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- if (u->dead)
+ if (u->dead || u->autoloaded)
return FALSE;
return u->sink != dest;
diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index e83a41d54..006b3d1c4 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -1055,6 +1055,9 @@ static pa_bool_t sink_input_may_move_to_cb(pa_sink_input *i, pa_sink *dest) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
+ if (u->autoloaded)
+ return FALSE;
+
return u->sink != dest;
}