pactl, pacmd: Allow to unset the configured default sink or source

Currently there is no way to unset the default sink or source once it was
configured manually by the user.
This patch introduces the special name @NONE@, which can be used with the pacmd
or pactl set-default-sink and set-default-source commands to unset the user
configured default. When the default is unset, pulseaudio will return to the
standard default sink or source selection mechanism based on priority.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/785>
This commit is contained in:
Georg Chini 2023-03-20 21:35:10 +01:00 committed by PulseAudio Marge Bot
parent 25bfdb3ab8
commit 86e9c90128
4 changed files with 35 additions and 15 deletions

View file

@ -143,8 +143,10 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<p><opt>set-default-sink|set-default-source</opt> <arg>index|name</arg></p>
<optdesc><p>Make a sink (resp. source) the default. You may specify the
sink (resp. source) by its index in the sink (resp. source) list or by its
name.</p><p>Note that defaults may be overridden by various policy modules
or by specific stream configurations.</p></optdesc>
name. Use the special name \@NONE@ to unset the user defined default sink or
source. In this case, pulseaudio will return to the default sink or source
selection based on priority.</p><p>Note that defaults may be overridden by
various policy modules or by specific stream configurations.</p></optdesc>
</option>
<option>