-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Bluetooth: CCP: Server: Add support for get UCI #79642
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
bd06274 to
a3d25a7
Compare
33653a0 to
59bce07
Compare
36c53fd to
f7802fb
Compare
f7802fb to
31faaae
Compare
31faaae to
5fc82e3
Compare
5fc82e3 to
d543dfa
Compare
d543dfa to
4f44cdb
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 7 out of 10 changed files in this pull request and generated 1 comment.
Files not reviewed (3)
- doc/connectivity/bluetooth/shell/audio/ccp.rst: Language not supported
- subsys/bluetooth/audio/Kconfig.ccp: Language not supported
- subsys/bluetooth/audio/Kconfig.tbs: Language not supported
Comments suppressed due to low confidence (1)
subsys/bluetooth/audio/shell/ccp_call_control_server.c:112
- [nitpick] There is an inconsistency between the configuration macros used; consider using CONFIG_BT_CCP_CALL_CONTROL_SERVER_BEARER_COUNT instead of CONFIG_BT_TBS_BEARER_COUNT for index validation to avoid potential mismatches.
index = validate_and_get_index(sh, argv[1]);
| return -ENOEXEC; | ||
| } | ||
|
|
||
| if (index > CONFIG_BT_TBS_BEARER_COUNT) { |
Copilot
AI
Apr 7, 2025
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.
Index validation should use '>= CONFIG_BT_TBS_BEARER_COUNT' to correctly ensure that the index is within the bounds of the bearer array.
| if (index > CONFIG_BT_TBS_BEARER_COUNT) { | |
| if (index >= CONFIG_BT_TBS_BEARER_COUNT) { |
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 7 out of 10 changed files in this pull request and generated 1 comment.
Files not reviewed (3)
- doc/connectivity/bluetooth/shell/audio/ccp.rst: Language not supported
- subsys/bluetooth/audio/Kconfig.ccp: Language not supported
- subsys/bluetooth/audio/Kconfig.tbs: Language not supported
include/zephyr/bluetooth/audio/ccp.h
Outdated
| * @param[out] uci Pointer that will be updated to be the bearer uci. | ||
| * | ||
| * @retval 0 Success | ||
| * @retval -EINVAL @p bearer or @p name is NULL |
Copilot
AI
Apr 7, 2025
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.
In the documentation for bt_ccp_call_control_server_get_bearer_uci, the parameter is mistakenly referred to as 'name' instead of 'uci'. Consider updating it to '@p uci' for clarity.
| * @retval -EINVAL @p bearer or @p name is NULL | |
| * @retval -EINVAL @p bearer or @p uci is NULL |
ae12b78 to
1ea821c
Compare
6451a00 to
d20e96b
Compare
89c3a4e to
d3b066d
Compare
d3b066d to
d746313
Compare
d746313 to
8495dd1
Compare
8495dd1 to
8842ad5
Compare
|
|
||
| .. code-block:: console | ||
| uart:~$ ccp_call_control_server get_bearer_uci |
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.
Do we normally assume that omitting index will default the index to 0, instead of the whole list?
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.
For now at least we always default to bearer[0] if no index is provided.
Do you think it makes more sense to perform the action on all bearers if index is omitted?
It could work, especially for all "get/read" operations, but probably doesn't make sense for "set/write" operations.
It's following the implementation of the TBS shell, but we can change that no problem.
We can also just modify it so that index is a mandatory argument
fredrikdanebjer
left a comment
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.
LGTM. I had one minor comment you are free to answer before I approve :)
Add support for getting the UCI. For now the UCI will be duplicated by the TBS implementation, but will be optimizied in the future so only one copy of the UCI exists. Signed-off-by: Emil Gydesen <[email protected]>
8842ad5 to
87a7198
Compare
|



Add support for getting the UCI.
For now the UCI will be duplicated by the TBS
implementation, but will be optimizied in the future
so only one copy of the UCI exists.