[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] jackdbus-detect: Make it possible to disable sink or source
PulseAudio Marge Bot (@pulseaudio-merge-bot)
gitlab at gitlab.freedesktop.org
Wed Dec 15 15:14:05 UTC 2021
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
cc8df06b by Mathy Vanvoorden at 2021-12-09T13:53:09+01:00
jackdbus-detect: Make it possible to disable sink or source
In some cases you might not want to enable the autogenerated sink or
source because you only have a need for the other. An argument was
added that is checked before the module-jack-{source,sink} is loaded.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/668>
- - - - -
1 changed file:
- src/modules/jack/module-jackdbus-detect.c
Changes:
=====================================
src/modules/jack/module-jackdbus-detect.c
=====================================
@@ -71,11 +71,13 @@ PA_MODULE_USAGE(
static const char* const valid_modargs[] = {
"channels",
+ "sink_enabled",
"sink_name",
"sink_properties",
"sink_client_name",
"sink_channels",
"sink_channel_map",
+ "source_enabled",
"source_name",
"source_properties",
"source_client_name",
@@ -100,6 +102,7 @@ static const char* const modtypes[JACK_SS_COUNT] = {
};
struct moddata {
+ bool enabled;
char *name;
pa_proplist *proplist;
char *client_name;
@@ -178,7 +181,7 @@ static void ensure_ports_started(struct userdata* u) {
pa_assert(u);
for (i = 0; i < JACK_SS_COUNT; i++)
- if (!u->jack_module_index[i]) {
+ if (u->mod_args[i].enabled && !u->jack_module_index[i]) {
pa_strbuf *args_buf = pa_strbuf_new();
char *args;
pa_module *m;
@@ -340,6 +343,13 @@ int pa__init(pa_module *m) {
}
for (i = 0; i < JACK_SS_COUNT; i++) {
+ u->mod_args[i].enabled = true;
+ pa_snprintf(argname, sizeof(argname), "%s_enabled", modtypes[i]);
+ if (pa_modargs_get_value_boolean(ma, argname, &u->mod_args[i].enabled) < 0) {
+ pa_log("Failed to parse %s= argument.", argname);
+ goto fail;
+ }
+
pa_snprintf(argname, sizeof(argname), "%s_name", modtypes[i]);
name = pa_modargs_get_value(ma, argname, NULL);
u->mod_args[i].name = pa_xstrdup(name);
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/cc8df06b9d04ad8d788043973c392fd8307b1680
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/cc8df06b9d04ad8d788043973c392fd8307b1680
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20211215/7fc70293/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list