diff --git a/.github/test_build_apps_syscfg.yml b/.github/test_build_apps_syscfg.yml index 9722b51c73..169dfa7235 100644 --- a/.github/test_build_apps_syscfg.yml +++ b/.github/test_build_apps_syscfg.yml @@ -27,6 +27,7 @@ syscfg.vals: BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS: 1 BLE_ISO: 1 BLE_ISO_TEST: 1 + BLE_ISO_BROADCASTER: 1 BLE_HCI_VS: 1 BLE_POWER_CONTROL: 1 BLE_CONN_SUBRATING: 1 diff --git a/nimble/controller/src/ble_ll.c b/nimble/controller/src/ble_ll.c index fd96f7d625..620e1b1be7 100644 --- a/nimble/controller/src/ble_ll.c +++ b/nimble/controller/src/ble_ll.c @@ -1925,12 +1925,6 @@ ble_ll_init(void) features |= BLE_LL_FEAT_SCA_UPDATE; #endif -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) - features |= BLE_LL_FEAT_CIS_CENTRAL; - features |= BLE_LL_FEAT_CIS_PERIPH; - features |= BLE_LL_FEAT_CIS_HOST; -#endif - #if MYNEWT_VAL(BLE_LL_ISO_BROADCASTER) features |= BLE_LL_FEAT_ISO_BROADCASTER; #endif diff --git a/nimble/controller/src/ble_ll_ctrl.c b/nimble/controller/src/ble_ll_ctrl.c index ed03fd10f9..053c62881a 100644 --- a/nimble/controller/src/ble_ll_ctrl.c +++ b/nimble/controller/src/ble_ll_ctrl.c @@ -1296,27 +1296,6 @@ ble_ll_ctrl_rx_subrate_ind(struct ble_ll_conn_sm *connsm, uint8_t *req, } #endif -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) -static uint8_t -ble_ll_ctrl_rx_cis_req(struct ble_ll_conn_sm *connsm, uint8_t *dptr, - uint8_t *rspdata) -{ - return BLE_LL_CTRL_UNKNOWN_RSP; -} - -static uint8_t -ble_ll_ctrl_rx_cis_rsp(struct ble_ll_conn_sm *connsm, uint8_t *dptr, - uint8_t *rspdata) -{ - return BLE_LL_CTRL_UNKNOWN_RSP; -} - -static uint8_t -ble_ll_ctrl_rx_cis_ind(struct ble_ll_conn_sm *connsm, uint8_t *dptr) -{ - return BLE_LL_CTRL_UNKNOWN_RSP; -} -#endif /** * Create a link layer length request or length response PDU. * @@ -1522,15 +1501,6 @@ ble_ll_ctrl_start_enc_send(struct ble_ll_conn_sm *connsm) return rc; } -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) -static void -ble_ll_ctrl_cis_create(struct ble_ll_conn_sm *connsm, uint8_t *dptr) -{ - /* TODO Implement */ - return; -} -#endif - /** * Create a link layer control "encrypt request" PDU. * @@ -2544,12 +2514,6 @@ ble_ll_ctrl_proc_init(struct ble_ll_conn_sm *connsm, int ctrl_proc, void *data) ble_ll_ctrl_sca_req_rsp_make(connsm, ctrdata); break; #endif -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) - case BLE_LL_CTRL_PROC_CIS_CREATE: - opcode = BLE_LL_CTRL_CIS_REQ; - ble_ll_ctrl_cis_create(connsm, ctrdata); - break; -#endif #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ENHANCED_CONN_UPDATE) #if MYNEWT_VAL(BLE_LL_ROLE_PERIPHERAL) case BLE_LL_CTRL_PROC_SUBRATE_REQ: @@ -3013,17 +2977,6 @@ ble_ll_ctrl_rx_pdu(struct ble_ll_conn_sm *connsm, struct os_mbuf *om) break; #endif -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) - case BLE_LL_CTRL_CIS_REQ: - rsp_opcode = ble_ll_ctrl_rx_cis_req(connsm, dptr, rspdata); - break; - case BLE_LL_CTRL_CIS_RSP: - rsp_opcode = ble_ll_ctrl_rx_cis_rsp(connsm, dptr, rspdata); - break; - case BLE_LL_CTRL_CIS_IND: - rsp_opcode = ble_ll_ctrl_rx_cis_ind(connsm, dptr); - break; -#endif #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_TRANSFER) case BLE_LL_CTRL_PERIODIC_SYNC_IND: rsp_opcode = ble_ll_ctrl_rx_periodic_sync_ind(connsm, dptr); diff --git a/nimble/controller/src/ble_ll_hci.c b/nimble/controller/src/ble_ll_hci.c index 719fa6924a..1be14ceeec 100644 --- a/nimble/controller/src/ble_ll_hci.c +++ b/nimble/controller/src/ble_ll_hci.c @@ -1275,32 +1275,6 @@ ble_ll_hci_le_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf, rc = ble_ll_iso_big_hci_terminate(cmdbuf, len); break; #endif /* BLE_LL_ISO_BROADCASTER */ -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) - case BLE_HCI_OCF_LE_READ_ISO_TX_SYNC: - rc = ble_ll_iso_read_tx_sync(cmdbuf, len); - break; - case BLE_HCI_OCF_LE_SET_CIG_PARAMS: - rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen); - break; - case BLE_HCI_OCF_LE_CREATE_CIS: - rc = ble_ll_iso_create_cis(cmdbuf, len); - break; - case BLE_HCI_OCF_LE_REMOVE_CIG: - rc = ble_ll_iso_remove_cig(cmdbuf, len, rspbuf, rsplen); - break; - case BLE_HCI_OCF_LE_ACCEPT_CIS_REQ: - rc = ble_ll_iso_accept_cis_req(cmdbuf, len); - break; - case BLE_HCI_OCF_LE_REJECT_CIS_REQ: - rc = ble_ll_iso_reject_cis_req(cmdbuf, len); - break; - case BLE_HCI_OCF_LE_BIG_CREATE_SYNC: - rc = ble_ll_iso_big_create_sync(cmdbuf, len); - break; - case BLE_HCI_OCF_LE_BIG_TERMINATE_SYNC: - rc = ble_ll_iso_big_terminate_sync(cmdbuf,len); - break; -#endif #if MYNEWT_VAL(BLE_LL_ISO) case BLE_HCI_OCF_LE_SETUP_ISO_DATA_PATH: rc = ble_ll_isoal_hci_setup_iso_data_path(cmdbuf, len, rspbuf, rsplen); @@ -1317,26 +1291,6 @@ ble_ll_hci_le_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf, } break; #endif /* BLE_LL_ISO */ -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO_TEST) - case BLE_HCI_OCF_LE_SET_CIG_PARAMS_TEST: - rc = ble_ll_iso_set_cig_param_test(cmdbuf, len, rspbuf, rsplen); - break; - case BLE_HCI_OCF_LE_CREATE_BIG_TEST: - rc = ble_ll_iso_create_big_test(cmdbuf, len); - break; - case BLE_HCI_OCF_LE_ISO_TRANSMIT_TEST: - rc = ble_ll_iso_transmit_test(cmdbuf, len); - break; - case BLE_HCI_OCF_LE_ISO_RECEIVE_TEST: - rc = ble_ll_iso_receive_test(cmdbuf, len); - break; - case BLE_HCI_OCF_LE_ISO_READ_TEST_COUNTERS: - rc = ble_ll_iso_read_counters_test(cmdbuf, len); - break; - case BLE_HCI_OCF_LE_ISO_TEST_END: - rc = ble_ll_iso_end_test(cmdbuf, len); - break; -#endif #if MYNEWT_VAL(BLE_VERSION) >= 52 case BLE_HCI_OCF_LE_SET_HOST_FEATURE: rc = ble_ll_set_host_feat(cmdbuf, len); @@ -1385,12 +1339,6 @@ ble_ll_hci_disconnect(const uint8_t *cmdbuf, uint8_t len) return BLE_ERR_INV_HCI_CMD_PARMS; } -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) - if (le16toh(cmd->conn_handle) >= BLE_LL_CONN_HANDLE_ISO_OFFSET) { - return ble_ll_iso_disconnect_cmd(cmd); - } -#endif - return ble_ll_conn_hci_disconnect_cmd(cmd); } #endif diff --git a/nimble/controller/src/ble_ll_iso.c b/nimble/controller/src/ble_ll_iso.c deleted file mode 100644 index a6186fe1a5..0000000000 --- a/nimble/controller/src/ble_ll_iso.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#include -#include "syscfg/syscfg.h" -#include "nimble/ble.h" -#include "nimble/hci_common.h" -#include "controller/ble_ll_iso.h" - -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) - -int -ble_ll_iso_read_tx_sync(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_set_cig_param(const uint8_t *cmdbuf, uint8_t len, - uint8_t *rspbuf, uint8_t *rsplen) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_create_cis(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_disconnect_cmd(const struct ble_hci_lc_disconnect_cp *cmd) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_remove_cig(const uint8_t *cmdbuf, uint8_t len, - uint8_t *rspbuf, uint8_t *rsplen) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_accept_cis_req(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_reject_cis_req(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_setup_iso_data_path(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_remove_iso_data_path(const uint8_t *cmdbuf, uint8_t len) -{ - /* Nothing to do here for now when HCI is supported */ - return 0; -} -int -ble_ll_iso_create_big(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_terminate_big(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_big_create_sync(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_big_terminate_sync(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO_TEST) -int -ble_ll_iso_set_cig_param_test(const uint8_t *cmdbuf, uint8_t len, - uint8_t *rspbuf, uint8_t *rsplen) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_create_big_test(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_transmit_test(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_receive_test(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_read_counters_test(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} - -int -ble_ll_iso_end_test(const uint8_t *cmdbuf, uint8_t len) -{ - return BLE_ERR_UNSUPPORTED; -} -#endif -#endif diff --git a/nimble/controller/src/ble_ll_iso_big.c b/nimble/controller/src/ble_ll_iso_big.c index b836fed0b8..6725f30ab9 100644 --- a/nimble/controller/src/ble_ll_iso_big.c +++ b/nimble/controller/src/ble_ll_iso_big.c @@ -398,7 +398,7 @@ ble_ll_iso_big_event_done(struct ble_ll_iso_big *big) { struct ble_ll_iso_bis *bis; struct ble_hci_ev *hci_ev; - struct ble_hci_ev_num_comp_pkts *hci_ev_ncp; + struct ble_hci_ev_num_comp_pkts *hci_ev_ncp = NULL; int num_completed_pkt; int rc; diff --git a/nimble/controller/syscfg.yml b/nimble/controller/syscfg.yml index f02b04dfe4..8a28b1c528 100644 --- a/nimble/controller/syscfg.yml +++ b/nimble/controller/syscfg.yml @@ -348,21 +348,6 @@ syscfg.defs: restrictions: - '(BLE_VERSION >= 53) if 1' - BLE_LL_CFG_FEAT_LL_ISO: - description: > - This option is used to enable/disable support for LE Isochronous Channels - as per Bluetooth v5.2 channels - value: MYNEWT_VAL(BLE_ISO) - restrictions: - - '(BLE_VERSION >= 52) if 1' - - BLE_LL_CFG_FEAT_LL_ISO_TEST: - description: > - This option is used to enable/disbale test commands for ISO support - value: MYNEWT_VAL(BLE_ISO_TEST) - restrictions: - - 'BLE_LL_CFG_FEAT_LL_ISO if 1' - BLE_LL_PERIODIC_ADV_SYNC_BIGINFO_REPORTS: description: > This option is used to enable/disable support for @@ -479,14 +464,14 @@ syscfg.defs: data, particular ISO features have to be enabled separately. restrictions: - (BLE_VERSION >= 52) if 1 - value: 0 + value: MYNEWT_VAL(BLE_ISO) state: experimental BLE_LL_ISO_BROADCASTER: description: > Enable support for Isochronous Broadcasting state. restrictions: - BLE_LL_ISO if 1 - value: 0 + value: MYNEWT_VAL(BLE_ISO_BROADCASTER) state: experimental BLE_LL_SYSINIT_STAGE: diff --git a/nimble/syscfg.yml b/nimble/syscfg.yml index ce43a00b1d..eaaec96896 100644 --- a/nimble/syscfg.yml +++ b/nimble/syscfg.yml @@ -95,7 +95,12 @@ syscfg.defs: value: 0 restrictions: - '(BLE_VERSION >= 52) if 1' - + BLE_ISO_BROADCASTER: + description: > + This enables LE Audio Broadcaster feature + value: 0 + restrictions: + - '(BLE_VERSION >= 52) if 1' BLE_ISO_TEST: description: > Enables BLE ISO Testing commands