1
Fork 0

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).
This commit is contained in:
Duncan Overbruck 2023-12-20 10:15:06 +01:00 committed by Wim Taymans
parent 67fde171a2
commit c199611c89
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}