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

@ -174,7 +174,9 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option>
<p><opt>set-default-sink</opt> <arg>SINK</arg></p>
<optdesc><p>Make the specified sink (identified by its symbolic name or numerical index) the default sink.</p></optdesc>
<optdesc><p>Make the specified sink (identified by its symbolic name or numerical index) the default sink.
Use the special name \@NONE@ to unset the user defined default sink. This will make pulseaudio return to the default
sink selection based on sink priority.</p></optdesc>
</option>
<option>
@ -189,7 +191,9 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option>
<p><opt>set-default-source</opt> <arg>SOURCE</arg></p>
<optdesc><p>Make the specified source (identified by its symbolic name or numerical index) the default source.</p></optdesc>
<optdesc><p>Make the specified source (identified by its symbolic name or numerical index) the default source.
Use the special name \@NONE@ to unset the user defined default source. This will make pulseaudio return to the default
source selection based on source priority.</p></optdesc>
</option>
<option>