From 5f38562d38e72fa76f8dfe7e1bd1ead853f82ce8 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 9 Sep 2020 13:57:33 +0200 Subject: [PATCH] acp: remove active_port_index It is not clear if the port index is in the card or device port array and it doesn't work when many ports are active. So simply iterate the device ports and find the ones with the active flag set. --- spa/plugins/alsa/acp/acp.c | 1 - spa/plugins/alsa/acp/acp.h | 1 - 2 files changed, 2 deletions(-) diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c index 41867975a..b9332443f 100644 --- a/spa/plugins/alsa/acp/acp.c +++ b/spa/plugins/alsa/acp/acp.c @@ -960,7 +960,6 @@ static int device_disable(pa_card *impl, pa_alsa_mapping *mapping, pa_alsa_devic if (dev->active_port) { dev->active_port->port.flags &= ~ACP_PORT_ACTIVE; dev->active_port = NULL; - dev->device.active_port_index = ACP_INVALID_INDEX; } return 0; } diff --git a/spa/plugins/alsa/acp/acp.h b/spa/plugins/alsa/acp/acp.h index ecd48e75c..65fa13c86 100644 --- a/spa/plugins/alsa/acp/acp.h +++ b/spa/plugins/alsa/acp/acp.h @@ -204,7 +204,6 @@ struct acp_device { float volume_step; uint32_t n_ports; - uint32_t active_port_index; struct acp_port **ports; };