From 07633f2146e2aa66fad8edb2b3e8495d813a0834 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 9 Jan 2023 11:06:37 +0100 Subject: [PATCH] context: rename a method Rename suspend_driver -> reconfigure_driver because that is more like what it does. --- src/pipewire/context.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 39f224a60..2301d34ad 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -933,7 +933,7 @@ static inline uint32_t *get_rates(struct pw_context *context, uint32_t *def, uin return s->clock_rates; } } -static void suspend_driver(struct pw_context *context, struct pw_impl_node *n) +static void reconfigure_driver(struct pw_context *context, struct pw_impl_node *n) { struct pw_impl_node *s; @@ -1199,7 +1199,7 @@ again: } if (target_rate != current_rate) { - bool do_suspend = false; + bool do_reconfigure = false; /* we doing a rate switch */ pw_log_info("(%s-%u) state:%s new rate:%u->%u", n->name, n->info.id, @@ -1209,13 +1209,13 @@ again: if (force_rate) { if (settings->clock_rate_update_mode == CLOCK_RATE_UPDATE_MODE_HARD) - do_suspend = true; + do_reconfigure = true; } else { if (n->info.state >= PW_NODE_STATE_SUSPENDED) - do_suspend = true; + do_reconfigure = true; } - if (do_suspend) - suspend_driver(context, n); + if (do_reconfigure) + reconfigure_driver(context, n); # /* we're setting the pending rate. This will become the new * current rate in the next iteration of the graph. */ n->current_rate = SPA_FRACTION(1, target_rate); @@ -1223,7 +1223,7 @@ again: n->current_pending = true; current_rate = target_rate; /* we might be suspended now and the links need to be prepared again */ - if (do_suspend) + if (do_reconfigure) goto again; } -- GitLab