Skip to content

Bluetooth: ascs: Add dynamic ASE registration #144728

Bluetooth: ascs: Add dynamic ASE registration

Bluetooth: ascs: Add dynamic ASE registration #144728

Triggered via pull request August 20, 2024 18:52
Status Failure
Total duration 2m 27s
Artifacts 1

compliance.yml

on: pull_request
Run compliance checks on patch series (PR)
2m 19s
Run compliance checks on patch series (PR)
Fit to window
Zoom out
Zoom in

Annotations

3 errors, 1 warning, and 10 notices
Run compliance checks on patch series (PR)
Process completed with exit code 2.
Run compliance checks on patch series (PR): Nits.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#coding-style for more details. Missing newline at end of 'samples/bluetooth/bap_unicast_server/prj.conf'. Check your text editor settings.
Run compliance checks on patch series (PR)
Process completed with exit code 1.
Run compliance checks on patch series (PR): ClangFormat.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#clang-format for more details. You may want to run clang-format on this change: - File:include/zephyr/bluetooth/audio/bap.h Line:1023 You may want to run clang-format on this change: -static struct bt_bap_unicast_server_register_param param = { - CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT -}; +static struct bt_bap_unicast_server_register_param param = {CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT}; File:samples/bluetooth/bap_unicast_server/src/main.c Line:473 You may want to run clang-format on this change: - CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT - }; + CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT}; File:samples/bluetooth/cap_acceptor/src/cap_acceptor_unicast.c Line:409 You may want to run clang-format on this change: -static struct bt_bap_stream streams[CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT]; +static struct bt_bap_stream + streams[CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT]; File:samples/bluetooth/hap_ha/src/bap_unicast_sr.c Line:34 You may want to run clang-format on this change: -static struct bt_bap_unicast_server_register_param param = { - CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT -}; +static struct bt_bap_unicast_server_register_param param = {CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT}; File:samples/bluetooth/hap_ha/src/bap_unicast_sr.c Line:324 You may want to run clang-format on this change: -static struct bt_bap_stream streams[CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT]; +static struct bt_bap_stream + streams[CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT]; File:samples/bluetooth/tmap_peripheral/src/bap_unicast_sr.c Line:35 You may want to run clang-format on this change: -static struct bt_bap_unicast_server_register_param param = { - CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT -}; +static struct bt_bap_unicast_server_register_param param = {CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT}; File:samples/bluetooth/tmap_peripheral/src/bap_unicast_sr.c Line:279 You may want to run clang-format on this change: -#define MAX_ASES_SESSIONS CONFIG_BT_MAX_CONN * \ - (CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + \ - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT) +#define MAX_ASES_SESSIONS \ + CONFIG_BT_MAX_CONN *(CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT) File:subsys/bluetooth/audio/ascs.c Line:60 You may want to run clang-format on this change: -#define ASE_DIR(_id) \ +#define ASE_DIR(_id) \ (_id > CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT ? BT_AUDIO_DIR_SOURCE : BT_AUDIO_DIR_SINK) -#define ASE_UUID(_id) \ +#define ASE_UUID(_id) \ (_id > CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT ? BT_UUID_ASCS_ASE_SRC : BT_UUID_ASCS_ASE_SNK) -#define ASE_COUNT (CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT) +#define ASE_COUNT (CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT) File:subsys/bluetooth/audio/ascs.c Line:75 You may want to run clang-format on this change: -#define BT_ASCS_ASE_SRC_DEFINE(_n, ...) BT_ASCS_ASE_DEFINE(BT_UUID_ASCS_ASE_SRC, (_n) + 1 + \ - CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT) - -#define BT_ASCS_CHR_ASE_CONTROL_POINT \ - BT_AUDIO_CHRC(BT_UUID_ASCS_ASE_CP, \ - BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP | BT_GATT_CHRC_NOTIFY, \ - BT_GATT_PERM_WRITE_ENCRYPT | BT_GATT_PERM_PREPARE_WRITE, \ - NULL, ascs_cp_write, NULL), \ - BT_AUDIO_CCC(ascs_cp_cfg_changed) +#define BT_ASCS_ASE_SRC_DEFINE(_n, ...) \ + BT_ASC
You may want to run clang-format on this change: include/zephyr/bluetooth/audio/bap.h#L1023
include/zephyr/bluetooth/audio/bap.h:1023 -
You may want to run clang-format on this change: samples/bluetooth/bap_unicast_server/src/main.c#L473
samples/bluetooth/bap_unicast_server/src/main.c:473 -static struct bt_bap_unicast_server_register_param param = { - CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT -}; +static struct bt_bap_unicast_server_register_param param = {CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT};
You may want to run clang-format on this change: samples/bluetooth/cap_acceptor/src/cap_acceptor_unicast.c#L409
samples/bluetooth/cap_acceptor/src/cap_acceptor_unicast.c:409 - CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT - }; + CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT};
You may want to run clang-format on this change: samples/bluetooth/hap_ha/src/bap_unicast_sr.c#L34
samples/bluetooth/hap_ha/src/bap_unicast_sr.c:34 -static struct bt_bap_stream streams[CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT]; +static struct bt_bap_stream + streams[CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT];
You may want to run clang-format on this change: samples/bluetooth/hap_ha/src/bap_unicast_sr.c#L324
samples/bluetooth/hap_ha/src/bap_unicast_sr.c:324 -static struct bt_bap_unicast_server_register_param param = { - CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT -}; +static struct bt_bap_unicast_server_register_param param = {CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT};
You may want to run clang-format on this change: samples/bluetooth/tmap_peripheral/src/bap_unicast_sr.c#L35
samples/bluetooth/tmap_peripheral/src/bap_unicast_sr.c:35 -static struct bt_bap_stream streams[CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT]; +static struct bt_bap_stream + streams[CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT];
You may want to run clang-format on this change: samples/bluetooth/tmap_peripheral/src/bap_unicast_sr.c#L279
samples/bluetooth/tmap_peripheral/src/bap_unicast_sr.c:279 -static struct bt_bap_unicast_server_register_param param = { - CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT -}; +static struct bt_bap_unicast_server_register_param param = {CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT};
You may want to run clang-format on this change: subsys/bluetooth/audio/ascs.c#L60
subsys/bluetooth/audio/ascs.c:60 -#define MAX_ASES_SESSIONS CONFIG_BT_MAX_CONN * \ - (CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + \ - CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT) +#define MAX_ASES_SESSIONS \ + CONFIG_BT_MAX_CONN *(CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT)
You may want to run clang-format on this change: subsys/bluetooth/audio/ascs.c#L75
subsys/bluetooth/audio/ascs.c:75 -#define ASE_DIR(_id) \ +#define ASE_DIR(_id) \ (_id > CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT ? BT_AUDIO_DIR_SOURCE : BT_AUDIO_DIR_SINK) -#define ASE_UUID(_id) \ +#define ASE_UUID(_id) \ (_id > CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT ? BT_UUID_ASCS_ASE_SRC : BT_UUID_ASCS_ASE_SNK) -#define ASE_COUNT (CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT) +#define ASE_COUNT (CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT)
You may want to run clang-format on this change: subsys/bluetooth/audio/ascs.c#L3117
subsys/bluetooth/audio/ascs.c:3117 -#define BT_ASCS_ASE_SRC_DEFINE(_n, ...) BT_ASCS_ASE_DEFINE(BT_UUID_ASCS_ASE_SRC, (_n) + 1 + \ - CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT) - -#define BT_ASCS_CHR_ASE_CONTROL_POINT \ - BT_AUDIO_CHRC(BT_UUID_ASCS_ASE_CP, \ - BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP | BT_GATT_CHRC_NOTIFY, \ - BT_GATT_PERM_WRITE_ENCRYPT | BT_GATT_PERM_PREPARE_WRITE, \ - NULL, ascs_cp_write, NULL), \ - BT_AUDIO_CCC(ascs_cp_cfg_changed) +#define BT_ASCS_ASE_SRC_DEFINE(_n, ...) \ + BT_ASCS_ASE_DEFINE(BT_UUID_ASCS_ASE_SRC, (_n) + 1 + CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT) + +#define BT_ASCS_CHR_ASE_CONTROL_POINT \ + BT_AUDIO_CHRC(BT_UUID_ASCS_ASE_CP, \ + BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP | BT_GATT_CHRC_NOTIFY, \ + BT_GATT_PERM_WRITE_ENCRYPT | BT_GATT_PERM_PREPARE_WRITE, NULL, \ + ascs_cp_write, NULL), \ + BT_AUDIO_CCC(ascs_cp_cfg_changed) #if CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT > 0 -#define BT_ASCS_ASE_SINKS \ - LISTIFY(CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, BT_ASCS_ASE_SNK_DEFINE, (,)), +#define BT_ASCS_ASE_SINKS LISTIFY(CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, BT_ASCS_ASE_SNK_DEFINE, (, )), #else #define BT_ASCS_ASE_SINKS #endif /* CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT > 0 */ #if CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT > 0 -#define BT_ASCS_ASE_SOURCES \ - LISTIFY(CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT, BT_ASCS_ASE_SRC_DEFINE, (,)), +#define BT_ASCS_ASE_SOURCES LISTIFY(CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT, BT_ASCS_ASE_SRC_DEFINE, (, )), #else #define BT_ASCS_ASE_SOURCES #endif /* CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT > 0 */ -#define BT_ASCS_SERVICE_DEFINITION() { \ - BT_GATT_PRIMARY_SERVICE(BT_UUID_ASCS), \ - BT_AUDIO_CHRC(BT_UUID_ASCS_ASE_CP, \ - BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP | BT_GATT_CHRC_NOTIFY, \ - BT_GATT_PERM_WRITE_ENCRYPT | BT_GATT_PERM_PREPARE_WRITE, \ - NULL, ascs_cp_write, NULL), \ - BT_AUDIO_CCC(ascs_cp_cfg_changed), \ - BT_ASCS_ASE_SINKS \ - BT_ASCS_ASE_SOURCES \ - } +#define BT_ASCS_SERVICE_DEFINITION() \ + {BT_GATT_PRIMARY_SERVICE(BT_UUID_ASCS), \ + BT_AUDIO_CHRC(BT_UUID_ASCS_ASE_CP, \ + BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP | BT_GATT_CHRC_NOTIFY, \ + BT_GATT_PERM_WRITE_ENCRYPT | BT_GATT_PERM_PREPARE_WRITE, NULL, \ + ascs_cp_write, NULL), \ + BT_AUDIO_CCC(ascs_cp_cfg_changed), BT_ASCS_ASE_SINKS BT_ASCS_ASE_SOURCES}

Artifacts

Produced during runtime
Name Size
compliance.xml
2.72 KB