Message ID | 20241106154917.64459-1-luiz.dentz@gmail.com |
---|---|
State | New |
Headers | show |
Series | [BlueZ,v1,1/3] sink: Fix transitioning to BTD_SERVICE_STATE_DISCONNECTED on idle | expand |
Hello: This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Wed, 6 Nov 2024 10:49:15 -0500 you wrote: > From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> > > If the stream transition to AVDTP_STATE_IDLE it means the stream has > been disconnected, not the session, therefore > btd_service_disconnecting_complete shall not be called otherwise it may > trigger the policy plugin to disconnect AVRCP in cases like codec > reconfiguration. > > [...] Here is the summary with links: - [BlueZ,v1,1/3] sink: Fix transitioning to BTD_SERVICE_STATE_DISCONNECTED on idle https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=469a75ae182a - [BlueZ,v1,2/3] source: Fix transitioning to BTD_SERVICE_STATE_DISCONNECTED on idle https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2aade568ce77 - [BlueZ,v1,3/3] a2dp: Don't wait to reconfigure https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=aa118e965b02 You are awesome, thank you!
diff --git a/profiles/audio/sink.c b/profiles/audio/sink.c index 77f195436032..7e02bcca1a01 100644 --- a/profiles/audio/sink.c +++ b/profiles/audio/sink.c @@ -110,6 +110,7 @@ static void avdtp_state_callback(struct btd_device *dev, switch (new_state) { case AVDTP_SESSION_STATE_DISCONNECTED: sink_set_state(sink, SINK_STATE_DISCONNECTED); + btd_service_disconnecting_complete(sink->service, 0); break; case AVDTP_SESSION_STATE_CONNECTING: sink_set_state(sink, SINK_STATE_CONNECTING); @@ -135,8 +136,6 @@ static void stream_state_changed(struct avdtp_stream *stream, switch (new_state) { case AVDTP_STATE_IDLE: - btd_service_disconnecting_complete(sink->service, 0); - if (sink->connect_id > 0) { a2dp_cancel(sink->connect_id); sink->connect_id = 0;
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> If the stream transition to AVDTP_STATE_IDLE it means the stream has been disconnected, not the session, therefore btd_service_disconnecting_complete shall not be called otherwise it may trigger the policy plugin to disconnect AVRCP in cases like codec reconfiguration. Fixes: https://github.com/bluez/bluez/issues/1003 --- profiles/audio/sink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)