mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
alsa-seq; use port_type to check port type
Don't use the capabilities for checking the port type.
This commit is contained in:
parent
4921c5e94b
commit
859e95126b
1 changed files with 3 additions and 3 deletions
|
|
@ -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,
|
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);
|
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;
|
SPA_PORT_CHANGE_MASK_PARAMS;
|
||||||
port->info = SPA_PORT_INFO_INIT();
|
port->info = SPA_PORT_INFO_INIT();
|
||||||
port->info.flags = SPA_PORT_FLAG_LIVE;
|
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->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_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);
|
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);
|
port = alloc_port(state, stream);
|
||||||
if (port == NULL)
|
if (port == NULL)
|
||||||
return;
|
return;
|
||||||
init_port(state, port, addr, caps);
|
init_port(state, port, addr, snd_seq_port_info_get_type(info));
|
||||||
} else if (port != NULL) {
|
} else if (port != NULL) {
|
||||||
if ((caps & stream->caps) != stream->caps) {
|
if ((caps & stream->caps) != stream->caps) {
|
||||||
spa_log_debug(state->log, "free port %d.%d", addr->client, addr->port);
|
spa_log_debug(state->log, "free port %d.%d", addr->client, addr->port);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue