diff --git a/spa/plugins/audiomixer/mixer-dsp.c b/spa/plugins/audiomixer/mixer-dsp.c index f8aa11745..d36fc852c 100644 --- a/spa/plugins/audiomixer/mixer-dsp.c +++ b/spa/plugins/audiomixer/mixer-dsp.c @@ -263,7 +263,8 @@ static int impl_node_add_port(void *object, enum spa_direction direction, uint32 this->last_port = port_id + 1; port->valid = true; - spa_log_debug(this->log, NAME " %p: add port %d %d", this, port_id, this->last_port); + spa_log_debug(this->log, NAME " %p: add port %d:%d %d", this, + direction, port_id, this->last_port); emit_port_info(this, port, true); return 0; @@ -297,7 +298,8 @@ impl_node_remove_port(void *object, enum spa_direction direction, uint32_t port_ this->last_port = i + 1; } - spa_log_debug(this->log, NAME " %p: remove port %d %d", this, port_id, this->last_port); + spa_log_debug(this->log, NAME " %p: remove port %d:%d %d", this, + direction, port_id, this->last_port); spa_node_emit_port_info(&this->hooks, direction, port_id, NULL); @@ -566,13 +568,14 @@ impl_node_port_use_buffers(void *object, uint32_t i; spa_return_val_if_fail(this != NULL, -EINVAL); + + spa_log_debug(this->log, NAME " %p: use %d buffers on port %d:%d", + this, n_buffers, direction, port_id); + spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); port = GET_PORT(this, direction, port_id); - spa_log_debug(this->log, NAME " %p: use buffers %d on port %d:%d", - this, n_buffers, direction, port_id); - spa_return_val_if_fail(port->have_format, -EIO); clear_buffers(this, port); @@ -597,8 +600,8 @@ impl_node_port_use_buffers(void *object, if (direction == SPA_DIRECTION_OUTPUT) queue_buffer(this, port, b); - spa_log_debug(this->log, NAME " %p: port %d.%d buffer %d n_data:%d data:%p maxsize:%d", - this, i, direction, port_id, + spa_log_debug(this->log, NAME " %p: port %d:%d buffer:%d n_data:%d data:%p maxsize:%d", + this, direction, port_id, i, buffers[i]->n_datas, d[0].data, d[0].maxsize); } port->n_buffers = n_buffers; @@ -615,13 +618,14 @@ impl_node_port_set_io(void *object, struct port *port; spa_return_val_if_fail(this != NULL, -EINVAL); - spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); - - port = GET_PORT(this, direction, port_id); spa_log_debug(this->log, NAME " %p: port %d:%d io %d %p/%zd", this, direction, port_id, id, data, size); + spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); + + port = GET_PORT(this, direction, port_id); + switch (id) { case SPA_IO_Buffers: port->io = data; diff --git a/src/pipewire/impl-port.c b/src/pipewire/impl-port.c index 9f680da87..a4acc6ca1 100644 --- a/src/pipewire/impl-port.c +++ b/src/pipewire/impl-port.c @@ -595,7 +595,7 @@ static int setup_mixer(struct pw_impl_port *port, const struct spa_pod *param) return res; } - pw_log_debug("mix node %p", iface); + pw_log_debug("mix node handle:%p iface:%p", handle, iface); pw_impl_port_set_mix(port, (struct spa_node*)iface, PW_IMPL_PORT_MIX_FLAG_MULTI | PW_IMPL_PORT_MIX_FLAG_NEGOTIATE);