From 9fb1b0235251c91a3790d0bb139b9905eef44e7e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 18 Dec 2020 16:28:56 +0100 Subject: [PATCH] acp: when we have a device with no port, go to the next device Fixes an issue where a device have no ports and then it would stop enumerating the ports of the other devices. --- spa/plugins/alsa/alsa-acp-device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spa/plugins/alsa/alsa-acp-device.c b/spa/plugins/alsa/alsa-acp-device.c index e07c52b0e..ca906f8ef 100644 --- a/spa/plugins/alsa/alsa-acp-device.c +++ b/spa/plugins/alsa/alsa-acp-device.c @@ -481,14 +481,12 @@ static int impl_enum_params(void *object, int seq, return 0; dev = card->devices[result.index]; - if (SPA_FLAG_IS_SET(dev->flags, ACP_DEVICE_ACTIVE)) + if (SPA_FLAG_IS_SET(dev->flags, ACP_DEVICE_ACTIVE) && + (p = find_port_for_device(card, dev)) != NULL) break; result.index++; } - p = find_port_for_device(card, dev); - if (p == NULL) - return 0; result.next = result.index + 1; param = build_route(&b, id, p, dev, card->active_profile_index); if (param == NULL)