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.
This commit is contained in:
Wim Taymans 2020-09-09 13:57:33 +02:00
parent c8700b2e4b
commit 5f38562d38
2 changed files with 0 additions and 2 deletions

View file

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

View file

@ -204,7 +204,6 @@ struct acp_device {
float volume_step;
uint32_t n_ports;
uint32_t active_port_index;
struct acp_port **ports;
};