From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> If the old state was releasing there is no reason to call bt_bap_stream_release yet again when IO could not be created as that will likely create a loop situation when the remote stack caches the codec configuration. --- profiles/audio/bap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index c279b5b0e133..c530799915f3 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -1918,7 +1918,9 @@ static void bap_state(struct bt_bap_stream *stream, uint8_t old_state, bap_create_io(data, ep, stream, true); if (!ep->io) { error("Unable to create io"); - bt_bap_stream_release(stream, NULL, NULL); + if (old_state != BT_BAP_STREAM_STATE_RELEASING) + bt_bap_stream_release(stream, NULL, + NULL); return; } -- 2.43.0