summaryrefslogtreecommitdiff
blob: 5827c25c9afc4e148df0cecfa7b006b1c67bb7cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/19b02003b051878e46e93584a0eb60420a38abe1

From 19b02003b051878e46e93584a0eb60420a38abe1 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 16 Oct 2023 16:18:18 +0200
Subject: [PATCH] context: relax quantum change conditions

We can change the quantum of a node while it is running just fine so
relax the check.

This was copied from the rate change logic, which is avoided while the
node is running.

This fixes a regression in dynamic quantum switching.

Fixes #3574
---
 src/pipewire/context.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/pipewire/context.c b/src/pipewire/context.c
index 1f5eaf296..e5ac4076a 100644
--- a/src/pipewire/context.c
+++ b/src/pipewire/context.c
@@ -1473,9 +1473,7 @@ again:
 		}
 
 		current_quantum = n->target_quantum;
-		if (!restore_quantum &&
-		   (lock_quantum || need_resume || !running ||
-		    (!force_quantum && (n->info.state > PW_NODE_STATE_IDLE)))) {
+		if (!restore_quantum && (lock_quantum || need_resume || !running)) {
 			pw_log_debug("%p: keep quantum:%u restore:%u lock:%u resume:%u "
 					"running:%u force:%u state:%s", context,
 					current_quantum, restore_quantum, lock_quantum, need_resume,
-- 
GitLab