diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c index 6b12f77b0..c4bfb2012 100644 --- a/src/modules/module-loopback.c +++ b/src/modules/module-loopback.c @@ -103,7 +103,7 @@ * } * ] *\endcode - + * * ## See also * * `pw-loopback` : a tools thats loads the loopback module with given parameters. diff --git a/src/modules/module-protocol-pulse.c b/src/modules/module-protocol-pulse.c index 140babfb7..f638880a8 100644 --- a/src/modules/module-protocol-pulse.c +++ b/src/modules/module-protocol-pulse.c @@ -39,6 +39,19 @@ #include "module-protocol-pulse/pulse-server.h" /** \page page_module_protocol_pulse PipeWire Module: Protocol Pulse + * + * This module implements a complete PulseAudio server on top of + * PipeWire. This is only the server implementation, client are expected + * to use the original PulseAudio client library. This provides a + * high level of compatibility with existing applications; in fact, + * all usual PulseAudio tools such as pavucontrol, pactl, pamon, paplay + * should continue to work as they did before. + * + * This module is usually loaded as part of a standalone pipewire process, + * called pipewire-pulse, with the pipewire-pulse.conf config file. + * + * The pulse server implements a sample cache that is otherwise not + * available in PipeWire. * * ## Module Options * diff --git a/src/modules/module-protocol-simple.c b/src/modules/module-protocol-simple.c index 51dc17221..309b2729c 100644 --- a/src/modules/module-protocol-simple.c +++ b/src/modules/module-protocol-simple.c @@ -50,6 +50,77 @@ #include /** \page page_module_protocol_simple PipeWire Module: Protocol Simple + * + * The simple protocol provides a bidirectional audio stream on a network + * socket. + * + * It is meant to be used with the `simple protocol player` app, available on + * Android to play and record a stream. + * + * Each client that connects will create a capture and/or playback stream, + * depending on the configuration options. + * + * ## Module Options + * + * - `capture`: boolean if capture is enabled. This will create a capture stream + * for each connected client. + * - `playback`: boolean if playback is enabled. This will create a playback + * stream for each connected client. + * - `capture.node`: an optional node id or name to use for capture. + * - `playback.node`: an optional node id or name to use for playback. + * - `server.address = []`: an array of server addresses to listen on as + * tcp::. + * + * ## General options + * + * Options with well-known behavior. + * + * - \ref PW_KEY_REMOTE_NAME + * - \ref PW_KEY_AUDIO_RATE + * - \ref PW_KEY_AUDIO_FORMAT + * - \ref PW_KEY_AUDIO_CHANNELS + * - \ref SPA_KEY_AUDIO_POSITION + * - \ref PW_KEY_NODE_LATENCY + * - \ref PW_KEY_NODE_RATE + * - \ref PW_KEY_STREAM_CAPTURE_SINK + * + * By default the server will work with stereo 16 bits samples at 44.1KHz. + * + * ## Example configuration + * + *\code{.unparsed} + * context.modules = [ + * { name = libpipewire-module-protocol-simple + * args = { + * # Provide capture stream, clients can capture data from PipeWire + * capture = true + * # + * # Provide playback stream, client can send data to PipeWire for playback + * playback = true + * # + * # The node name or id to use for capture. + * #capture.node = null + * # + * # To make the capture stream capture the monitor ports + * #stream.capture.sink = false + * # + * # The node name or id to use for playback. + * #playback.node = null + * # + * #audio.rate = 44100 + * #audio.format = S16 + * #audio.channels = 2 + * #audio.position = [ FL FR ] + * # + * # The addresses this server listens on for new + * # client connections + * server.address = [ + * "tcp:4711" + * ] + * } + * } + * ] + *\endcode */ #define NAME "protocol-simple" @@ -70,6 +141,7 @@ PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME); #define MODULE_USAGE "[ capture= ] " \ "[ playback= ] " \ + "[ remote.name= ] " \ "[ node.latency= ] " \ "[ node.rate=<1/rate, default:1/"DEFAULT_RATE"> ] " \ "[ capture.node= [ stream.capture.sink=true ]] " \ @@ -507,6 +579,8 @@ on_connect(void *data, int fd, uint32_t mask) props = pw_properties_new( PW_KEY_CLIENT_API, "protocol-simple", + PW_KEY_REMOTE_NAME, + pw_properties_get(impl->props, PW_KEY_REMOTE_NAME), NULL); if (props == NULL) goto error;