Skip to content

Conversation

Thalley
Copy link
Contributor

@Thalley Thalley commented Aug 25, 2025

Add shell commands for the CAP handover procedures.

@Thalley Thalley force-pushed the cap_handover_shell branch 2 times, most recently from 2ab528f to 6d01140 Compare August 28, 2025 12:39
@Thalley Thalley force-pushed the cap_handover_shell branch 7 times, most recently from c378195 to bf08811 Compare September 17, 2025 11:22
@Thalley
Copy link
Contributor Author

Thalley commented Sep 17, 2025

Depends on #96143

Add shell command for unicast to broadcast for the CAP handover
procedures.

Signed-off-by: Emil Gydesen <[email protected]>
Add documentation and example usage of the unicast_to_broadcast
CAP handover command.

Signed-off-by: Emil Gydesen <[email protected]>
0-init some non-static global variables to avoid
issues with uninitialized values. Also modify
the printing of the broadcast sources found slightly.

Signed-off-by: Emil Gydesen <[email protected]>
Refactor how receive states are handled in the BAP
shell.

The scan delegator's receive states are not available from
the broadcast sink, and the broadcast sink makes sure to
properly set the pa_sync object in the receive state
struct.
The receive states are now also using the BAP service data to
identity the receive state when using PAST.

The broadcast assistant will now cache data from a remote device,
and makes it available to e.g. CAP.
Additionally if there is a broadcast source, we cache the values
neccesary to identity if a remote receive state represents our
local broadcast source.

Signed-off-by: Emil Gydesen <[email protected]>
Implement the shell command for handing over broadcast to
unicast. The command supports various configurations.

It is currently limited to cases with
- 1 connection and multiple streams
- Multiple connections and 1 stream
- Equal amount of streams and connections

Cases with e.g. 3 connections and 2 streams,
or vice versa, are not support given the complexity
of these cases.

Signed-off-by: Emil Gydesen <[email protected]>
Add documentation and example usage of the broadcast_to_unicast
CAP handover command.

Signed-off-by: Emil Gydesen <[email protected]>
Instead of defining the same arguments in all 3 CAP files,
we declare them in audio.h and initiate them in either
the initiator or commander, depending on their use.

The reason for this change, is that the CAP Handover API
require several of the parameter to be globally/statically
allocated, and cannot just rely on stack allocated parameters.
By doing this, we can use the same argument among the
CAP shell modules, while keeping the memory usage down.
This has the additional postive effect that we do not allocate
some of these arrays, which can be quite larger, on the stack.

Signed-off-by: Emil Gydesen <[email protected]>
@Thalley Thalley force-pushed the cap_handover_shell branch from ddbc15a to 384e23e Compare October 7, 2025 08:50
Copy link

sonarqubecloud bot commented Oct 7, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
E Reliability Rating on New Code (required ≥ C)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant