pulse: generate Usage from module_args definition

Add some more fields like the type, default value and possible enum
values for the module_args.

Use this to generate the Usage in describe-module and the docs.

This should give more consistent and correct Usage output in all
modules.
This commit is contained in:
Wim Taymans 2026-06-23 18:26:48 +02:00
parent 9f7eb63486
commit 9bcbd7b586
35 changed files with 366 additions and 631 deletions

View file

@ -5,7 +5,7 @@ Doxygen input filter that:
- adds \privatesection to all files - adds \privatesection to all files
- removes macros - removes macros
- parses pulse_module_options and substitutes it into @pulse_module_options@ - parses module_args valid_args[] and substitutes it into @pulse_module_options@
This is used for .c files, and causes Doxygen to not include This is used for .c files, and causes Doxygen to not include
any symbols from them, unless they also appeared in a header file. any symbols from them, unless they also appeared in a header file.
@ -25,22 +25,50 @@ def main():
text = re.sub("#define.*", "", text) text = re.sub("#define.*", "", text)
if "@pulse_module_options@" in text: if "@pulse_module_options@" in text:
m = re.search( type_names = {
r"static const char[* ]*const pulse_module_options\s+=\s+(.*?\")\s*;\s*$", "MODULE_TYPE_STRING": "string",
"MODULE_TYPE_STRINGV": "stringv",
"MODULE_TYPE_STRINGE": "stringe",
"MODULE_TYPE_INT": "int",
"MODULE_TYPE_BOOL": "bool",
"MODULE_TYPE_USEC": "usec",
"MODULE_TYPE_MSEC": "msec",
"MODULE_TYPE_PROPS": "proplist",
"MODULE_TYPE_FORMAT": "format",
"MODULE_TYPE_CHMAP": "chmap",
}
res = []
args_match = re.search(
r'static const struct module_args valid_args\[\]\s*=\s*\{(.*?)\{\s*NULL',
text, text,
re.M | re.S, re.S,
) )
if m: args_text = args_match.group(1) if args_match else ""
res = [] for m in re.finditer(
for line in m.group(1).splitlines(): r'{\s*"([a-z0-9_]+)"\s*,\s*"([^"]*)"\s*,\s*([^,]*),\s*([^,]*),\s*([^,}]*)',
m = re.match(r"\s*\"\s*([a-z0-9_]+)\s*=\s*(.*)\"\s*$", line) args_text,
if m: ):
name = m.group(1) name = m.group(1)
value = m.group(2).strip().strip("<>") desc = m.group(2)
res.append(f"- `{name}`: {value}") flags = m.group(3).strip()
typ = m.group(4).strip()
defval = m.group(5).strip().strip('"')
parts = []
typ = type_names.get(typ, "")
if typ:
parts.append(typ)
if defval and defval != "NULL":
parts.append(f"default {defval}")
parts.append(desc)
entry = f"- `{name}`: {', '.join(parts)}"
if "MODULE_ARG_MANDATORY" in flags:
entry += " *(mandatory)*"
if "MODULE_ARG_ENOTIMPL" in flags:
entry += " *(not implemented)*"
res.append(entry)
res = "\n * ".join(res) res = "\n * ".join(res)
text = text.replace("@pulse_module_options@", res) text = text.replace("@pulse_module_options@", res)
if os.path.basename(fn).startswith("module-") and fn.endswith(".c"): if os.path.basename(fn).startswith("module-") and fn.endswith(".c"):
text = re.sub(r"^ \* ##", r" * #", text, flags=re.M) text = re.sub(r"^ \* ##", r" * #", text, flags=re.M)

View file

@ -292,8 +292,29 @@ static int core_object_message_handler(struct client *client, struct pw_manager_
fprintf(response, "Description: %s\n", s); fprintf(response, "Description: %s\n", s);
if ((s = spa_dict_lookup(i->properties, PW_KEY_MODULE_AUTHOR))) if ((s = spa_dict_lookup(i->properties, PW_KEY_MODULE_AUTHOR)))
fprintf(response, "Author: %s\n", s); fprintf(response, "Author: %s\n", s);
if ((s = spa_dict_lookup(i->properties, PW_KEY_MODULE_USAGE))) if (i->valid_args) {
fprintf(response, "Usage: %s\n", s); const struct module_args *a;
fprintf(response, "Usage:");
for (a = i->valid_args; a->key; a++) {
fprintf(response, " %s=<%s", a->key, a->type);
if (a->def)
fprintf(response, ", default %s", a->def);
fprintf(response, ", %s", a->description);
if (a->vals) {
const char **v;
fprintf(response, " [");
for (v = a->vals; *v; v++)
fprintf(response, "%s%s", v == a->vals ? "" : "|", *v);
fprintf(response, "]");
}
if (a->flags & MODULE_ARG_MANDATORY)
fprintf(response, " (mandatory)");
if (a->flags & MODULE_ARG_ENOTIMPL)
fprintf(response, " (not implemented)");
fprintf(response, ">");
}
fprintf(response, "\n");
}
fprintf(response, "Load Once: %s\n", i->load_once ? "Yes": "No"); fprintf(response, "Load Once: %s\n", i->load_once ? "Yes": "No");
if ((s = spa_dict_lookup(i->properties, PW_KEY_MODULE_DEPRECATED))) if ((s = spa_dict_lookup(i->properties, PW_KEY_MODULE_DEPRECATED)))
fprintf(response, "Warning, deprecated: %s\n", s); fprintf(response, "Warning, deprecated: %s\n", s);

View file

@ -21,7 +21,22 @@ struct module_args {
const char *key; const char *key;
const char *description; const char *description;
#define MODULE_ARG_MANDATORY (1u<<0) #define MODULE_ARG_MANDATORY (1u<<0)
#define MODULE_ARG_ENOTIMPL (1u<<1)
uint32_t flags; uint32_t flags;
#define MODULE_TYPE_NONE ""
#define MODULE_TYPE_STRING "string"
#define MODULE_TYPE_STRINGV "stringv"
#define MODULE_TYPE_STRINGE "stringe"
#define MODULE_TYPE_USEC "usec"
#define MODULE_TYPE_MSEC "msec"
#define MODULE_TYPE_INT "int"
#define MODULE_TYPE_BOOL "bool"
#define MODULE_TYPE_PROPS "proplist"
#define MODULE_TYPE_FORMAT "format"
#define MODULE_TYPE_CHMAP "chmap"
const char *type;
const char *def;
const char **vals;
}; };
struct module_info { struct module_info {

View file

@ -18,57 +18,32 @@
* @pulse_module_options@ * @pulse_module_options@
*/ */
static const char *const pulse_module_options =
"name=<name of the sink, to be prefixed> "
"sink_name=<name for the sink> "
"sink_properties=<properties for the sink> "
"namereg_fail=<when false attempt to synthesise new sink_name if it is already taken> "
"device=<ALSA device> "
"device_id=<ALSA card index> "
"format=<sample format> "
"rate=<sample rate> "
"alternate_rate=<alternate sample rate> "
"channels=<number of channels> "
"channel_map=<channel map> "
"fragments=<number of fragments> "
"fragment_size=<fragment size> "
"mmap=<enable memory mapping?> "
"tsched=<enable system timer based scheduling mode?> "
"tsched_buffer_size=<buffer size when using timer based scheduling> "
"tsched_buffer_watermark=<lower fill watermark> "
"ignore_dB=<ignore dB information from the device?> "
"control=<name of mixer control, or name and index separated by a comma> "
"rewind_safeguard=<number of bytes that cannot be rewound> "
"deferred_volume=<Synchronize software and hardware volume changes to avoid momentary jumps?> "
"deferred_volume_safety_margin=<usec adjustment depending on volume direction> "
"deferred_volume_extra_delay=<usec adjustment to HW volume changes> "
"fixed_latency_range=<disable latency range changes on underrun?> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "name", "name of the sink, to be prefixed", }, { "name", "name of the sink, to be prefixed", 0, MODULE_TYPE_STRING, NULL },
{ "sink_name", "name for the sink", }, { "sink_name", "name for the sink", 0, MODULE_TYPE_STRING, NULL },
{ "sink_properties", "properties for the sink", }, { "sink_properties", "properties for the sink", 0, MODULE_TYPE_PROPS, NULL },
{ "namereg_fail", "when false attempt to synthesise new sink_name if it is already taken", }, { "namereg_fail", "when false attempt to synthesise new sink_name if it is already taken", 0, MODULE_TYPE_BOOL, NULL },
{ "device", "ALSA device", }, { "device", "ALSA device", 0, MODULE_TYPE_STRING, "default" },
{ "device_id", "ALSA card index", }, { "device_id", "ALSA card index", 0, MODULE_TYPE_STRING, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "alternate_rate", "alternate sample rate", }, { "alternate_rate", "alternate sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "fragments", "number of fragments", }, { "fragments", "number of fragments", 0, MODULE_TYPE_INT, NULL },
{ "fragment_size", "fragment size", }, { "fragment_size", "fragment size", 0, MODULE_TYPE_INT, NULL },
{ "mmap", "enable memory mapping?", }, { "mmap", "enable memory mapping", 0, MODULE_TYPE_BOOL, NULL },
{ "tsched", "enable system timer based scheduling mode?", }, { "tsched", "enable system timer based scheduling mode", 0, MODULE_TYPE_BOOL, NULL },
{ "tsched_buffer_size", "buffer size when using timer based scheduling", }, { "tsched_buffer_size", "buffer size when using timer based scheduling", 0, MODULE_TYPE_INT, NULL },
{ "tsched_buffer_watermark", "lower fill watermark", }, { "tsched_buffer_watermark", "lower fill watermark", 0, MODULE_TYPE_INT, NULL },
{ "ignore_dB", "ignore dB information from the device?", }, { "ignore_dB", "ignore dB information from the device", 0, MODULE_TYPE_BOOL, NULL },
{ "control", "name of mixer control, or name and index separated by a comma", }, { "control", "name of mixer control, or name and index separated by a comma", 0, MODULE_TYPE_STRING, NULL },
{ "rewind_safeguard", "number of bytes that cannot be rewound", }, { "rewind_safeguard", "number of bytes that cannot be rewound", 0, MODULE_TYPE_INT, NULL },
{ "deferred_volume", "Synchronize software and hardware volume changes to avoid momentary jumps?", }, { "deferred_volume", "Synchronize software and hardware volume changes to avoid momentary jumps", 0, MODULE_TYPE_BOOL, NULL },
{ "deferred_volume_safety_margin", "usec adjustment depending on volume direction", }, { "deferred_volume_safety_margin", "adjustment depending on volume direction", 0, MODULE_TYPE_USEC, NULL },
{ "deferred_volume_extra_delay", "usec adjustment to HW volume changes", }, { "deferred_volume_extra_delay", "adjustment to HW volume changes", 0, MODULE_TYPE_USEC, NULL },
{ "fixed_latency_range", "disable latency range changes on underrun?", }, { "fixed_latency_range", "disable latency range changes on underrun", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -196,7 +171,6 @@ static int module_alsa_sink_unload(struct module *module)
static const struct spa_dict_item module_alsa_sink_info[] = { static const struct spa_dict_item module_alsa_sink_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "An ALSA sink" }, { PW_KEY_MODULE_DESCRIPTION, "An ALSA sink" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -18,57 +18,32 @@
* @pulse_module_options@ * @pulse_module_options@
*/ */
static const char *const pulse_module_options =
"name=<name of the source, to be prefixed> "
"source_name=<name for the source> "
"source_properties=<properties for the source> "
"namereg_fail=<when false attempt to synthesise new source_name if it is already taken> "
"device=<ALSA device> "
"device_id=<ALSA card index> "
"format=<sample format> "
"rate=<sample rate> "
"alternate_rate=<alternate sample rate> "
"channels=<number of channels> "
"channel_map=<channel map> "
"fragments=<number of fragments> "
"fragment_size=<fragment size> "
"mmap=<enable memory mapping?> "
"tsched=<enable system timer based scheduling mode?> "
"tsched_buffer_size=<buffer size when using timer based scheduling> "
"tsched_buffer_watermark=<lower fill watermark> "
"ignore_dB=<ignore dB information from the device?> "
"control=<name of mixer control, or name and index separated by a comma> "
"rewind_safeguard=<number of bytes that cannot be rewound> "
"deferred_volume=<Synchronize software and hardware volume changes to avoid momentary jumps?> "
"deferred_volume_safety_margin=<usec adjustment depending on volume direction> "
"deferred_volume_extra_delay=<usec adjustment to HW volume changes> "
"fixed_latency_range=<disable latency range changes on underrun?>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "name", "name of the source, to be prefixed", }, { "name", "name of the source, to be prefixed", 0, MODULE_TYPE_STRING, NULL },
{ "source_name", "name for the source", }, { "source_name", "name for the source", 0, MODULE_TYPE_STRING, NULL },
{ "source_properties", "properties for the source", }, { "source_properties", "properties for the source", 0, MODULE_TYPE_PROPS, NULL },
{ "namereg_fail", "when false attempt to synthesise new source_name if it is already taken", }, { "namereg_fail", "when false attempt to synthesise new source_name if it is already taken", 0, MODULE_TYPE_BOOL, NULL },
{ "device", "ALSA device", }, { "device", "ALSA device", 0, MODULE_TYPE_STRING, "default" },
{ "device_id", "ALSA card index", }, { "device_id", "ALSA card index", 0, MODULE_TYPE_STRING, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "alternate_rate", "alternate sample rate", }, { "alternate_rate", "alternate sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "fragments", "number of fragments", }, { "fragments", "number of fragments", 0, MODULE_TYPE_INT, NULL },
{ "fragment_size", "fragment size", }, { "fragment_size", "fragment size", 0, MODULE_TYPE_INT, NULL },
{ "mmap", "enable memory mapping?", }, { "mmap", "enable memory mapping", 0, MODULE_TYPE_BOOL, NULL },
{ "tsched", "enable system timer based scheduling mode?", }, { "tsched", "enable system timer based scheduling mode", 0, MODULE_TYPE_BOOL, NULL },
{ "tsched_buffer_size", "buffer size when using timer based scheduling", }, { "tsched_buffer_size", "buffer size when using timer based scheduling", 0, MODULE_TYPE_INT, NULL },
{ "tsched_buffer_watermark", "lower fill watermark", }, { "tsched_buffer_watermark", "lower fill watermark", 0, MODULE_TYPE_INT, NULL },
{ "ignore_dB", "ignore dB information from the device?", }, { "ignore_dB", "ignore dB information from the device", 0, MODULE_TYPE_BOOL, NULL },
{ "control", "name of mixer control, or name and index separated by a comma", }, { "control", "name of mixer control, or name and index separated by a comma", 0, MODULE_TYPE_STRING, NULL },
{ "rewind_safeguard", "number of bytes that cannot be rewound", }, { "rewind_safeguard", "number of bytes that cannot be rewound", 0, MODULE_TYPE_INT, NULL },
{ "deferred_volume", "Synchronize software and hardware volume changes to avoid momentary jumps?", }, { "deferred_volume", "Synchronize software and hardware volume changes to avoid momentary jumps", 0, MODULE_TYPE_BOOL, NULL },
{ "deferred_volume_safety_margin", "usec adjustment depending on volume direction", }, { "deferred_volume_safety_margin", "adjustment depending on volume direction", 0, MODULE_TYPE_USEC, NULL },
{ "deferred_volume_extra_delay", "usec adjustment to HW volume changes", }, { "deferred_volume_extra_delay", "adjustment to HW volume changes", 0, MODULE_TYPE_USEC, NULL },
{ "fixed_latency_range", "disable latency range changes on underrun?", }, { "fixed_latency_range", "disable latency range changes on underrun", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -196,7 +171,6 @@ static int module_alsa_source_unload(struct module *module)
static const struct spa_dict_item module_alsa_source_info[] = { static const struct spa_dict_item module_alsa_source_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "An ALSA source" }, { PW_KEY_MODULE_DESCRIPTION, "An ALSA source" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -19,10 +19,9 @@
* @pulse_module_options@ * @pulse_module_options@
*/ */
static const char *const pulse_module_options = "sink_name=<name of sink>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "sink_name", "name of sink", }, { "sink_name", "name of sink", 0, MODULE_TYPE_STRING, NULL },
{ NULL, } { NULL, }
}; };
@ -98,7 +97,6 @@ static int module_always_sink_unload(struct module *module)
static const struct spa_dict_item module_always_sink_info[] = { static const struct spa_dict_item module_always_sink_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Pauli Virtanen <pav@iki.fi>" }, { PW_KEY_MODULE_AUTHOR, "Pauli Virtanen <pav@iki.fi>" },
{ PW_KEY_MODULE_DESCRIPTION, "Always keeps at least one sink loaded even if it's a null one" }, { PW_KEY_MODULE_DESCRIPTION, "Always keeps at least one sink loaded even if it's a null one" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -29,25 +29,16 @@
* \ref page_module_combine_stream "libpipewire-module-combine-stream" * \ref page_module_combine_stream "libpipewire-module-combine-stream"
*/ */
static const char *const pulse_module_options =
"sink_name=<name of the sink> "
"sink_properties=<properties for the sink> "
"sinks=<sinks to combine> "
"rate=<sample rate> "
"channels=<number of channels> "
"channel_map=<channel map> "
"remix=<remix channels> "
"latency_compensate=<bool> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "sink_name", "name of the sink", }, { "sink_name", "name of the sink", 0, MODULE_TYPE_STRING, "combined" },
{ "sink_properties", "properties for the sink", }, { "sink_properties", "properties for the sink", 0, MODULE_TYPE_PROPS, NULL },
{ "sinks", "sinks to combine", }, { "sinks", "sinks to combine", 0, MODULE_TYPE_STRINGV, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "remix", "remix channels", }, { "remix", "remix channels", 0, MODULE_TYPE_BOOL, NULL },
{ "latency_compensate", "bool", }, { "latency_compensate", "bool", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -63,7 +54,6 @@ PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
static const struct spa_dict_item module_combine_sink_info[] = { static const struct spa_dict_item module_combine_sink_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" }, { PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" },
{ PW_KEY_MODULE_DESCRIPTION, "Combine multiple sinks into a single sink" }, { PW_KEY_MODULE_DESCRIPTION, "Combine multiple sinks into a single sink" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -17,15 +17,11 @@
* @pulse_module_options@ * @pulse_module_options@
*/ */
static const char *const pulse_module_options =
"do_routing=<Automatically route streams based on a priority list (unique per-role)?> "
"on_hotplug=<When new device becomes available, recheck streams?> "
"on_rescue=<When device becomes unavailable, recheck streams?>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "do_routing", "Automatically route streams based on a priority list (unique per-role)?", }, { "do_routing", "Automatically route streams based on a priority list (unique per-role)", 0, MODULE_TYPE_BOOL, NULL },
{ "on_hotplug", "When new device becomes available, recheck streams?", }, { "on_hotplug", "When new device becomes available, recheck streams", 0, MODULE_TYPE_BOOL, NULL },
{ "on_rescue", "When device becomes unavailable, recheck streams?", }, { "on_rescue", "When device becomes unavailable, recheck streams", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -41,7 +37,6 @@ struct module_device_manager_data {
static const struct spa_dict_item module_device_manager_info[] = { static const struct spa_dict_item module_device_manager_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Keep track of devices (and their descriptions) both past and present and prioritise by role" }, { PW_KEY_MODULE_DESCRIPTION, "Keep track of devices (and their descriptions) both past and present and prioritise by role" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -57,17 +57,12 @@ enum {
#include "../reply.h" #include "../reply.h"
#include "../volume.h" #include "../volume.h"
static const char *const pulse_module_options =
"restore_port=<Save/restore port?> "
"restore_volume=<Save/restore volumes?> "
"restore_muted=<Save/restore muted states?> "
"restore_formats=<Save/restore saved formats?>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "restore_port", "Save/restore port?", }, { "restore_port", "Save/restore port", 0, MODULE_TYPE_BOOL, NULL },
{ "restore_volume", "Save/restore volumes?", }, { "restore_volume", "Save/restore volumes", 0, MODULE_TYPE_BOOL, NULL },
{ "restore_muted", "Save/restore muted states?", }, { "restore_muted", "Save/restore muted states", 0, MODULE_TYPE_BOOL, NULL },
{ "restore_formats", "Save/restore saved formats?", }, { "restore_formats", "Save/restore saved formats", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -85,7 +80,6 @@ struct module_device_restore_data {
static const struct spa_dict_item module_device_restore_info[] = { static const struct spa_dict_item module_device_restore_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Automatically restore the volume/mute state of devices" }, { PW_KEY_MODULE_DESCRIPTION, "Automatically restore the volume/mute state of devices" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -27,31 +27,19 @@
* \ref page_module_echo_cancel "libpipewire-module-echo-cancel" * \ref page_module_echo_cancel "libpipewire-module-echo-cancel"
*/ */
static const char *const pulse_module_options =
"source_name=<name for the source> "
"source_properties=<properties for the source> "
"source_master=<name of source to filter> "
"sink_name=<name for the sink> "
"sink_properties=<properties for the sink> "
"sink_master=<name of sink to filter> "
"rate=<sample rate> "
"channels=<number of channels> "
"channel_map=<channel map> "
"aec_method=<implementation to use> "
"aec_args=<parameters for the AEC engine> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "source_name", "name for the source", }, { "source_name", "name for the source", 0, MODULE_TYPE_STRING, "echo-cancel-source" },
{ "source_properties", "properties for the source", }, { "source_properties", "properties for the source", 0, MODULE_TYPE_PROPS, NULL },
{ "source_master", "name of source to filter", }, { "source_master", "name of source to filter", 0, MODULE_TYPE_STRING, NULL },
{ "sink_name", "name for the sink", }, { "sink_name", "name for the sink", 0, MODULE_TYPE_STRING, "echo-cancel-sink" },
{ "sink_properties", "properties for the sink", }, { "sink_properties", "properties for the sink", 0, MODULE_TYPE_PROPS, NULL },
{ "sink_master", "name of sink to filter", }, { "sink_master", "name of sink to filter", 0, MODULE_TYPE_STRING, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "aec_method", "implementation to use", }, { "aec_method", "implementation to use", 0, MODULE_TYPE_STRING, "webrtc" },
{ "aec_args", "parameters for the AEC engine", }, { "aec_args", "parameters for the AEC engine", 0, MODULE_TYPE_STRING, NULL },
{ NULL, } { NULL, }
}; };
@ -175,7 +163,6 @@ static int module_echo_cancel_unload(struct module *module)
static const struct spa_dict_item module_echo_cancel_info[] = { static const struct spa_dict_item module_echo_cancel_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" }, { PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" },
{ PW_KEY_MODULE_DESCRIPTION, "Acoustic echo canceller" }, { PW_KEY_MODULE_DESCRIPTION, "Acoustic echo canceller" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -25,33 +25,20 @@
* \ref page_module_jackdbus_detect "libpipewire-module-jackdbus-detect" * \ref page_module_jackdbus_detect "libpipewire-module-jackdbus-detect"
*/ */
static const char *const pulse_module_options =
"channels=<number of channels> "
"sink_name=<name for the sink> "
"sink_properties=<properties for the sink> "
"sink_client_name=<jack client name> "
"sink_channels=<number of channels> "
"sink_channel_map=<channel map> "
"source_name=<name for the source> "
"source_properties=<properties for the source> "
"source_client_name=<jack client name> "
"source_channels=<number of channels> "
"source_channel_map=<channel map> "
"connect=<connect ports?>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "sink_name", "name for the sink", }, { "sink_name", "name for the sink", 0, MODULE_TYPE_STRING, "jack_out" },
{ "sink_properties", "properties for the sink", }, { "sink_properties", "properties for the sink", 0, MODULE_TYPE_PROPS, NULL },
{ "sink_client_name", "jack client name", }, { "sink_client_name", "jack client name", 0, MODULE_TYPE_STRING, NULL },
{ "sink_channels", "number of channels", }, { "sink_channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "sink_channel_map", "channel map", }, { "sink_channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "source_name", "name for the source", }, { "source_name", "name for the source", 0, MODULE_TYPE_STRING, "jack_in" },
{ "source_properties", "properties for the source", }, { "source_properties", "properties for the source", 0, MODULE_TYPE_PROPS, NULL },
{ "source_client_name", "jack client name", }, { "source_client_name", "jack client name", 0, MODULE_TYPE_STRING, NULL },
{ "source_channels", "number of channels", }, { "source_channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "source_channel_map", "channel map", }, { "source_channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "connect", "connect ports?", }, { "connect", "connect ports", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -147,7 +134,6 @@ static int module_jackdbus_detect_unload(struct module *module)
static const struct spa_dict_item module_jackdbus_detect_info[] = { static const struct spa_dict_item module_jackdbus_detect_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.con>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.con>" },
{ PW_KEY_MODULE_DESCRIPTION, "Creates a JACK client when jackdbus is started" }, { PW_KEY_MODULE_DESCRIPTION, "Creates a JACK client when jackdbus is started" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -27,37 +27,22 @@
* \ref page_module_filter_chain "libpipewire-module-filter-chain" * \ref page_module_filter_chain "libpipewire-module-filter-chain"
*/ */
static const char *const pulse_module_options =
"sink_name=<name for the sink> "
"sink_properties=<properties for the sink> "
"sink_input_properties=<properties for the sink input> "
"master=<name of sink to filter> "
"sink_master=<name of sink to filter> "
"format=<sample format> "
"rate=<sample rate> "
"channels=<number of channels> "
"channel_map=<input channel map> "
"plugin=<ladspa plugin name> "
"label=<ladspa plugin label> "
"control=<comma separated list of input control values> "
"input_ladspaport_map=<comma separated list of input LADSPA port names> "
"output_ladspaport_map=<comma separated list of output LADSPA port names> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "sink_name", "name for the sink", }, { "sink_name", "name for the sink", 0, MODULE_TYPE_STRING, NULL },
{ "sink_properties", "properties for the sink", }, { "sink_properties", "properties for the sink", 0, MODULE_TYPE_PROPS, NULL },
{ "sink_input_properties", "properties for the sink input", }, { "sink_input_properties", "properties for the sink input", 0, MODULE_TYPE_PROPS, NULL },
{ "master", "name of sink to filter", }, { "master", "name of sink to filter", 0, MODULE_TYPE_STRING, NULL },
{ "sink_master", "name of sink to filter", }, { "sink_master", "name of sink to filter", 0, MODULE_TYPE_STRING, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "plugin", "LADSPA plugin name", MODULE_ARG_MANDATORY }, { "plugin", "LADSPA plugin name", MODULE_ARG_MANDATORY, MODULE_TYPE_STRING, NULL },
{ "label", "LADSPA plugin label", MODULE_ARG_MANDATORY }, { "label", "LADSPA plugin label", MODULE_ARG_MANDATORY, MODULE_TYPE_STRING, NULL },
{ "control", "comma separated list of input control values", }, { "control", "comma separated list of input control values", 0, MODULE_TYPE_STRINGV, NULL },
{ "input_ladspaport_map", "comma separated list of input LADSPA port names", }, { "input_ladspaport_map", "comma separated list of input LADSPA port names", 0, MODULE_TYPE_STRINGV, NULL },
{ "output_ladspaport_map", "comma separated list of output LADSPA port names", }, { "output_ladspaport_map", "comma separated list of output LADSPA port names", 0, MODULE_TYPE_STRINGV, NULL },
{ NULL, } { NULL, }
}; };
@ -196,7 +181,6 @@ static int module_ladspa_sink_unload(struct module *module)
static const struct spa_dict_item module_ladspa_sink_info[] = { static const struct spa_dict_item module_ladspa_sink_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Virtual LADSPA sink" }, { PW_KEY_MODULE_DESCRIPTION, "Virtual LADSPA sink" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -27,37 +27,22 @@
* \ref page_module_filter_chain "libpipewire-module-filter-chain" * \ref page_module_filter_chain "libpipewire-module-filter-chain"
*/ */
static const char *const pulse_module_options =
"source_name=<name for the source> "
"source_properties=<properties for the source> "
"source_output_properties=<properties for the source output> "
"master=<name of source to filter> "
"source_master=<name of source to filter> "
"format=<sample format> "
"rate=<sample rate> "
"channels=<number of channels> "
"channel_map=<input channel map> "
"plugin=<ladspa plugin name> "
"label=<ladspa plugin label> "
"control=<comma separated list of input control values> "
"input_ladspaport_map=<comma separated list of input LADSPA port names> "
"output_ladspaport_map=<comma separated list of output LADSPA port names> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "source_name", "name for the source", }, { "source_name", "name for the source", 0, MODULE_TYPE_STRING, NULL },
{ "source_properties", "properties for the source", }, { "source_properties", "properties for the source", 0, MODULE_TYPE_PROPS, NULL },
{ "source_output_properties", "properties for the source output", }, { "source_output_properties", "properties for the source output", 0, MODULE_TYPE_PROPS, NULL },
{ "master", "name of source to filter", }, { "master", "name of source to filter", 0, MODULE_TYPE_STRING, NULL },
{ "source_master", "name of source to filter", }, { "source_master", "name of source to filter", 0, MODULE_TYPE_STRING, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "plugin", "LADSPA plugin name", MODULE_ARG_MANDATORY }, { "plugin", "LADSPA plugin name", MODULE_ARG_MANDATORY, MODULE_TYPE_STRING, NULL },
{ "label", "LADSPA plugin label", MODULE_ARG_MANDATORY }, { "label", "LADSPA plugin label", MODULE_ARG_MANDATORY, MODULE_TYPE_STRING, NULL },
{ "control", "comma separated list of input control values", }, { "control", "comma separated list of input control values", 0, MODULE_TYPE_STRINGV, NULL },
{ "input_ladspaport_map", "comma separated list of input LADSPA port names", }, { "input_ladspaport_map", "comma separated list of input LADSPA port names", 0, MODULE_TYPE_STRINGV, NULL },
{ "output_ladspaport_map", "comma separated list of output LADSPA port names", }, { "output_ladspaport_map", "comma separated list of output LADSPA port names", 0, MODULE_TYPE_STRINGV, NULL },
{ NULL, } { NULL, }
}; };
@ -196,7 +181,6 @@ static int module_ladspa_source_unload(struct module *module)
static const struct spa_dict_item module_ladspa_source_info[] = { static const struct spa_dict_item module_ladspa_source_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Virtual LADSPA source" }, { PW_KEY_MODULE_DESCRIPTION, "Virtual LADSPA source" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -27,31 +27,19 @@
* \ref page_module_loopback "libpipewire-module-loopback" * \ref page_module_loopback "libpipewire-module-loopback"
*/ */
static const char *const pulse_module_options =
"source=<source to connect to> "
"sink=<sink to connect to> "
"latency_msec=<latency in ms> "
"rate=<sample rate> "
"channels=<number of channels> "
"channel_map=<channel map> "
"sink_input_properties=<proplist> "
"source_output_properties=<proplist> "
"source_dont_move=<boolean> "
"sink_dont_move=<boolean> "
"remix=<remix channels?> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "source", "source to connect to", }, { "source", "source to connect to", 0, MODULE_TYPE_STRING, NULL },
{ "sink", "sink to connect to", }, { "sink", "sink to connect to", 0, MODULE_TYPE_STRING, NULL },
{ "latency_msec", "latency in ms", }, { "latency_msec", "latency", 0, MODULE_TYPE_MSEC, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "sink_input_properties", "proplist", }, { "sink_input_properties", "proplist", 0, MODULE_TYPE_PROPS, NULL },
{ "source_output_properties", "proplist", }, { "source_output_properties", "proplist", 0, MODULE_TYPE_PROPS, NULL },
{ "source_dont_move", "boolean", }, { "source_dont_move", "boolean", 0, MODULE_TYPE_BOOL, NULL },
{ "sink_dont_move", "boolean", }, { "sink_dont_move", "boolean", 0, MODULE_TYPE_BOOL, NULL },
{ "remix", "remix channels?", }, { "remix", "remix channels", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -146,7 +134,6 @@ static int module_loopback_unload(struct module *module)
static const struct spa_dict_item module_loopback_info[] = { static const struct spa_dict_item module_loopback_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" }, { PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" },
{ PW_KEY_MODULE_DESCRIPTION, "Loopback from source to sink" }, { PW_KEY_MODULE_DESCRIPTION, "Loopback from source to sink" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -21,15 +21,11 @@
* @pulse_module_options@ * @pulse_module_options@
*/ */
static const char *const pulse_module_options =
"port=<TCP port number> "
"listen=<address to listen on> "
"auth-anonymous=<don't check for cookies?>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "port", "TCP port number", }, { "port", "TCP port number", 0, MODULE_TYPE_INT, "4713" },
{ "listen", "address to listen on", }, { "listen", "address to listen on", 0, MODULE_TYPE_STRING, NULL },
{ "auth-anonymous", "don't check for cookies?", }, { "auth-anonymous", "don't check for cookies", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -78,7 +74,6 @@ static int module_native_protocol_tcp_unload(struct module *module)
static const struct spa_dict_item module_native_protocol_tcp_info[] = { static const struct spa_dict_item module_native_protocol_tcp_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Native protocol (TCP sockets)" }, { PW_KEY_MODULE_DESCRIPTION, "Native protocol (TCP sockets)" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -18,21 +18,14 @@
* @pulse_module_options@ * @pulse_module_options@
*/ */
static const char *const pulse_module_options =
"sink_name=<name of sink> "
"sink_properties=<properties for the sink> "
"format=<sample format> "
"rate=<sample rate> "
"channels=<number of channels> "
"channel_map=<channel map>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "sink_name", "name of sink", }, { "sink_name", "name of sink", 0, MODULE_TYPE_STRING, "null-sink" },
{ "sink_properties", "properties for the sink", }, { "sink_properties", "properties for the sink", 0, MODULE_TYPE_PROPS, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ NULL, } { NULL, }
}; };
@ -158,7 +151,6 @@ static int module_null_sink_unload(struct module *module)
static const struct spa_dict_item module_null_sink_info[] = { static const struct spa_dict_item module_null_sink_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "A NULL sink" }, { PW_KEY_MODULE_DESCRIPTION, "A NULL sink" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -31,25 +31,16 @@
* \ref page_module_pipe_tunnel "libpipewire-module-pipe-tunnel" * \ref page_module_pipe_tunnel "libpipewire-module-pipe-tunnel"
*/ */
static const char *const pulse_module_options =
"file=<name of the FIFO special file to use> "
"sink_name=<name for the sink> "
"sink_properties=<sink properties> "
"format=<sample format> "
"rate=<sample rate> "
"channels=<number of channels> "
"channel_map=<channel map> "
"use_system_clock_for_timing=<yes or no> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "file", "name of the FIFO special file to use", }, { "file", "name of the FIFO special file to use", 0, MODULE_TYPE_STRING, NULL },
{ "sink_name", "name for the sink", }, { "sink_name", "name for the sink", 0, MODULE_TYPE_STRING, "fifo_output" },
{ "sink_properties", "sink properties", }, { "sink_properties", "sink properties", 0, MODULE_TYPE_PROPS, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "use_system_clock_for_timing", "yes or no", }, { "use_system_clock_for_timing", "use system clock for timing", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -134,7 +125,6 @@ static int module_pipe_sink_unload(struct module *module)
static const struct spa_dict_item module_pipe_sink_info[] = { static const struct spa_dict_item module_pipe_sink_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" }, { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" },
{ PW_KEY_MODULE_DESCRIPTION, "Pipe sink" }, { PW_KEY_MODULE_DESCRIPTION, "Pipe sink" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -31,23 +31,15 @@
* \ref page_module_pipe_tunnel "libpipewire-module-pipe-tunnel" * \ref page_module_pipe_tunnel "libpipewire-module-pipe-tunnel"
*/ */
static const char *const pulse_module_options =
"file=<name of the FIFO special file to use> "
"source_name=<name for the source> "
"source_properties=<source properties> "
"format=<sample format> "
"rate=<sample rate> "
"channels=<number of channels> "
"channel_map=<channel map> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "file", "name of the FIFO special file to use", }, { "file", "name of the FIFO special file to use", 0, MODULE_TYPE_STRING, NULL },
{ "source_name", "name for the source", }, { "source_name", "name for the source", 0, MODULE_TYPE_STRING, "fifo_input" },
{ "source_properties", "source properties", }, { "source_properties", "source properties", 0, MODULE_TYPE_PROPS, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ NULL, } { NULL, }
}; };
@ -132,7 +124,6 @@ static int module_pipe_source_unload(struct module *module)
static const struct spa_dict_item module_pipe_source_info[] = { static const struct spa_dict_item module_pipe_source_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" }, { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" },
{ PW_KEY_MODULE_DESCRIPTION, "Pipe source" }, { PW_KEY_MODULE_DESCRIPTION, "Pipe source" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -18,7 +18,7 @@
* *
* ## Module Options * ## Module Options
* *
* No options. * @pulse_module_options@
* *
* ## See Also * ## See Also
* *
@ -26,7 +26,7 @@
*/ */
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "latency_msec", "latency in ms", }, { "latency_msec", "latency", 0, MODULE_TYPE_MSEC, NULL },
{ NULL, } { NULL, }
}; };
@ -106,7 +106,6 @@ static int module_raop_discover_unload(struct module *module)
static const struct spa_dict_item module_raop_discover_info[] = { static const struct spa_dict_item module_raop_discover_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.con>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.con>" },
{ PW_KEY_MODULE_DESCRIPTION, "mDNS/DNS-SD Service Discovery of RAOP devices" }, { PW_KEY_MODULE_DESCRIPTION, "mDNS/DNS-SD Service Discovery of RAOP devices" },
{ PW_KEY_MODULE_USAGE, "" },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -26,29 +26,18 @@
* \ref page_module_loopback "libpipewire-module-loopback" * \ref page_module_loopback "libpipewire-module-loopback"
*/ */
static const char *const pulse_module_options =
"sink_name=<name for the sink> "
"sink_properties=<properties for the sink> "
"master=<name of sink to remap> "
"master_channel_map=<channel map> "
"format=<sample format> "
"rate=<sample rate> "
"channels=<number of channels> "
"channel_map=<channel map> "
"resample_method=<resampler> "
"remix=<remix channels?>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "sink_name", "name for the sink", }, { "sink_name", "name for the sink", 0, MODULE_TYPE_STRING, NULL },
{ "sink_properties", "properties for the sink", }, { "sink_properties", "properties for the sink", 0, MODULE_TYPE_PROPS, NULL },
{ "master", "name of sink to remap", }, { "master", "name of sink to remap", 0, MODULE_TYPE_STRING, NULL },
{ "master_channel_map", "channel map", }, { "master_channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "resample_method", "resampler", }, { "resample_method", "resampler", 0, MODULE_TYPE_STRING, NULL },
{ "remix", "remix channels?", }, { "remix", "remix channels", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -141,7 +130,6 @@ static int module_remap_sink_unload(struct module *module)
static const struct spa_dict_item module_remap_sink_info[] = { static const struct spa_dict_item module_remap_sink_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Remap sink channels" }, { PW_KEY_MODULE_DESCRIPTION, "Remap sink channels" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -26,29 +26,18 @@
* \ref page_module_loopback "libpipewire-module-loopback" * \ref page_module_loopback "libpipewire-module-loopback"
*/ */
static const char *const pulse_module_options =
"source_name=<name for the source> "
"source_properties=<properties for the source> "
"master=<name of source to filter> "
"master_channel_map=<channel map> "
"format=<sample format> "
"rate=<sample rate> "
"channels=<number of channels> "
"channel_map=<channel map> "
"resample_method=<resampler> "
"remix=<remix channels?>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "source_name", "name for the source", }, { "source_name", "name for the source", 0, MODULE_TYPE_STRING, NULL },
{ "source_properties", "properties for the source", }, { "source_properties", "properties for the source", 0, MODULE_TYPE_PROPS, NULL },
{ "master", "name of source to filter", }, { "master", "name of source to filter", 0, MODULE_TYPE_STRING, NULL },
{ "master_channel_map", "channel map", }, { "master_channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "resample_method", "resampler", }, { "resample_method", "resampler", 0, MODULE_TYPE_STRING, NULL },
{ "remix", "remix channels?", }, { "remix", "remix channels", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -141,7 +130,6 @@ static int module_remap_source_unload(struct module *module)
static const struct spa_dict_item module_remap_source_info[] = { static const struct spa_dict_item module_remap_source_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Remap source channels" }, { PW_KEY_MODULE_DESCRIPTION, "Remap source channels" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -26,28 +26,20 @@
* \ref page_module_roc_source "libpipewire-module-roc-source" * \ref page_module_roc_source "libpipewire-module-roc-source"
*/ */
static const char *const pulse_module_options =
"sink=<name for the sink> " static const char *resampler_profile_vals[] = { "empty", "high", "medium", "low", NULL };
"sink_input_properties=<properties for the sink_input> " static const char *fec_code_vals[] = { "empty", "disable", "rs8m", "ldpc", NULL };
"resampler_profile=<empty>|high|medium|low "
"fec_code=<empty>|disable|rs8m|ldpc "
"sess_latency_msec=<target network latency in milliseconds> "
"local_ip=<local receiver ip> "
"local_source_port=<local receiver port for source packets> "
"local_repair_port=<local receiver port for repair packets> "
"local_control_port=<local receiver port for control packets> "
;
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "sink", "name for the sink", }, { "sink", "name for the sink", 0, MODULE_TYPE_STRING, NULL },
{ "sink_input_properties", "properties for the sink_input", }, { "sink_input_properties", "properties for the sink_input", 0, MODULE_TYPE_PROPS, NULL },
{ "resampler_profile", "empty|high|medium|low", }, { "resampler_profile", "resampler profile", 0, MODULE_TYPE_STRINGE, NULL, resampler_profile_vals },
{ "fec_code", "empty|disable|rs8m|ldpc", }, { "fec_code", "forward error correction code", 0, MODULE_TYPE_STRINGE, NULL, fec_code_vals },
{ "sess_latency_msec", "target network latency in milliseconds", }, { "sess_latency_msec", "target network latency", 0, MODULE_TYPE_MSEC, NULL },
{ "local_ip", "local receiver ip", }, { "local_ip", "local receiver ip", 0, MODULE_TYPE_STRING, NULL },
{ "local_source_port", "local receiver port for source packets", }, { "local_source_port", "local receiver port for source packets", 0, MODULE_TYPE_INT, NULL },
{ "local_repair_port", "local receiver port for repair packets", }, { "local_repair_port", "local receiver port for repair packets", 0, MODULE_TYPE_INT, NULL },
{ "local_control_port", "local receiver port for control packets", }, { "local_control_port", "local receiver port for control packets", 0, MODULE_TYPE_INT, NULL },
{ NULL, }, { NULL, },
}; };
@ -135,7 +127,6 @@ static int module_roc_sink_input_unload(struct module *module)
static const struct spa_dict_item module_roc_sink_input_info[] = { static const struct spa_dict_item module_roc_sink_input_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" }, { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" },
{ PW_KEY_MODULE_DESCRIPTION, "roc sink-input" }, { PW_KEY_MODULE_DESCRIPTION, "roc sink-input" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -26,24 +26,17 @@
* \ref page_module_roc_sink "libpipewire-module-roc-sink" * \ref page_module_roc_sink "libpipewire-module-roc-sink"
*/ */
static const char *const pulse_module_options =
"sink_name=<name for the sink> " static const char *fec_code_vals[] = { "empty", "disable", "rs8m", "ldpc", NULL };
"sink_properties=<properties for the sink> "
"fec_code=<empty>|disable|rs8m|ldpc "
"remote_ip=<remote receiver ip> "
"remote_source_port=<remote receiver port for source packets> "
"remote_repair_port=<remote receiver port for repair packets> "
"remote_control_port=<remote receiver port for control packets> "
;
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "sink_name", "name for the sink", }, { "sink_name", "name for the sink", 0, MODULE_TYPE_STRING, NULL },
{ "sink_properties", "properties for the sink", }, { "sink_properties", "properties for the sink", 0, MODULE_TYPE_PROPS, NULL },
{ "fec_code", "empty|disable|rs8m|ldpc", }, { "fec_code", "forward error correction code", 0, MODULE_TYPE_STRINGE, NULL, fec_code_vals },
{ "remote_ip", "remote receiver ip", }, { "remote_ip", "remote receiver ip", 0, MODULE_TYPE_STRING, NULL },
{ "remote_source_port", "remote receiver port for source packets", }, { "remote_source_port", "remote receiver port for source packets", 0, MODULE_TYPE_INT, NULL },
{ "remote_repair_port", "remote receiver port for repair packets", }, { "remote_repair_port", "remote receiver port for repair packets", 0, MODULE_TYPE_INT, NULL },
{ "remote_control_port", "remote receiver port for control packets", }, { "remote_control_port", "remote receiver port for control packets", 0, MODULE_TYPE_INT, NULL },
{ NULL, }, { NULL, },
}; };
@ -131,7 +124,6 @@ static int module_roc_sink_unload(struct module *module)
static const struct spa_dict_item module_roc_sink_info[] = { static const struct spa_dict_item module_roc_sink_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" }, { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" },
{ PW_KEY_MODULE_DESCRIPTION, "roc sink" }, { PW_KEY_MODULE_DESCRIPTION, "roc sink" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -26,28 +26,20 @@
* \ref page_module_roc_source "libpipewire-module-roc-source" * \ref page_module_roc_source "libpipewire-module-roc-source"
*/ */
static const char *const pulse_module_options =
"source_name=<name for the source> " static const char *resampler_profile_vals[] = { "empty", "high", "medium", "low", NULL };
"source_properties=<properties for the source> " static const char *fec_code_vals[] = { "empty", "disable", "rs8m", "ldpc", NULL };
"resampler_profile=<empty>|high|medium|low "
"fec_code=<empty>|disable|rs8m|ldpc "
"sess_latency_msec=<target network latency in milliseconds> "
"local_ip=<local receiver ip> "
"local_source_port=<local receiver port for source packets> "
"local_repair_port=<local receiver port for repair packets> "
"local_control_port=<local receiver port for control packets> "
;
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "source_name", "name for the source", }, { "source_name", "name for the source", 0, MODULE_TYPE_STRING, NULL },
{ "source_properties", "properties for the source", }, { "source_properties", "properties for the source", 0, MODULE_TYPE_PROPS, NULL },
{ "resampler_profile", "empty|high|medium|low", }, { "resampler_profile", "resampler profile", 0, MODULE_TYPE_STRINGE, NULL, resampler_profile_vals },
{ "fec_code", "empty|disable|rs8m|ldpc", }, { "fec_code", "forward error correction code", 0, MODULE_TYPE_STRINGE, NULL, fec_code_vals },
{ "sess_latency_msec", "target network latency in milliseconds", }, { "sess_latency_msec", "target network latency", 0, MODULE_TYPE_MSEC, NULL },
{ "local_ip", "local receiver ip", }, { "local_ip", "local receiver ip", 0, MODULE_TYPE_STRING, NULL },
{ "local_source_port", "local receiver port for source packets", }, { "local_source_port", "local receiver port for source packets", 0, MODULE_TYPE_INT, NULL },
{ "local_repair_port", "local receiver port for repair packets", }, { "local_repair_port", "local receiver port for repair packets", 0, MODULE_TYPE_INT, NULL },
{ "local_control_port", "local receiver port for control packets", }, { "local_control_port", "local receiver port for control packets", 0, MODULE_TYPE_INT, NULL },
{ NULL, }, { NULL, },
}; };
@ -135,7 +127,6 @@ static int module_roc_source_unload(struct module *module)
static const struct spa_dict_item module_roc_source_info[] = { static const struct spa_dict_item module_roc_source_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" }, { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" },
{ PW_KEY_MODULE_DESCRIPTION, "roc source" }, { PW_KEY_MODULE_DESCRIPTION, "roc source" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -25,17 +25,12 @@
* \ref page_module_rtp_sap "libpipewire-module-rtp-sap" * \ref page_module_rtp_sap "libpipewire-module-rtp-sap"
*/ */
static const char *const pulse_module_options =
"sink=<name of the sink> "
"sap_address=<multicast address to listen on> "
"latency_msec=<latency in ms> "
"stream_properties=<properties for the stream> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "sink", "name of the sink", }, { "sink", "name of the sink", 0, MODULE_TYPE_STRING, NULL },
{ "sap_address", "multicast address to listen on", }, { "sap_address", "multicast address to listen on", 0, MODULE_TYPE_STRING, NULL },
{ "latency_msec", "latency in ms", }, { "latency_msec", "latency", 0, MODULE_TYPE_MSEC, NULL },
{ "stream_properties", "properties for the stream", }, { "stream_properties", "properties for the stream", 0, MODULE_TYPE_PROPS, NULL },
{ NULL, } { NULL, }
}; };
@ -134,7 +129,6 @@ static int module_rtp_recv_unload(struct module *module)
static const struct spa_dict_item module_rtp_recv_info[] = { static const struct spa_dict_item module_rtp_recv_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Receive data from a network via RTP/SAP/SDP" }, { PW_KEY_MODULE_DESCRIPTION, "Receive data from a network via RTP/SAP/SDP" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -25,37 +25,24 @@
* \ref page_module_rtp_sink "libpipewire-module-rtp-sink" * \ref page_module_rtp_sink "libpipewire-module-rtp-sink"
*/ */
static const char *const pulse_module_options =
"source=<name of the source> " static const char *inhibit_auto_suspend_vals[] = { "always", "never", "only_with_non_monitor_sources", NULL };
"format=<sample format> "
"channels=<number of channels> "
"rate=<sample rate> "
"destination_ip=<destination IP address> "
"source_ip=<source IP address> "
"port=<port number> "
"mtu=<maximum transfer unit> "
"loop=<loopback to local host?> "
"ttl=<ttl value> "
"inhibit_auto_suspend=<always|never|only_with_non_monitor_sources> "
"stream_name=<name of the stream> "
"stream_properties=<properties for the stream> "
"enable_opus=<enable OPUS codec>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "source", "name of the source", }, { "source", "name of the source", 0, MODULE_TYPE_STRING, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "destination_ip", "destination IP address", }, { "destination_ip", "destination IP address", 0, MODULE_TYPE_STRING, NULL },
{ "source_ip", "source IP address", }, { "source_ip", "source IP address", 0, MODULE_TYPE_STRING, NULL },
{ "port", "port number", }, { "port", "port number", 0, MODULE_TYPE_INT, NULL },
{ "mtu", "maximum transfer unit", }, { "mtu", "maximum transfer unit", 0, MODULE_TYPE_INT, NULL },
{ "loop", "loopback to local host", }, { "loop", "loopback to local host", 0, MODULE_TYPE_BOOL, NULL },
{ "ttl", "ttl value", }, { "ttl", "ttl value", 0, MODULE_TYPE_INT, NULL },
{ "inhibit_auto_suspend", "always|never|only_with_non_monitor_sources", }, { "inhibit_auto_suspend", "inhibit auto suspend policy", 0, MODULE_TYPE_STRINGE, NULL, inhibit_auto_suspend_vals },
{ "stream_name", "name of the stream", }, { "stream_name", "name of the stream", 0, MODULE_TYPE_STRING, NULL },
{ "stream_properties", "properties for the stream", }, { "stream_properties", "properties for the stream", 0, MODULE_TYPE_PROPS, NULL },
{ "enable_opus", "enable OPUS codec", }, { "enable_opus", "enable OPUS codec", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, }, { NULL, },
}; };
@ -199,7 +186,6 @@ static int module_rtp_send_unload(struct module *module)
static const struct spa_dict_item module_rtp_send_info[] = { static const struct spa_dict_item module_rtp_send_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Read data from source and send it to the network via RTP/SAP/SDP" }, { PW_KEY_MODULE_DESCRIPTION, "Read data from source and send it to the network via RTP/SAP/SDP" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -25,29 +25,18 @@
* \ref page_module_protocol_simple "libpipewire-module-protocol-simple" * \ref page_module_protocol_simple "libpipewire-module-protocol-simple"
*/ */
static const char *const pulse_module_options =
"rate=<sample rate> "
"format=<sample format> "
"channels=<number of channels> "
"channel_map=<number of channels> "
"sink=<sink to connect to> "
"source=<source to connect to> "
"playback=<enable playback?> "
"record=<enable record?> "
"port=<TCP port number> "
"listen=<address to listen on>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "number of channels", }, { "channel_map", "number of channels", 0, MODULE_TYPE_CHMAP, NULL },
{ "sink", "sink to connect to", }, { "sink", "sink to connect to", 0, MODULE_TYPE_STRING, NULL },
{ "source", "source to connect to", }, { "source", "source to connect to", 0, MODULE_TYPE_STRING, NULL },
{ "playback", "enable playback?", }, { "playback", "enable playback", 0, MODULE_TYPE_BOOL, NULL },
{ "record", "enable record?", }, { "record", "enable record", 0, MODULE_TYPE_BOOL, NULL },
{ "port", "TCP port number", }, { "port", "TCP port number", 0, MODULE_TYPE_INT, "4711" },
{ "listen", "address to listen on", }, { "listen", "address to listen on", 0, MODULE_TYPE_STRING, NULL },
{ NULL, } { NULL, }
}; };
@ -128,7 +117,6 @@ static int module_simple_protocol_tcp_unload(struct module *module)
static const struct spa_dict_item module_simple_protocol_tcp_info[] = { static const struct spa_dict_item module_simple_protocol_tcp_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Simple protocol (TCP sockets)" }, { PW_KEY_MODULE_DESCRIPTION, "Simple protocol (TCP sockets)" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -18,21 +18,14 @@
* @pulse_module_options@ * @pulse_module_options@
*/ */
static const char *const pulse_module_options =
"restore_device=<Save/restore sinks/sources?> "
"restore_volume=<Save/restore volumes?> "
"restore_muted=<Save/restore muted states?> "
"on_hotplug=<This argument is obsolete, please remove it from configuration> "
"on_rescue=<This argument is obsolete, please remove it from configuration> "
"fallback_table=<filename>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "restore_device", "Save/restore sinks/sources?", }, { "restore_device", "Save/restore sinks/sources", 0, MODULE_TYPE_BOOL, NULL },
{ "restore_volume", "Save/restore volumes?", }, { "restore_volume", "Save/restore volumes", 0, MODULE_TYPE_BOOL, NULL },
{ "restore_muted", "Save/restore muted states?", }, { "restore_muted", "Save/restore muted states", 0, MODULE_TYPE_BOOL, NULL },
{ "on_hotplug", "This argument is obsolete, please remove it from configuration", }, { "on_hotplug", "recheck streams on hotplug", MODULE_ARG_ENOTIMPL, MODULE_TYPE_BOOL, NULL },
{ "on_rescue", "This argument is obsolete, please remove it from configuration", }, { "on_rescue", "recheck streams on rescue", MODULE_ARG_ENOTIMPL, MODULE_TYPE_BOOL, NULL },
{ "fallback_table", "filename", }, { "fallback_table", "filename", 0, MODULE_TYPE_STRING, NULL },
{ NULL, } { NULL, }
}; };
@ -50,7 +43,6 @@ struct module_stream_restore_data {
static const struct spa_dict_item module_stream_restore_info[] = { static const struct spa_dict_item module_stream_restore_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Automatically restore the volume/mute/device state of streams" }, { PW_KEY_MODULE_DESCRIPTION, "Automatically restore the volume/mute/device state of streams" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -27,15 +27,11 @@
* @pulse_module_options@ * @pulse_module_options@
*/ */
static const char *const pulse_module_options =
"only_from_unavailable=<boolean, only switch from unavailable ports (not implemented yet)> "
"ignore_virtual=<boolean, ignore new virtual sinks and sources, defaults to true> "
"blocklist=<regex, ignore matching devices, default=hdmi> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "only_from_unavailable", "boolean, only switch from unavailable ports (not implemented yet)", }, { "only_from_unavailable", "only switch from unavailable ports", MODULE_ARG_ENOTIMPL, MODULE_TYPE_BOOL, "false" },
{ "ignore_virtual", "boolean, ignore new virtual sinks and sources, defaults to true", }, { "ignore_virtual", "boolean, ignore new virtual sinks and sources, defaults to true", 0, MODULE_TYPE_BOOL, "true" },
{ "blocklist", "regex, ignore matching devices, default=hdmi", }, { "blocklist", "regex, ignore matching devices, default=hdmi", 0, MODULE_TYPE_STRING, "hdmi" },
{ NULL, } { NULL, }
}; };
@ -253,7 +249,6 @@ static const struct spa_dict_item module_switch_on_connect_info[] = {
"This module exists for Pulseaudio compatibility, and is useful only when some applications " "This module exists for Pulseaudio compatibility, and is useful only when some applications "
"try to manage the default sinks/sources themselves and interfere with PipeWire's builtin " "try to manage the default sinks/sources themselves and interfere with PipeWire's builtin "
"default device switching." }, "default device switching." },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -28,31 +28,19 @@
* \ref page_module_pulse_tunnel "libpipewire-module-pulse-tunnel" * \ref page_module_pulse_tunnel "libpipewire-module-pulse-tunnel"
*/ */
static const char *const pulse_module_options =
"server=<address> "
"sink=<name of the remote sink> "
"sink_name=<name for the local sink> "
"sink_properties=<properties for the local sink> "
"reconnect_interval_ms=<interval to try reconnects, 0 or omitted if disabled> "
"format=<sample format> "
"channels=<number of channels> "
"rate=<sample rate> "
"channel_map=<channel map> "
"latency_msec=<fixed latency in ms> "
"cookie=<cookie file path>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "server", "address", MODULE_ARG_MANDATORY }, { "server", "address", MODULE_ARG_MANDATORY, MODULE_TYPE_STRING, NULL },
{ "sink", "name of the remote sink", }, { "sink", "name of the remote sink", 0, MODULE_TYPE_STRING, NULL },
{ "sink_name", "name for the local sink", }, { "sink_name", "name for the local sink", 0, MODULE_TYPE_STRING, NULL },
{ "sink_properties", "properties for the local sink", }, { "sink_properties", "properties for the local sink", 0, MODULE_TYPE_PROPS, NULL },
{ "reconnect_interval_ms", "interval to try reconnects, 0 or omitted if disabled", }, { "reconnect_interval_ms", "interval to try reconnects, 0 or omitted if disabled", 0, MODULE_TYPE_MSEC, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "latency_msec", "fixed latency in ms", }, { "latency_msec", "fixed latency", 0, MODULE_TYPE_MSEC, NULL },
{ "cookie", "cookie file path", }, { "cookie", "cookie file path", 0, MODULE_TYPE_STRING, NULL },
{ NULL, } { NULL, }
}; };
@ -138,7 +126,6 @@ static int module_tunnel_sink_unload(struct module *module)
static const struct spa_dict_item module_tunnel_sink_info[] = { static const struct spa_dict_item module_tunnel_sink_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Create a network sink which connects to a remote PulseAudio server" }, { PW_KEY_MODULE_DESCRIPTION, "Create a network sink which connects to a remote PulseAudio server" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -28,31 +28,19 @@
* \ref page_module_pulse_tunnel "libpipewire-module-pulse-tunnel" * \ref page_module_pulse_tunnel "libpipewire-module-pulse-tunnel"
*/ */
static const char *const pulse_module_options =
"server=<address> "
"source=<name of the remote source> "
"source_name=<name for the local source> "
"source_properties=<properties for the local source> "
"reconnect_interval_ms=<interval to try reconnects, 0 or omitted if disabled> "
"format=<sample format> "
"channels=<number of channels> "
"rate=<sample rate> "
"channel_map=<channel map> "
"latency_msec=<fixed latency in ms> "
"cookie=<cookie file path>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "server", "address", MODULE_ARG_MANDATORY }, { "server", "address", MODULE_ARG_MANDATORY, MODULE_TYPE_STRING, NULL },
{ "source", "name of the remote source", }, { "source", "name of the remote source", 0, MODULE_TYPE_STRING, NULL },
{ "source_name", "name for the local source", }, { "source_name", "name for the local source", 0, MODULE_TYPE_STRING, NULL },
{ "source_properties", "properties for the local source", }, { "source_properties", "properties for the local source", 0, MODULE_TYPE_PROPS, NULL },
{ "reconnect_interval_ms", "interval to try reconnects, 0 or omitted if disabled", }, { "reconnect_interval_ms", "interval to try reconnects, 0 or omitted if disabled", 0, MODULE_TYPE_MSEC, NULL },
{ "format", "sample format", }, { "format", "sample format", 0, MODULE_TYPE_FORMAT, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "rate", "sample rate", }, { "rate", "sample rate", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "latency_msec", "fixed latency in ms", }, { "latency_msec", "fixed latency", 0, MODULE_TYPE_MSEC, NULL },
{ "cookie", "cookie file path", }, { "cookie", "cookie file path", 0, MODULE_TYPE_STRING, NULL },
{ NULL, } { NULL, }
}; };
@ -138,7 +126,6 @@ static int module_tunnel_source_unload(struct module *module)
static const struct spa_dict_item module_tunnel_source_info[] = { static const struct spa_dict_item module_tunnel_source_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Create a network source which connects to a remote PulseAudio server" }, { PW_KEY_MODULE_DESCRIPTION, "Create a network source which connects to a remote PulseAudio server" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -26,23 +26,15 @@
* \ref page_module_loopback "libpipewire-module-loopback" * \ref page_module_loopback "libpipewire-module-loopback"
*/ */
static const char *const pulse_module_options =
"sink_name=<name for the sink> "
"sink_properties=<properties for the sink> "
"master=<name of sink to filter> "
"channels=<number of channels> "
"channel_map=<channel map> "
"use_volume_sharing=<yes or no> "
"force_flat_volume=<yes or no> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "sink_name", "name for the sink", }, { "sink_name", "name for the sink", 0, MODULE_TYPE_STRING, "vsink" },
{ "sink_properties", "properties for the sink", }, { "sink_properties", "properties for the sink", 0, MODULE_TYPE_PROPS, NULL },
{ "master", "name of sink to filter", }, { "master", "name of sink to filter", 0, MODULE_TYPE_STRING, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "use_volume_sharing", "yes or no", }, { "use_volume_sharing", "share volume with master", 0, MODULE_TYPE_BOOL, NULL },
{ "force_flat_volume", "yes or no", }, { "force_flat_volume", "force flat volume", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -137,7 +129,6 @@ static int module_virtual_sink_unload(struct module *module)
static const struct spa_dict_item module_virtual_sink_info[] = { static const struct spa_dict_item module_virtual_sink_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "Virtual sink" }, { PW_KEY_MODULE_DESCRIPTION, "Virtual sink" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -27,25 +27,16 @@
* \ref page_module_loopback "libpipewire-module-loopback" * \ref page_module_loopback "libpipewire-module-loopback"
*/ */
static const char *const pulse_module_options =
"source_name=<name for the source> "
"source_properties=<properties for the source> "
"master=<name of source to filter> "
"uplink_sink=<name> (optional)"
"channels=<number of channels> "
"channel_map=<channel map> "
"use_volume_sharing=<yes or no> "
"force_flat_volume=<yes or no> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "source_name", "name for the source", }, { "source_name", "name for the source", 0, MODULE_TYPE_STRING, "vsource" },
{ "source_properties", "properties for the source", }, { "source_properties", "properties for the source", 0, MODULE_TYPE_PROPS, NULL },
{ "master", "name of source to filter", }, { "master", "name of source to filter", 0, MODULE_TYPE_STRING, NULL },
{ "uplink_sink", "name", }, { "uplink_sink", "name", 0, MODULE_TYPE_STRING, NULL },
{ "channels", "number of channels", }, { "channels", "number of channels", 0, MODULE_TYPE_INT, NULL },
{ "channel_map", "channel map", }, { "channel_map", "channel map", 0, MODULE_TYPE_CHMAP, NULL },
{ "use_volume_sharing", "yes or no", }, { "use_volume_sharing", "share volume with master", 0, MODULE_TYPE_BOOL, NULL },
{ "force_flat_volume", "yes or no", }, { "force_flat_volume", "force flat volume", 0, MODULE_TYPE_BOOL, NULL },
{ NULL, } { NULL, }
}; };
@ -140,7 +131,6 @@ static int module_virtual_source_unload(struct module *module)
static const struct spa_dict_item module_virtual_source_info[] = { static const struct spa_dict_item module_virtual_source_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" }, { PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" },
{ PW_KEY_MODULE_DESCRIPTION, "Loopback from source to sink" }, { PW_KEY_MODULE_DESCRIPTION, "Loopback from source to sink" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -23,17 +23,12 @@
* \ref page_module_x11_bell "libpipewire-module-x11-bell" * \ref page_module_x11_bell "libpipewire-module-x11-bell"
*/ */
static const char *const pulse_module_options =
"sink=<sink to connect to> "
"sample=<the sample to play> "
"display=<X11 display> "
"xauthority=<X11 Authority>";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "sink", "sink to connect to", }, { "sink", "sink to connect to", 0, MODULE_TYPE_STRING, NULL },
{ "sample", "the sample to play", }, { "sample", "the sample to play", 0, MODULE_TYPE_STRING, NULL },
{ "display", "X11 display", }, { "display", "X11 display", 0, MODULE_TYPE_STRING, NULL },
{ "xauthority", "X11 Authority", }, { "xauthority", "X11 Authority", 0, MODULE_TYPE_STRING, NULL },
{ NULL, } { NULL, }
}; };
@ -125,7 +120,6 @@ static int module_x11_bell_prepare(struct module * const module)
static const struct spa_dict_item module_x11_bell_info[] = { static const struct spa_dict_item module_x11_bell_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ PW_KEY_MODULE_DESCRIPTION, "X11 bell interceptor" }, { PW_KEY_MODULE_DESCRIPTION, "X11 bell interceptor" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };

View file

@ -25,11 +25,9 @@
* \ref page_module_zeroconf_discover "libpipewire-module-zeroconf-discover" * \ref page_module_zeroconf_discover "libpipewire-module-zeroconf-discover"
*/ */
static const char *const pulse_module_options =
"latency_msec=<fixed latency in ms> ";
static const struct module_args valid_args[] = { static const struct module_args valid_args[] = {
{ "latency_msec", "fixed latency in ms", }, { "latency_msec", "fixed latency", 0, MODULE_TYPE_MSEC, NULL },
{ NULL, } { NULL, }
}; };
@ -109,7 +107,6 @@ static int module_zeroconf_discover_unload(struct module *module)
static const struct spa_dict_item module_zeroconf_discover_info[] = { static const struct spa_dict_item module_zeroconf_discover_info[] = {
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.con>" }, { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.con>" },
{ PW_KEY_MODULE_DESCRIPTION, "mDNS/DNS-SD Service Discovery" }, { PW_KEY_MODULE_DESCRIPTION, "mDNS/DNS-SD Service Discovery" },
{ PW_KEY_MODULE_USAGE, pulse_module_options },
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION }, { PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
}; };