1 From 0c85e1110e32720785f861c7a85cf0636394eee4 Mon Sep 17 00:00:00 2001
2 From: Julian Bouzas <julian.bouzas@collabora.com>
3 Date: Thu, 27 Jun 2019 12:44:39 -0400
4 Subject: [PATCH] audio-dsp: allow mode to be set with a property
6 Upstream-Status: Submitted [https://github.com/PipeWire/pipewire/pull/167]
8 src/modules/module-audio-dsp/audio-dsp.c | 7 +++++--
9 1 file changed, 5 insertions(+), 2 deletions(-)
11 diff --git a/src/modules/module-audio-dsp/audio-dsp.c b/src/modules/module-audio-dsp/audio-dsp.c
12 index be8a7592..68249307 100644
13 --- a/src/modules/module-audio-dsp/audio-dsp.c
14 +++ b/src/modules/module-audio-dsp/audio-dsp.c
15 @@ -264,7 +264,7 @@ struct pw_node *pw_audio_dsp_new(struct pw_core *core,
19 - const char *api, *alias, *str, *factory;
20 + const char *api, *alias, *str, *factory, *mode;
22 struct pw_properties *pr;
24 @@ -279,6 +279,7 @@ struct pw_node *pw_audio_dsp_new(struct pw_core *core,
25 pw_log_error("missing audio-dsp.name property");
28 + mode = pw_properties_get(pr, "audio-dsp.mode");
30 snprintf(node_name, sizeof(node_name), "system_%s", alias);
31 for (i = 0; node_name[i]; i++) {
32 @@ -296,7 +297,9 @@ struct pw_node *pw_audio_dsp_new(struct pw_core *core,
33 if ((str = pw_properties_get(pr, "node.id")) != NULL)
34 pw_properties_set(pr, "node.session", str);
36 - if (direction == PW_DIRECTION_OUTPUT) {
39 + } else if (direction == PW_DIRECTION_OUTPUT) {
40 pw_properties_set(pr, "merger.monitor", "1");