adapter: only clear the NEED_CONFIGURE flag when mode != none

As long as we are in the 'none' PortConfig mode, we set the NEED_CONFIGURE
flag.

This fixes early start in audioadpter nodes because PortConfig is set to
none at init time and this used to clear the NEED_CONFIGURE flag, which
would start the node before the session manager could to a PortConfig
and cause a -22 error.
This commit is contained in:
Wim Taymans 2025-05-27 15:38:51 +02:00
parent 548fa0ec48
commit e126f9bcbf
2 changed files with 5 additions and 4 deletions

View file

@ -770,7 +770,8 @@ static int reconfigure_mode(struct impl *this, enum spa_param_port_config_mode m
link_io(this);
this->info.change_mask |= SPA_NODE_CHANGE_MASK_FLAGS | SPA_NODE_CHANGE_MASK_PARAMS;
SPA_FLAG_CLEAR(this->info.flags, SPA_NODE_FLAG_NEED_CONFIGURE);
SPA_FLAG_UPDATE(this->info.flags, SPA_NODE_FLAG_NEED_CONFIGURE,
this->mode == SPA_PARAM_PORT_CONFIG_MODE_none);
SPA_FLAG_UPDATE(this->info.flags, SPA_NODE_FLAG_ASYNC,
this->async && this->follower == this->target);
this->params[IDX_Props].user++;