bluez5: Fix node creation depending on device role

We can't determine which remote endpoint or device the
SelectConfiguration() call is associated with. For LE Audio BAP, as this
method is called only for the Initiator we set the whole instance as a
Central/Initiator.
This flag is unset on BAP media endpoint removal.
This commit is contained in:
Frédéric Danis 2022-07-22 11:01:18 +02:00 committed by Wim Taymans
parent e0c79959fc
commit cd50188787
5 changed files with 46 additions and 11 deletions

View file

@ -1582,6 +1582,9 @@ impl_init(const struct spa_handle_factory *factory,
}
this->use_duplex_source = this->is_duplex || (this->codec->duplex_codec != NULL);
if (this->codec->bap)
this->is_input = this->transport->bap_initiator;
if (this->codec->init_props != NULL)
this->codec_props = this->codec->init_props(this->codec,
this->is_duplex ? 0 : MEDIA_CODEC_FLAG_SINK,