* [PATCH BlueZ bluez v4] shared/bap: Add stream state check in stream_disable
@ 2025-07-07 6:00 Yang Li via B4 Relay
2025-07-07 7:13 ` [BlueZ,bluez,v4] " bluez.test.bot
2025-07-07 14:50 ` [PATCH BlueZ bluez v4] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Yang Li via B4 Relay @ 2025-07-07 6:00 UTC (permalink / raw)
To: Linux Bluetooth; +Cc: Yang Li
From: Yang Li <yang.li@amlogic.com>
Add BT_BAP_STREAM_STATE_CONFIG state check so that stream_disable() is
a no-op when the stream is in CONFIG state. This prevents unexpected state
transitions or redundant operations during cleanup.
Error trace:
bluetoothd[2313]: src/shared/bap.c:stream_io_disconnected() stream 0x1f9fc20 io disconnected
bluetoothd[2313]: src/shared/bap.c:bap_ucast_set_state() stream 0x1f9fc20 dir 0x01: releasing -> config
bluetoothd[2313]: src/shared/bap.c:stream_notify() stream 0x1f9fc20 state 1
bluetoothd[2313]: profiles/audio/transport.c:bap_state_changed() stream 0x1f9fc20: releasing(6) -> config(1)
...
bluetoothd[2313]: src/shared/bap.c:stream_disable() stream 0x1f9fc20
bluetoothd[2313]: src/shared/bap.c:bap_ucast_set_state() stream 0x1f9fc20 dir 0x01: config -> qos
Signed-off-by: Yang Li <yang.li@amlogic.com>
---
Changes in v4:
- Optimizing the code and update the commit message
- Link to v3: https://patch.msgid.link/20250702-bap_for_big_sync_lost-v3-1-d314b60abf7a@amlogic.com
Changes in v3:
- Optimizing the code
- Link to v2: https://patch.msgid.link/20250630-bap_for_big_sync_lost-v2-0-1491b608cda5@amlogic.com
bap for big sync lost
To: Linux Bluetooth <linux-bluetooth@vger.kernel.org>
Signed-off-by: Yang Li <yang.li@amlogic.com>
Changes in v2:
- Add state check in stream_disable.
- Add type check in stream_io_disconnected.
- Link to v1: https://patch.msgid.link/20250624-bap_for_big_sync_lost-v1-1-0df90a0f55d0@amlogic.com
---
src/shared/bap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/shared/bap.c b/src/shared/bap.c
index 40e1c974b..2d4f003c7 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2124,6 +2124,7 @@ static unsigned int bap_ucast_start(struct bt_bap_stream *stream,
static uint8_t stream_disable(struct bt_bap_stream *stream, struct iovec *rsp)
{
if (!stream || stream->ep->state == BT_BAP_STREAM_STATE_QOS ||
+ stream->ep->state == BT_BAP_STREAM_STATE_CONFIG ||
stream->ep->state == BT_BAP_STREAM_STATE_IDLE)
return 0;
---
base-commit: 55a6763cde8a2309fd23a96479ee4cf2fc23a442
change-id: 20250624-bap_for_big_sync_lost-63476c679dbb
Best regards,
--
Yang Li <yang.li@amlogic.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ,bluez,v4] shared/bap: Add stream state check in stream_disable
2025-07-07 6:00 [PATCH BlueZ bluez v4] shared/bap: Add stream state check in stream_disable Yang Li via B4 Relay
@ 2025-07-07 7:13 ` bluez.test.bot
2025-07-07 14:50 ` [PATCH BlueZ bluez v4] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-07-07 7:13 UTC (permalink / raw)
To: linux-bluetooth, yang.li
[-- Attachment #1: Type: text/plain, Size: 1864 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=979547
---Test result---
Test Summary:
CheckPatch PENDING 0.23 seconds
GitLint PENDING 0.23 seconds
BuildEll PASS 19.85 seconds
BluezMake PASS 2477.76 seconds
MakeCheck PASS 19.97 seconds
MakeDistcheck PASS 182.43 seconds
CheckValgrind PASS 232.70 seconds
CheckSmatch WARNING 303.74 seconds
bluezmakeextell PASS 127.88 seconds
IncrementalBuild PENDING 0.28 seconds
ScanBuild PASS 907.80 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/shared/bap.c:317:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:317:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:317:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structures
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ bluez v4] shared/bap: Add stream state check in stream_disable
2025-07-07 6:00 [PATCH BlueZ bluez v4] shared/bap: Add stream state check in stream_disable Yang Li via B4 Relay
2025-07-07 7:13 ` [BlueZ,bluez,v4] " bluez.test.bot
@ 2025-07-07 14:50 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2025-07-07 14:50 UTC (permalink / raw)
To: Yang Li; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Mon, 07 Jul 2025 14:00:36 +0800 you wrote:
> From: Yang Li <yang.li@amlogic.com>
>
> Add BT_BAP_STREAM_STATE_CONFIG state check so that stream_disable() is
> a no-op when the stream is in CONFIG state. This prevents unexpected state
> transitions or redundant operations during cleanup.
>
> Error trace:
> bluetoothd[2313]: src/shared/bap.c:stream_io_disconnected() stream 0x1f9fc20 io disconnected
> bluetoothd[2313]: src/shared/bap.c:bap_ucast_set_state() stream 0x1f9fc20 dir 0x01: releasing -> config
> bluetoothd[2313]: src/shared/bap.c:stream_notify() stream 0x1f9fc20 state 1
> bluetoothd[2313]: profiles/audio/transport.c:bap_state_changed() stream 0x1f9fc20: releasing(6) -> config(1)
> ...
> bluetoothd[2313]: src/shared/bap.c:stream_disable() stream 0x1f9fc20
> bluetoothd[2313]: src/shared/bap.c:bap_ucast_set_state() stream 0x1f9fc20 dir 0x01: config -> qos
>
> [...]
Here is the summary with links:
- [BlueZ,bluez,v4] shared/bap: Add stream state check in stream_disable
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=168377c0c8e8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-07 14:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-07 6:00 [PATCH BlueZ bluez v4] shared/bap: Add stream state check in stream_disable Yang Li via B4 Relay
2025-07-07 7:13 ` [BlueZ,bluez,v4] " bluez.test.bot
2025-07-07 14:50 ` [PATCH BlueZ bluez v4] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox