Message ID | e8a45a4796f024825318996d68d1b92ebcc9b04a.1699652713.git.pav@iki.fi |
---|---|
State | New |
Headers | show |
Series | [BlueZ,v2] bap: handle state transitions with old_state == new_state | expand |
Hello: This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Fri, 10 Nov 2023 23:48:19 +0200 you wrote: > ASCS allows transitions from Codec/QoS Configured back to the same > state. > > E.g. NRF5340_AUDIO devkit starts in the config(1) state, which is > allowed (only Config QoS, Release, Enable, Receiver Stop Ready > transition are client-only). In this case, as client, we do Config Codec > ourselves and end up with config(1)->config(1) transition. We currently > ignore that event, so QoS won't be setup and transports won't be > created. > > [...] Here is the summary with links: - [BlueZ,v2] bap: handle state transitions with old_state == new_state https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=8b035b70f379 You are awesome, thank you!
diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index b74498c4c..780dff412 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -1887,7 +1887,11 @@ static void bap_state(struct bt_bap_stream *stream, uint8_t old_state, bt_bap_stream_statestr(old_state), old_state, bt_bap_stream_statestr(new_state), new_state); - if (new_state == old_state) + /* Ignore transitions back to same state (ASCS allows some of these). + * Of these we need to handle only the config->config case, which will + * occur when reconfiguring the codec from initial config state. + */ + if (new_state == old_state && new_state != BT_BAP_STREAM_STATE_CONFIG) return; ep = bap_find_ep_by_stream(data, stream);