Skip to content

Conversation

@Thalley
Copy link
Contributor

@Thalley Thalley commented Oct 10, 2024

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.

@Thalley Thalley force-pushed the ccp_server_uci branch 3 times, most recently from bd06274 to a3d25a7 Compare October 22, 2024 13:09
@Thalley Thalley force-pushed the ccp_server_uci branch 2 times, most recently from 33653a0 to 59bce07 Compare November 12, 2024 10:56
@Thalley Thalley force-pushed the ccp_server_uci branch 3 times, most recently from 36c53fd to f7802fb Compare November 22, 2024 21:10
@Thalley Thalley self-assigned this Nov 26, 2024
@Thalley Thalley requested a review from Copilot April 7, 2025 08:49
Copy link

Copilot AI left a 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) {
Copy link

Copilot AI Apr 7, 2025

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.

Suggested change
if (index > CONFIG_BT_TBS_BEARER_COUNT) {
if (index >= CONFIG_BT_TBS_BEARER_COUNT) {

Copilot uses AI. Check for mistakes.
@Thalley Thalley requested a review from Copilot April 7, 2025 09:04
Copy link

Copilot AI left a 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

* @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
Copy link

Copilot AI Apr 7, 2025

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.

Suggested change
* @retval -EINVAL @p bearer or @p name is NULL
* @retval -EINVAL @p bearer or @p uci is NULL

Copilot uses AI. Check for mistakes.
@Thalley Thalley force-pushed the ccp_server_uci branch 2 times, most recently from ae12b78 to 1ea821c Compare April 9, 2025 13:58
@Thalley Thalley force-pushed the ccp_server_uci branch 2 times, most recently from 89c3a4e to d3b066d Compare September 8, 2025 07:59
@Thalley Thalley marked this pull request as ready for review September 8, 2025 07:59

.. code-block:: console
uart:~$ ccp_call_control_server get_bearer_uci
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

@fredrikdanebjer fredrikdanebjer left a 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]>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Bluetooth Audio area: Bluetooth area: Tests Issues related to a particular existing or missing test

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

4 participants