Skip to content

wpctl: add clear-default option to clear default configured node names

Julian Bouzas requested to merge julian/wireplumber:wpctl-improvements into master

This MR adds 2 new APIs in module-default-nodes-api:

  • get-default-configured-node-name: which returns the default configured node name
  • set-default-configured-node-name: which sets the default configured node name. If NULL is passed as a name, the API will clear the default configured node name.

Apart from this, the wpctl tool has been improved in several ways:

  • A new clear-default sub-command has been added to clear the default configured node names. If no arguments are passed, all the default configured node names will be cleared, otherwise, only the default configured node Id will be cleared (0 for Audio/Sink, 1 for Audio/Source and 2 for Video/Source). It uses the new set-default-configured-node-name API from module-default-nodes-api.
  • The status sub-command has been improved to show the default configured node names in a new "Settings" section. It uses the new get-default-configured-node-name API from module-default-nodes-api.
  • The set-default sub-command has been refactored to use the new set-default-configured-node-name API from module-default-nodes-api, avoiding dealing with JSON formats.

Merge request reports