summaryrefslogtreecommitdiffstats
path: root/src/modules/module-combine.c
diff options
context:
space:
mode:
authorColin Guthrie <cguthrie@mandriva.org>2010-11-17 23:43:36 +0000
committerColin Guthrie <cguthrie@mandriva.org>2010-11-17 23:44:57 +0000
commit70a060db92b09f8ab3651bbaff6d8f4864a0e826 (patch)
treea370054d5e37f7648ca0533b1b559a287d4ffdff /src/modules/module-combine.c
parent33ea7b7816818113cf080e811547e1e76651109c (diff)
combine: Only check if the sink is h/w etc. in automatic mode
Diffstat (limited to 'src/modules/module-combine.c')
-rw-r--r--src/modules/module-combine.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index 01d7a4ec..bcea229f 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -1030,20 +1030,20 @@ static pa_hook_result_t sink_put_hook_cb(pa_core *c, pa_sink *s, struct userdata
pa_sink_assert_ref(s);
pa_assert(u);
- if (!is_suitable_sink(u, s))
- return PA_HOOK_OK;
-
- /* Check if the sink is a previously unlinked slave (non-automatic mode) */
- if (!u->automatic) {
+ if (u->automatic) {
+ if (!is_suitable_sink(u, s))
+ return PA_HOOK_OK;
+ } else {
+ /* Check if the sink is a previously unlinked slave (non-automatic mode) */
pa_strlist *l = u->unlinked_slaves;
while (l && !pa_streq(pa_strlist_data(l), s->name))
l = pa_strlist_next(l);
- if (l)
- u->unlinked_slaves = pa_strlist_remove(u->unlinked_slaves, s->name);
- else
+ if (!l)
return PA_HOOK_OK;
+
+ u->unlinked_slaves = pa_strlist_remove(u->unlinked_slaves, s->name);
}
pa_log_info("Configuring new sink: %s", s->name);