From 3fa87510d1f523901c41039f39522f5c48989e54 Mon Sep 17 00:00:00 2001 From: James Calligeros Date: Tue, 7 Nov 2023 21:57:53 +1000 Subject: [PATCH] config: allow passing arguments to pipewire modules Sometimes, it may be necessary to pass arguments in to a Pipewire module being loaded. Allow this to be done using the same format as load_module()/load_optional_module(). Signed-off-by: James Calligeros --- src/config/common/00-functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/common/00-functions.lua b/src/config/common/00-functions.lua index 4278e6f9..451ad4f5 100644 --- a/src/config/common/00-functions.lua +++ b/src/config/common/00-functions.lua @@ -14,10 +14,10 @@ function load_optional_module(m, a) end end -function load_pw_module(m) +function load_pw_module(m, a) assert(type(m) == "string", "module name is mandatory, bail out"); if not components[m] then - components[m] = { "libpipewire-module-" .. m, type = "pw_module" } + components[m] = { "libpipewire-module-" .. m, type = "pw_module", args = a } end end