From c199611c8962bf20c825f1d7f5f91ce2ac7387f4 Mon Sep 17 00:00:00 2001 From: Duncan Overbruck Date: Wed, 20 Dec 2023 10:15:06 +0100 Subject: [PATCH] pulse-server: fill in active port for monitors The monitor sources also list the port of the sink and so the active port needs to be collected as well so it doesn't fall back to the first port (which might not be available). --- src/modules/module-protocol-pulse/collect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/module-protocol-pulse/collect.c b/src/modules/module-protocol-pulse/collect.c index bf05122f2..189008019 100644 --- a/src/modules/module-protocol-pulse/collect.c +++ b/src/modules/module-protocol-pulse/collect.c @@ -234,7 +234,7 @@ static void collect_device_info(struct pw_manager_object *device, struct pw_mana { struct pw_manager_param *p; - if (card && !monitor) { + if (card) { spa_list_for_each(p, &card->param_list, link) { uint32_t index, dev; struct spa_pod *props; @@ -251,7 +251,7 @@ static void collect_device_info(struct pw_manager_object *device, struct pw_mana if (dev != dev_info->device) continue; dev_info->active_port = index; - if (props) { + if (props && !monitor) { volume_parse_param(props, &dev_info->volume_info, monitor); dev_info->have_volume = true; }