diff --git a/src/modules/module-protocol-pulse/modules/module-ladspa-sink.c b/src/modules/module-protocol-pulse/modules/module-ladspa-sink.c index ebce6e1c0..1b50914d1 100644 --- a/src/modules/module-protocol-pulse/modules/module-ladspa-sink.c +++ b/src/modules/module-protocol-pulse/modules/module-ladspa-sink.c @@ -84,11 +84,24 @@ static int module_ladspa_sink_load(struct client *client, struct module *module) fprintf(f, " type = ladspa "); fprintf(f, " plugin = \"%s\" ", plugin); fprintf(f, " label = \"%s\" ", label); + if ((str = pw_properties_get(module->props, "control")) != NULL) { + size_t len; + const char *s, *state = NULL; + int count = 0; + + fprintf(f, " control = {"); + while ((s = pw_split_walk(str, ", ", &len, &state))) { + fprintf(f, " \"%d\" = %.*s", count, (int)len, s); + count++; + } + fprintf(f, " }"); + } + fprintf(f, " } ]"); if ((str = pw_properties_get(module->props, "inputs")) != NULL) fprintf(f, " inputs = [ %s ] ", str); if ((str = pw_properties_get(module->props, "outputs")) != NULL) fprintf(f, " outputs = [ %s ] ", str); - fprintf(f, " } ] }"); + fprintf(f, " }"); fprintf(f, " capture.props = {"); pw_properties_serialize_dict(f, &data->capture_props->dict, 0); fprintf(f, " } playback.props = {"); diff --git a/src/modules/module-protocol-pulse/modules/module-ladspa-source.c b/src/modules/module-protocol-pulse/modules/module-ladspa-source.c index eae0c8581..e1c1cf029 100644 --- a/src/modules/module-protocol-pulse/modules/module-ladspa-source.c +++ b/src/modules/module-protocol-pulse/modules/module-ladspa-source.c @@ -84,11 +84,24 @@ static int module_ladspa_source_load(struct client *client, struct module *modul fprintf(f, " type = ladspa "); fprintf(f, " plugin = \"%s\" ", plugin); fprintf(f, " label = \"%s\" ", label); + if ((str = pw_properties_get(module->props, "control")) != NULL) { + size_t len; + const char *s, *state = NULL; + int count = 0; + + fprintf(f, " control = {"); + while ((s = pw_split_walk(str, ", ", &len, &state))) { + fprintf(f, " \"%d\" = %.*s", count, (int)len, s); + count++; + } + fprintf(f, " }"); + } + fprintf(f, " } ]"); if ((str = pw_properties_get(module->props, "inputs")) != NULL) fprintf(f, " inputs = [ %s ] ", str); if ((str = pw_properties_get(module->props, "outputs")) != NULL) fprintf(f, " outputs = [ %s ] ", str); - fprintf(f, " } ] }"); + fprintf(f, " }"); fprintf(f, " capture.props = {"); pw_properties_serialize_dict(f, &data->capture_props->dict, 0); fprintf(f, " } playback.props = {");