pulse-server: implement more valid_args on modules

If the valid_args is NULL, reject all arguments.
This commit is contained in:
Wim Taymans 2026-05-13 16:53:40 +02:00
parent 5fa87d67a1
commit 6d1c242433
26 changed files with 337 additions and 8 deletions

View file

@ -180,15 +180,14 @@ static bool find_key(const struct module_args args[], const char *key)
static int module_args_check(struct pw_properties *props, const struct module_args valid_args[])
{
if (valid_args != NULL) {
const struct spa_dict_item *it;
spa_dict_for_each(it, &props->dict) {
if (!find_key(valid_args, it->key)) {
pw_log_warn("'%s' is not a valid module argument key", it->key);
return -EINVAL;
}
const struct spa_dict_item *it;
spa_dict_for_each(it, &props->dict) {
if (valid_args == NULL || !find_key(valid_args, it->key)) {
pw_log_warn("'%s' is not a valid module argument key", it->key);
return -EINVAL;
}
}
if (valid_args != NULL) {
for (int i = 0; valid_args[i].key != NULL; i++)
if (SPA_FLAG_IS_SET(valid_args[i].flags, MODULE_ARG_MANDATORY) &&
pw_properties_get(props, valid_args[i].key) == NULL) {

View file

@ -44,6 +44,34 @@ static const char *const pulse_module_options =
"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[] = {
{ "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?", },
{ NULL, }
};
#define NAME "alsa-sink"
#define DEFAULT_DEVICE "default"
@ -244,6 +272,7 @@ static int module_alsa_sink_prepare(struct module * const module)
DEFINE_MODULE_INFO(module_alsa_sink) = {
.name = "module-alsa-sink",
.valid_args = valid_args,
.prepare = module_alsa_sink_prepare,
.load = module_alsa_sink_load,
.unload = module_alsa_sink_unload,

View file

@ -44,6 +44,34 @@ static const char *const pulse_module_options =
"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[] = {
{ "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?", },
{ NULL, }
};
#define NAME "alsa-source"
#define DEFAULT_DEVICE "default"
@ -244,6 +272,7 @@ static int module_alsa_source_prepare(struct module * const module)
DEFINE_MODULE_INFO(module_alsa_source) = {
.name = "module-alsa-source",
.valid_args = valid_args,
.prepare = module_alsa_source_prepare,
.load = module_alsa_source_load,
.unload = module_alsa_source_unload,

View file

@ -20,6 +20,11 @@
static const char *const pulse_module_options = "sink_name=<name of sink>";
static const struct module_args valid_args[] = {
{ "sink_name", "name of sink", },
{ NULL, }
};
#define NAME "always-sink"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -109,6 +114,7 @@ static int module_always_sink_prepare(struct module * const module)
DEFINE_MODULE_INFO(module_always_sink) = {
.name = "module-always-sink",
.load_once = true,
.valid_args = valid_args,
.prepare = module_always_sink_prepare,
.load = module_always_sink_load,
.unload = module_always_sink_unload,

View file

@ -38,6 +38,18 @@ static const char *const pulse_module_options =
"remix=<remix channels> "
"latency_compensate=<bool> ";
static const struct module_args valid_args[] = {
{ "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", },
{ NULL, }
};
#define NAME "combine-sink"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -347,6 +359,7 @@ out:
DEFINE_MODULE_INFO(module_combine_sink) = {
.name = "module-combine-sink",
.valid_args = valid_args,
.prepare = module_combine_sink_prepare,
.load = module_combine_sink_load,
.unload = module_combine_sink_unload,

View file

@ -22,6 +22,13 @@ static const char *const pulse_module_options =
"on_hotplug=<When new device becomes available, recheck streams?> "
"on_rescue=<When device becomes unavailable, recheck streams?>";
static const struct module_args valid_args[] = {
{ "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?", },
{ NULL, }
};
#define NAME "device-manager"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -56,6 +63,7 @@ static int module_device_manager_load(struct module *module)
DEFINE_MODULE_INFO(module_device_manager) = {
.name = "module-device-manager",
.load_once = true,
.valid_args = valid_args,
.prepare = module_device_manager_prepare,
.load = module_device_manager_load,
.properties = &SPA_DICT_INIT_ARRAY(module_device_manager_info),

View file

@ -63,6 +63,14 @@ static const char *const pulse_module_options =
"restore_muted=<Save/restore muted states?> "
"restore_formats=<Save/restore saved formats?>";
static const struct module_args valid_args[] = {
{ "restore_port", "Save/restore port?", },
{ "restore_volume", "Save/restore volumes?", },
{ "restore_muted", "Save/restore muted states?", },
{ "restore_formats", "Save/restore saved formats?", },
{ NULL, }
};
#define NAME "device-restore"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -486,6 +494,7 @@ static int module_device_restore_unload(struct module *module)
DEFINE_MODULE_INFO(module_device_restore) = {
.name = "module-device-restore",
.load_once = true,
.valid_args = valid_args,
.prepare = module_device_restore_prepare,
.load = module_device_restore_load,
.unload = module_device_restore_unload,

View file

@ -38,6 +38,22 @@ static const char *const pulse_module_options =
"channel_map=<channel map> "
"aec_method=<implementation to use> "
"aec_args=<parameters for the AEC engine> ";
static const struct module_args valid_args[] = {
{ "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", },
{ NULL, }
};
#if 0
/* These are not implemented because they don't
* really make sense in the PipeWire context */
@ -377,6 +393,7 @@ out:
DEFINE_MODULE_INFO(module_echo_cancel) = {
.name = "module-echo-cancel",
.valid_args = valid_args,
.prepare = module_echo_cancel_prepare,
.load = module_echo_cancel_load,
.unload = module_echo_cancel_unload,

View file

@ -38,6 +38,22 @@ static const char *const pulse_module_options =
"source_channel_map=<channel map> "
"connect=<connect ports?>";
static const struct module_args valid_args[] = {
{ "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?", },
{ NULL, }
};
#define NAME "jackdbus-detect"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -223,6 +239,7 @@ out:
DEFINE_MODULE_INFO(module_jackdbus_detect) = {
.name = "module-jackdbus-detect",
.load_once = false,
.valid_args = valid_args,
.prepare = module_jackdbus_detect_prepare,
.load = module_jackdbus_detect_load,
.unload = module_jackdbus_detect_unload,

View file

@ -39,6 +39,21 @@ static const char *const pulse_module_options =
"sink_dont_move=<boolean> "
"remix=<remix channels?> ";
static const struct module_args valid_args[] = {
{ "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?", },
{ NULL, }
};
#define NAME "loopback"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -232,6 +247,7 @@ out:
DEFINE_MODULE_INFO(module_loopback) = {
.name = "module-loopback",
.valid_args = valid_args,
.prepare = module_loopback_prepare,
.load = module_loopback_load,
.unload = module_loopback_unload,

View file

@ -25,6 +25,13 @@ static const char *const pulse_module_options =
"listen=<address to listen on> "
"auth-anonymous=<don't check for cookies?>";
static const struct module_args valid_args[] = {
{ "port", "TCP port number", },
{ "listen", "address to listen on", },
{ "auth-anonymous", "don't check for cookies?", },
{ NULL, }
};
#define NAME "protocol-tcp"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -116,6 +123,7 @@ static int module_native_protocol_tcp_prepare(struct module * const module)
DEFINE_MODULE_INFO(module_native_protocol_tcp) = {
.name = "module-native-protocol-tcp",
.valid_args = valid_args,
.prepare = module_native_protocol_tcp_prepare,
.load = module_native_protocol_tcp_load,
.unload = module_native_protocol_tcp_unload,

View file

@ -26,6 +26,16 @@ static const char *const pulse_module_options =
"channels=<number of channels> "
"channel_map=<channel map>";
static const struct module_args valid_args[] = {
{ "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", },
{ NULL, }
};
#define NAME "null-sink"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -204,6 +214,7 @@ static int module_null_sink_prepare(struct module * const module)
DEFINE_MODULE_INFO(module_null_sink) = {
.name = "module-null-sink",
.valid_args = valid_args,
.prepare = module_null_sink_prepare,
.load = module_null_sink_load,
.unload = module_null_sink_unload,

View file

@ -40,6 +40,18 @@ static const char *const pulse_module_options =
"channel_map=<channel map> "
"use_system_clock_for_timing=<yes or no> ";
static const struct module_args valid_args[] = {
{ "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", },
{ NULL, }
};
#define NAME "pipe-sink"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -194,6 +206,7 @@ out:
DEFINE_MODULE_INFO(module_pipe_sink) = {
.name = "module-pipe-sink",
.valid_args = valid_args,
.prepare = module_pipe_sink_prepare,
.load = module_pipe_sink_load,
.unload = module_pipe_sink_unload,

View file

@ -39,6 +39,17 @@ static const char *const pulse_module_options =
"channels=<number of channels> "
"channel_map=<channel map> ";
static const struct module_args valid_args[] = {
{ "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", },
{ NULL, }
};
#define NAME "pipe-source"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -191,6 +202,7 @@ out:
DEFINE_MODULE_INFO(module_pipe_source) = {
.name = "module-pipe-source",
.valid_args = valid_args,
.prepare = module_pipe_source_prepare,
.load = module_pipe_source_load,
.unload = module_pipe_source_unload,

View file

@ -24,6 +24,11 @@
* \ref page_module_raop_discover "libpipewire-module-raop-discover"
*/
static const struct module_args valid_args[] = {
{ "latency_msec", "latency in ms", },
{ NULL, }
};
#define NAME "raop-discover"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -121,6 +126,7 @@ static int module_raop_discover_prepare(struct module * const module)
DEFINE_MODULE_INFO(module_raop_discover) = {
.name = "module-raop-discover",
.load_once = true,
.valid_args = valid_args,
.prepare = module_raop_discover_prepare,
.load = module_raop_discover_load,
.unload = module_raop_discover_unload,

View file

@ -37,6 +37,20 @@ static const char *const pulse_module_options =
"resample_method=<resampler> "
"remix=<remix channels?>";
static const struct module_args valid_args[] = {
{ "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?", },
{ NULL, }
};
#define NAME "remap-sink"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -225,6 +239,7 @@ out:
DEFINE_MODULE_INFO(module_remap_sink) = {
.name = "module-remap-sink",
.valid_args = valid_args,
.prepare = module_remap_sink_prepare,
.load = module_remap_sink_load,
.unload = module_remap_sink_unload,

View file

@ -37,6 +37,20 @@ static const char *const pulse_module_options =
"resample_method=<resampler> "
"remix=<remix channels?>";
static const struct module_args valid_args[] = {
{ "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?", },
{ NULL, }
};
#define NAME "remap-sink"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -232,6 +246,7 @@ out:
DEFINE_MODULE_INFO(module_remap_source) = {
.name = "module-remap-source",
.valid_args = valid_args,
.prepare = module_remap_source_prepare,
.load = module_remap_source_load,
.unload = module_remap_source_unload,

View file

@ -36,6 +36,20 @@ static const char *const pulse_module_options =
"port=<TCP port number> "
"listen=<address to listen on>";
static const struct module_args valid_args[] = {
{ "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", },
{ NULL, }
};
#define NAME "simple-protocol-tcp"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -202,6 +216,7 @@ out:
DEFINE_MODULE_INFO(module_simple_protocol_tcp) = {
.name = "module-simple-protocol-tcp",
.valid_args = valid_args,
.prepare = module_simple_protocol_tcp_prepare,
.load = module_simple_protocol_tcp_load,
.unload = module_simple_protocol_tcp_unload,

View file

@ -26,6 +26,16 @@ static const char *const pulse_module_options =
"on_rescue=<This argument is obsolete, please remove it from configuration> "
"fallback_table=<filename>";
static const struct module_args valid_args[] = {
{ "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", },
{ NULL, }
};
#define NAME "stream-restore"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -462,6 +472,7 @@ static int module_stream_restore_unload(struct module *module)
DEFINE_MODULE_INFO(module_stream_restore) = {
.name = "module-stream-restore",
.valid_args = valid_args,
.load_once = true,
.prepare = module_stream_restore_prepare,
.load = module_stream_restore_load,

View file

@ -31,6 +31,13 @@ static const char *const pulse_module_options =
"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[] = {
{ "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", },
{ NULL, }
};
#define NAME "switch-on-connect"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -293,6 +300,7 @@ static int module_switch_on_connect_prepare(struct module * const module)
DEFINE_MODULE_INFO(module_switch_on_connect) = {
.name = "module-switch-on-connect",
.valid_args = valid_args,
.load_once = true,
.prepare = module_switch_on_connect_prepare,
.load = module_switch_on_connect_load,

View file

@ -40,6 +40,21 @@ static const char *const pulse_module_options =
"latency_msec=<fixed latency in ms> "
"cookie=<cookie file path>";
static const struct module_args valid_args[] = {
{ "server", "address", MODULE_ARG_MANDATORY },
{ "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", },
{ NULL, }
};
#define NAME "tunnel-sink"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -204,6 +219,7 @@ out:
DEFINE_MODULE_INFO(module_tunnel_sink) = {
.name = "module-tunnel-sink",
.valid_args = valid_args,
.prepare = module_tunnel_sink_prepare,
.load = module_tunnel_sink_load,
.unload = module_tunnel_sink_unload,

View file

@ -40,6 +40,21 @@ static const char *const pulse_module_options =
"latency_msec=<fixed latency in ms> "
"cookie=<cookie file path>";
static const struct module_args valid_args[] = {
{ "server", "address", MODULE_ARG_MANDATORY },
{ "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", },
{ NULL, }
};
#define NAME "tunnel-source"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -201,6 +216,7 @@ out:
DEFINE_MODULE_INFO(module_tunnel_source) = {
.name = "module-tunnel-source",
.valid_args = valid_args,
.prepare = module_tunnel_source_prepare,
.load = module_tunnel_source_load,
.unload = module_tunnel_source_unload,

View file

@ -34,6 +34,17 @@ static const char *const pulse_module_options =
"use_volume_sharing=<yes or no> "
"force_flat_volume=<yes or no> ";
static const struct module_args valid_args[] = {
{ "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", },
{ NULL, }
};
#define NAME "virtual-sink"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -192,6 +203,7 @@ out:
DEFINE_MODULE_INFO(module_virtual_sink) = {
.name = "module-virtual-sink",
.valid_args = valid_args,
.prepare = module_virtual_sink_prepare,
.load = module_virtual_sink_load,
.unload = module_virtual_sink_unload,

View file

@ -36,6 +36,18 @@ static const char *const pulse_module_options =
"use_volume_sharing=<yes or no> "
"force_flat_volume=<yes or no> ";
static const struct module_args valid_args[] = {
{ "source_name", "name for the source", },
{ "source_properties", "properties for the source", },
{ "master", "name of source to filter", },
{ "uplink_sink", "name", },
{ "channels", "number of channels", },
{ "channel_map", "channel map", },
{ "use_volume_sharing", "yes or no", },
{ "force_flat_volume", "yes or no", },
{ NULL, }
};
#define NAME "virtual-source"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -201,6 +213,7 @@ out:
DEFINE_MODULE_INFO(module_virtual_source) = {
.name = "module-virtual-source",
.valid_args = valid_args,
.prepare = module_virtual_source_prepare,
.load = module_virtual_source_load,
.unload = module_virtual_source_unload,

View file

@ -28,6 +28,14 @@ static const char *const pulse_module_options =
"display=<X11 display> "
"xauthority=<X11 Authority>";
static const struct module_args valid_args[] = {
{ "sink", "sink to connect to", },
{ "sample", "the sample to play", },
{ "display", "X11 display", },
{ "xauthority", "X11 Authority", },
{ NULL, }
};
#define NAME "x11-bell"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -122,6 +130,7 @@ static const struct spa_dict_item module_x11_bell_info[] = {
DEFINE_MODULE_INFO(module_x11_bell) = {
.name = "module-x11-bell",
.valid_args = valid_args,
.prepare = module_x11_bell_prepare,
.load = module_x11_bell_load,
.unload = module_x11_bell_unload,

View file

@ -27,6 +27,11 @@
static const char *const pulse_module_options =
"latency_msec=<fixed latency in ms> ";
static const struct module_args valid_args[] = {
{ "latency_msec", "fixed latency in ms", },
{ NULL, }
};
#define NAME "zeroconf-discover"
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
@ -123,6 +128,7 @@ static int module_zeroconf_discover_prepare(struct module * const module)
DEFINE_MODULE_INFO(module_zeroconf_discover) = {
.name = "module-zeroconf-discover",
.valid_args = valid_args,
.load_once = true,
.prepare = module_zeroconf_discover_prepare,
.load = module_zeroconf_discover_load,