pw-reserve
Reserve audio or video device nodes
TLDR
Reserve a device (currently only supports audio devices)
Monitor a device instead of reserving it
Display help
SYNOPSIS
pw-reserve [options]
PARAMETERS
-h | --help
Show help options.
The name to reserve. It will be the name of the port.
The name can have the form type.device.something. type is one of audio, video. device is the device node like alsa_input.usb-Audio_dev or v4l2_input.usb-Cam. something is a free form suffix.
The number of ports to reserve. For audio, it is the number of channels.
DESCRIPTION
The pw-reserve command is a tool for reserving specific ports for PipeWire streams. This can be useful in scenarios where you need to ensure that certain applications or services have dedicated ports available for their audio or video streams, preventing conflicts and ensuring reliable operation. It allows specifying the port name and the number of ports to reserve. This reservation prevents other PipeWire clients from using these ports, ensuring exclusive access for the intended application or service. The command essentially interacts with the PipeWire session manager to manage port allocation. It's particularly useful when dealing with hardware devices or applications that require a fixed and known port configuration. Understanding the PipeWire graph and how streams are routed is beneficial when using pw-reserve. Incorrect usage can potentially lead to audio/video issues, therefore caution is advised.
CAVEATS
Incorrect usage or reserving an excessive number of ports can lead to resource exhaustion and may negatively impact overall system performance. Ensure you have a good understanding of your application's port requirements before using pw-reserve.
EXAMPLES
To reserve 2 audio ports with the name "audio.alsa_input.usb-Audio_dev.mic":
pw-reserve audio.alsa_input.usb-Audio_dev.mic 2