-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Bluetooth: CAP: Add cap_unicast_group API #86014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
f84f903
to
da10ddf
Compare
4a3d5d5
to
8d2a059
Compare
8d2a059
to
f2709a5
Compare
f2709a5
to
8e21d26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.
Files not reviewed (2)
- doc/releases/release-notes-4.2.rst: Language not supported
- tests/bluetooth/audio/cap_initiator/CMakeLists.txt: Language not supported
free(group_param->params[0].rx_param->stream); | ||
free(group_param->params[0].rx_param); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cleanup in the test fixture frees only the first parameter's allocations. If multiple stream parameters are allocated, this may lead to memory leaks. Consider iterating over all allocated stream parameters for proper deallocation.
free(group_param->params[0].rx_param->stream); | |
free(group_param->params[0].rx_param); | |
for (size_t i = 0; i < group_param->params_count; i++) { | |
free(group_param->params[i].rx_param->stream); | |
free(group_param->params[i].rx_param); | |
} |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is only a single call to calloc for these, so there should only be a single call to free for these
1f6a399
to
6407e31
Compare
Adds a new abstract struct for unicast group that is specific for CAP. The difference between this and the BAP unicast group, is that the parameters are CAP streams and thus ensuring that the streams in the group adhere to the additional requirements that CAP has on top of BAP. This also adds foreach functions for both CAP and BAP to allow users to iterate on the streams in the abstract groups. Various samples, modules and tests have been updated to use the CAP struct and API. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
6407e31
to
c2c95ed
Compare
Added 2 new functions to iterate on the streams in the BAP and CAP groups as well. Used by #85642 |
|
Adds a new abstract struct for unicast group that is specific for CAP. The difference between this and the BAP unicast group, is that the parameters are CAP streams and thus ensuring that the streams in the group adhere to the additional requirements that CAP has on top of BAP.
Various samples, modules and tests have been updated to use the CAP struct and API.