From 5d104994c09cc54e5e43e47a6961e4a551513a54 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 24 Apr 2021 19:46:06 +0200 Subject: [PATCH] pulse-server: mark remap source and sink passive Make sure the links to the real source/sink are passive links so that the virtual sink is suspended with the real sink when unused. --- src/modules/module-protocol-pulse/modules/module-remap-sink.c | 3 +++ .../module-protocol-pulse/modules/module-remap-source.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/modules/module-protocol-pulse/modules/module-remap-sink.c b/src/modules/module-protocol-pulse/modules/module-remap-sink.c index b420834e5..a0d0c908c 100644 --- a/src/modules/module-protocol-pulse/modules/module-remap-sink.c +++ b/src/modules/module-protocol-pulse/modules/module-remap-sink.c @@ -236,6 +236,9 @@ struct module *create_module_remap_sink(struct impl *impl, const char *argument) pw_properties_set(props, "remix", NULL); } + if (pw_properties_get(capture_props, PW_KEY_NODE_PASSIVE) == NULL) + pw_properties_set(capture_props, PW_KEY_NODE_PASSIVE, "true"); + module = module_new(impl, &module_remap_sink_methods, sizeof(*d)); if (module == NULL) { res = -errno; diff --git a/src/modules/module-protocol-pulse/modules/module-remap-source.c b/src/modules/module-protocol-pulse/modules/module-remap-source.c index dbbe4e713..2b42efdfb 100644 --- a/src/modules/module-protocol-pulse/modules/module-remap-source.c +++ b/src/modules/module-protocol-pulse/modules/module-remap-source.c @@ -236,6 +236,9 @@ struct module *create_module_remap_source(struct impl *impl, const char *argumen pw_properties_set(props, "remix", NULL); } + if (pw_properties_get(capture_props, PW_KEY_NODE_PASSIVE) == NULL) + pw_properties_set(capture_props, PW_KEY_NODE_PASSIVE, "true"); + module = module_new(impl, &module_remap_source_methods, sizeof(*d)); if (module == NULL) { res = -errno;