From d7f32af545e95a84410ef57ec0b4fb2130a092a0 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 12 Jun 2026 11:59:36 +0200 Subject: [PATCH] keys: add follow-suspend passive mode to keys docs Add the missing follow-suspend values for the passive modes. Make the string to passive mode conversion a bit more explicit about true and false. --- src/pipewire/keys.h | 9 ++++++--- src/pipewire/private.h | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pipewire/keys.h b/src/pipewire/keys.h index e5c38fd8c..c348aed9f 100644 --- a/src/pipewire/keys.h +++ b/src/pipewire/keys.h @@ -214,8 +214,10 @@ extern "C" { * object */ #define PW_KEY_NODE_PASSIVE "node.passive" /**< indicate that a node wants passive links * on output/input/all ports. A ','-separated - * array of values "out"/"out-follow"/"in"/ - * "in-follow"/"true"/"follow" is accepted. */ + * array of values "out"/"out-follow"/ + * "out-follow-suspend"/"in"/"in-follow"/ + * "in-follow-suspend"/"true"/"follow"/ + * "follow-suspend" is accepted. */ #define PW_KEY_NODE_LINK_GROUP "node.link-group" /**< the node is internally linked to * nodes with the same link-group. Can be an * array of group names. */ @@ -250,7 +252,8 @@ extern "C" { #define PW_KEY_PORT_EXTRA "port.extra" /**< api specific extra port info, API name * should be prefixed. "jack:flags:56" */ #define PW_KEY_PORT_PASSIVE "port.passive" /**< the ports wants passive links. Values - * can be "true" or "follow". Since 0.3.67 */ + * can be "true"/"follow"/"follow-suspend". + * Since 0.3.67 */ #define PW_KEY_PORT_IGNORE_LATENCY "port.ignore-latency" /**< latency ignored by peers, since 0.3.71 */ #define PW_KEY_PORT_GROUP "port.group" /**< the port group of the port 1.2.0 */ #define PW_KEY_PORT_EXCLUSIVE "port.exclusive" /**< link port only once 1.6.0 */ diff --git a/src/pipewire/private.h b/src/pipewire/private.h index 556cb4702..bb810fd31 100644 --- a/src/pipewire/private.h +++ b/src/pipewire/private.h @@ -1011,7 +1011,9 @@ static inline uint32_t passive_mode_from_string(const char *str) return PASSIVE_MODE_FOLLOW; else if (spa_streq(str, "follow-suspend")) return PASSIVE_MODE_FOLLOW_SUSPEND; - return spa_atob(str); + else if (spa_atob(str)) + return PASSIVE_MODE_TRUE; + return PASSIVE_MODE_FALSE; } struct pw_control_link {