diff --git a/spa/plugins/alsa/alsa-seq-bridge.c b/spa/plugins/alsa/alsa-seq-bridge.c index 513b52600..57db2eda5 100644 --- a/spa/plugins/alsa/alsa-seq-bridge.c +++ b/spa/plugins/alsa/alsa-seq-bridge.c @@ -384,13 +384,16 @@ static struct seq_port *alloc_port(struct seq_state *state, struct seq_stream *s static void free_port(struct seq_state *state, struct seq_stream *stream, struct seq_port *port) { + port->valid = false; + if (port->id + 1 == stream->last_port) { int i; for (i = stream->last_port - 1; i >= 0; i--) - if (!stream->ports[i].valid) + if (stream->ports[i].valid) break; stream->last_port = i + 1; } + spa_node_emit_port_info(&state->hooks, port->direction, port->id, NULL); spa_zero(*port); diff --git a/spa/plugins/alsa/alsa-seq.c b/spa/plugins/alsa/alsa-seq.c index fa04e8e67..006fce2a7 100644 --- a/spa/plugins/alsa/alsa-seq.c +++ b/spa/plugins/alsa/alsa-seq.c @@ -247,6 +247,11 @@ static void alsa_seq_on_sys(struct spa_source *source) addr->client, addr->port); state->port_info(state->port_info_data, addr, NULL); break; + default: + spa_log_info(state->log, "unhandled event %d: %d:%d", + ev->type, addr->client, addr->port); + break; + } snd_seq_free_event(ev); }