From 859e95126b4916e7ff4d9123f2d6fd6c9f12f318 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 2 Nov 2021 14:57:36 +0100 Subject: [PATCH] alsa-seq; use port_type to check port type Don't use the capabilities for checking the port type. --- spa/plugins/alsa/alsa-seq-bridge.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spa/plugins/alsa/alsa-seq-bridge.c b/spa/plugins/alsa/alsa-seq-bridge.c index f23745e7a..ad03adae8 100644 --- a/spa/plugins/alsa/alsa-seq-bridge.c +++ b/spa/plugins/alsa/alsa-seq-bridge.c @@ -398,7 +398,7 @@ static void free_port(struct seq_state *state, struct seq_stream *stream, struct } static void init_port(struct seq_state *state, struct seq_port *port, const snd_seq_addr_t *addr, - unsigned int caps) + unsigned int type) { enum spa_direction reverse = SPA_DIRECTION_REVERSE(port->direction); @@ -408,7 +408,7 @@ static void init_port(struct seq_state *state, struct seq_port *port, const snd_ SPA_PORT_CHANGE_MASK_PARAMS; port->info = SPA_PORT_INFO_INIT(); port->info.flags = SPA_PORT_FLAG_LIVE; - if (caps & (SND_SEQ_PORT_TYPE_HARDWARE|SND_SEQ_PORT_TYPE_PORT|SND_SEQ_PORT_TYPE_SPECIFIC)) + if (type & (SND_SEQ_PORT_TYPE_HARDWARE|SND_SEQ_PORT_TYPE_PORT|SND_SEQ_PORT_TYPE_SPECIFIC)) port->info.flags |= SPA_PORT_FLAG_PHYSICAL | SPA_PORT_FLAG_TERMINAL; port->params[PORT_EnumFormat] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ); port->params[PORT_Meta] = SPA_PARAM_INFO(SPA_PARAM_Meta, SPA_PARAM_INFO_READ); @@ -448,7 +448,7 @@ static void update_stream_port(struct seq_state *state, struct seq_stream *strea port = alloc_port(state, stream); if (port == NULL) return; - init_port(state, port, addr, caps); + init_port(state, port, addr, snd_seq_port_info_get_type(info)); } else if (port != NULL) { if ((caps & stream->caps) != stream->caps) { spa_log_debug(state->log, "free port %d.%d", addr->client, addr->port);