diff --git a/subsys/bluetooth/controller/Kconfig b/subsys/bluetooth/controller/Kconfig index 789fb4eece7b..f1fab15693f6 100644 --- a/subsys/bluetooth/controller/Kconfig +++ b/subsys/bluetooth/controller/Kconfig @@ -29,6 +29,10 @@ config BT_LL_SOFTDEVICE select BT_CTLR_SYNC_TRANSFER_SENDER_SUPPORT select BT_CTLR_SYNC_TRANSFER_RECEIVER_SUPPORT select BT_CTLR_SCA_UPDATE_SUPPORT + select BT_CTLR_PERIPHERAL_ISO_SUPPORT + select BT_CTLR_CENTRAL_ISO_SUPPORT + select BT_CTLR_SYNC_ISO_SUPPORT + select BT_CTLR_ADV_ISO_SUPPORT select BT_CTLR_PHY_2M_SUPPORT if HAS_HW_NRF_RADIO_BLE_2M select BT_CTLR_PHY_CODED_SUPPORT if HAS_HW_NRF_RADIO_BLE_CODED select BT_HAS_HCI_VS @@ -131,6 +135,7 @@ config BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT_OVERRIDE config BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT int "Default max connection event length [us]" + default 10000 if BT_ISO && !BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT_OVERRIDE default 7500 if !BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT_OVERRIDE range 1250 4000000 help @@ -240,6 +245,7 @@ choice BT_LL_SOFTDEVICE_VARIANT BT_CTLR_SCA_UPDATE || \ BT_CTLR_SDC_PAWR_ADV || \ BT_CTLR_SDC_PAWR_SYNC || \ + BT_ISO || \ SOC_NRF5340_CPUNET) default BT_LL_SOFTDEVICE_CENTRAL if BT_OBSERVER default BT_LL_SOFTDEVICE_PERIPHERAL if BT_BROADCASTER @@ -270,6 +276,14 @@ config BT_LL_SOFTDEVICE_MULTIROLE endchoice +config BT_LL_SOFTDEVICE_EXPERIMENTAL_ISO + bool "ISO Support in the SoftDevice Controller [EXPERIMENTAL]" + default BT_ISO + select EXPERIMENTAL + help + ISO support in the SoftDevice Controller is experimental. + It cannot be used in products as per now. + config BT_CTLR_FAL_SIZE int "Configures the maximum number of addresses in the Filter Accept List" range 0 255 @@ -319,6 +333,24 @@ config BT_CTLR_LE_POWER_CONTROL Enable support for LE Power Control feature that defined in the Bluetooth Core specification, Version 5.3 | Vol 6, Part B, Section 4.6.31. +config BT_CTLR_SDC_ISO_RX_PDU_BUFFER_COUNT + int "BT_CTLR_SDC_ISO_RX_PDU_BUFFER_COUNT" + depends on BT_CTLR_SYNC_ISO || BT_CTLR_CONN_ISO + range 0 10 + default 3 + +config BT_CTLR_SDC_ISO_TX_HCI_BUFFER_COUNT + int "BT_CTLR_SDC_ISO_TX_HCI_BUFFER_COUNT" + depends on BT_CTLR_ADV_ISO || BT_CTLR_CONN_ISO + range 0 10 + default 3 + +config BT_CTLR_SDC_ISO_TX_PDU_BUFFER_PER_STREAM_COUNT + int "BT_CTLR_SDC_ISO_TX_PDU_BUFFER_PER_STREAM_COUNT" + depends on BT_CTLR_ADV_ISO || BT_CTLR_CONN_ISO + range 1 32 + default 3 + config BT_UNINIT_MPSL_ON_DISABLE bool "Uninitializes MPSL on BT disable" depends on MPSL_DYNAMIC_INTERRUPTS diff --git a/subsys/bluetooth/controller/hci_driver.c b/subsys/bluetooth/controller/hci_driver.c index fa7cd32abde9..59c5b488cbeb 100644 --- a/subsys/bluetooth/controller/hci_driver.c +++ b/subsys/bluetooth/controller/hci_driver.c @@ -163,6 +163,60 @@ BUILD_ASSERT(!IS_ENABLED(CONFIG_BT_PERIPHERAL) || #define SDC_FAL_MEM_SIZE SDC_MEM_FAL(CONFIG_BT_CTLR_FAL_SIZE) +#if defined(CONFIG_BT_CTLR_CONN_ISO) +#define SDC_MEM_CIG SDC_MEM_PER_CIG(CONFIG_BT_CTLR_CONN_ISO_GROUPS) +#define SDC_MEM_CIS \ + SDC_MEM_PER_CIS(CONFIG_BT_CTLR_CONN_ISO_STREAMS) + \ + SDC_MEM_ISO_RX_SDU_POOL_SIZE(CONFIG_BT_CTLR_CONN_ISO_STREAMS) +#define SDC_CIS_COUNT CONFIG_BT_CTLR_CONN_ISO_STREAMS +#else +#define SDC_MEM_CIG 0 +#define SDC_MEM_CIS 0 +#define SDC_CIS_COUNT 0 +#endif + +#if defined(CONFIG_BT_CTLR_SYNC_ISO) +#define SDC_MEM_BIS_SINK \ + SDC_MEM_PER_BIG(CONFIG_BT_CTLR_SCAN_SYNC_ISO_SET) + \ + SDC_MEM_PER_BIS(CONFIG_BT_CTLR_SYNC_ISO_STREAM_COUNT) + \ + SDC_MEM_ISO_RX_SDU_POOL_SIZE(CONFIG_BT_CTLR_SYNC_ISO_STREAM_COUNT) +#define SDC_BIS_SINK_COUNT CONFIG_BT_CTLR_SYNC_ISO_STREAM_COUNT +#else +#define SDC_MEM_BIS_SINK 0 +#define SDC_BIS_SINK_COUNT 0 +#endif + +#if defined(CONFIG_BT_CTLR_ADV_ISO) +#define SDC_MEM_BIS_SOURCE \ + SDC_MEM_PER_BIG(CONFIG_BT_CTLR_ADV_ISO_SET) + \ + SDC_MEM_PER_BIS(CONFIG_BT_CTLR_ADV_ISO_STREAM_COUNT) +#define SDC_BIS_SOURCE_COUNT CONFIG_BT_CTLR_ADV_ISO_STREAM_COUNT +#else +#define SDC_MEM_BIS_SOURCE 0 +#define SDC_BIS_SOURCE_COUNT 0 +#endif + +#if defined(CONFIG_BT_CTLR_SDC_ISO_RX_PDU_BUFFER_COUNT) + #define SDC_MEM_ISO_RX_POOL \ + SDC_MEM_ISO_RX_PDU_POOL_SIZE(CONFIG_BT_CTLR_SDC_ISO_RX_PDU_BUFFER_COUNT) +#else + #define SDC_MEM_ISO_RX_POOL 0 +#endif + +#if defined(CONFIG_BT_CTLR_SDC_ISO_TX_HCI_BUFFER_COUNT) && \ + defined(CONFIG_BT_CTLR_SDC_ISO_TX_PDU_BUFFER_PER_STREAM_COUNT) +#define SDC_MEM_ISO_TX_POOL \ + SDC_MEM_ISO_TX_POOL_SIZE(CONFIG_BT_CTLR_SDC_ISO_TX_HCI_BUFFER_COUNT, \ + CONFIG_BT_CTLR_SDC_ISO_TX_PDU_BUFFER_PER_STREAM_COUNT, \ + SDC_CIS_COUNT, \ + (SDC_BIS_SINK_COUNT + SDC_BIS_SOURCE_COUNT)) +/* We should not have to allocate TX pool memory for CONFIG_BT_CTLR_SYNC_ISO_STREAM_COUNT, + * but currently bis_count does not differentiate between ADV or SYNC streams. + */ +#else +#define SDC_MEM_ISO_TX_POOL 0 +#endif + #define MEMPOOL_SIZE ((PERIPHERAL_COUNT * PERIPHERAL_MEM_SIZE) + \ (SDC_CENTRAL_COUNT * CENTRAL_MEM_SIZE) + \ (SDC_ADV_SET_MEM_SIZE) + \ @@ -171,7 +225,13 @@ BUILD_ASSERT(!IS_ENABLED(CONFIG_BT_PERIPHERAL) || (SDC_PERIODIC_SYNC_MEM_SIZE) + \ (SDC_PERIODIC_ADV_LIST_MEM_SIZE) + \ (SDC_SCAN_BUF_SIZE) + \ - (SDC_FAL_MEM_SIZE)) + (SDC_FAL_MEM_SIZE) + \ + (SDC_MEM_CIG) + \ + (SDC_MEM_CIS) + \ + (SDC_MEM_BIS_SINK) + \ + (SDC_MEM_BIS_SOURCE) + \ + (SDC_MEM_ISO_RX_POOL) + \ + (SDC_MEM_ISO_TX_POOL)) #if defined(CONFIG_BT_SDC_ADDITIONAL_MEMORY) __aligned(8) uint8_t sdc_mempool[MEMPOOL_SIZE + CONFIG_BT_SDC_ADDITIONAL_MEMORY]; @@ -241,6 +301,27 @@ static int acl_handle(struct net_buf *acl) } #endif +#if defined(CONFIG_BT_CTLR_ISO_TX_BUFFERS) +static int iso_handle(struct net_buf *acl) +{ + LOG_DBG(""); + + int errcode = MULTITHREADING_LOCK_ACQUIRE(); + + if (!errcode) { + errcode = sdc_hci_iso_data_put(acl->data); + MULTITHREADING_LOCK_RELEASE(); + + if (errcode) { + /* Likely buffer overflow event */ + receive_signal_raise(); + } + } + + return errcode; +} +#endif + static int hci_driver_send(struct net_buf *buf) { int err; @@ -263,6 +344,11 @@ static int hci_driver_send(struct net_buf *buf) case BT_BUF_CMD: err = cmd_handle(buf); break; +#if defined(CONFIG_BT_CTLR_ISO_TX_BUFFERS) + case BT_BUF_ISO_OUT: + err = iso_handle(buf); + break; +#endif default: LOG_DBG("Unknown HCI type %u", type); return -EINVAL; @@ -302,6 +388,18 @@ static void data_packet_process(uint8_t *hci_buf) bt_recv(data_buf); } +static void iso_data_packet_process(uint8_t *hci_buf) +{ + struct net_buf *data_buf = bt_buf_get_rx(BT_BUF_ISO_IN, K_FOREVER); + struct bt_hci_iso_hdr *hdr = (void *)hci_buf; + + uint16_t len = sys_le16_to_cpu(hdr->len); + + net_buf_add_mem(data_buf, &hci_buf[0], len + sizeof(*hdr)); + + bt_recv(data_buf); +} + static bool event_packet_is_discardable(const uint8_t *hci_buf) { struct bt_hci_evt_hdr *hdr = (void *)hci_buf; @@ -409,6 +507,8 @@ static bool fetch_and_process_hci_msg(uint8_t *p_hci_buffer) event_packet_process(p_hci_buffer); } else if (msg_type == SDC_HCI_MSG_TYPE_DATA) { data_packet_process(p_hci_buffer); + } else if (msg_type == SDC_HCI_MSG_TYPE_ISO) { + iso_data_packet_process(p_hci_buffer); } else { if (!IS_ENABLED(CONFIG_BT_CTLR_SDC_SILENCE_UNEXPECTED_MSG_TYPE)) { LOG_ERR("Unexpected msg_type: %u. This if-else needs a new branch", @@ -700,6 +800,34 @@ static int configure_supported_features(void) } } + if (IS_ENABLED(CONFIG_BT_CTLR_PERIPHERAL_ISO)) { + err = sdc_support_cis_peripheral(); + if (err) { + return -ENOTSUP; + } + } + + if (IS_ENABLED(CONFIG_BT_CTLR_CENTRAL_ISO)) { + err = sdc_support_cis_central(); + if (err) { + return -ENOTSUP; + } + } + + if (IS_ENABLED(CONFIG_BT_CTLR_ADV_ISO)) { + err = sdc_support_bis_source(); + if (err) { + return -ENOTSUP; + } + } + + if (IS_ENABLED(CONFIG_BT_CTLR_SYNC_ISO)) { + err = sdc_support_bis_sink(); + if (err) { + return -ENOTSUP; + } + } + return 0; } @@ -708,6 +836,10 @@ static int configure_memory_usage(void) int required_memory; sdc_cfg_t cfg; +#if defined(CONFIG_BT_CTLR_SDC_ISO_RX_PDU_BUFFER_COUNT) + uint8_t iso_rx_paths = 0; +#endif + #if !defined(CONFIG_BT_LL_SOFTDEVICE_PERIPHERAL) cfg.central_count.count = SDC_CENTRAL_COUNT; @@ -877,6 +1009,81 @@ static int configure_memory_usage(void) } #endif +#if defined(CONFIG_BT_CTLR_CONN_ISO) + cfg.cig_count.count = CONFIG_BT_CTLR_CONN_ISO_GROUPS; + required_memory = sdc_cfg_set(SDC_DEFAULT_RESOURCE_CFG_TAG, + SDC_CFG_TYPE_CIG_COUNT, &cfg); + if (required_memory < 0) { + return required_memory; + } + + iso_rx_paths = CONFIG_BT_CTLR_CONN_ISO_STREAMS; + cfg.cis_count.count = CONFIG_BT_CTLR_CONN_ISO_STREAMS; + required_memory = sdc_cfg_set(SDC_DEFAULT_RESOURCE_CFG_TAG, + SDC_CFG_TYPE_CIS_COUNT, &cfg); + if (required_memory < 0) { + return required_memory; + } +#endif /* CONFIG_BT_CTLR_CONN_ISO */ + +#if defined(CONFIG_BT_CTLR_BROADCAST_ISO) + cfg.big_count.count = 0; +#if defined(CONFIG_BT_CTLR_ADV_ISO) + cfg.big_count.count += CONFIG_BT_CTLR_ADV_ISO_SET; +#endif /* CONFIG_BT_CTLR_ADV_ISO */ +#if defined(CONFIG_BT_CTLR_SYNC_ISO) + cfg.big_count.count += CONFIG_BT_CTLR_SCAN_SYNC_ISO_SET; +#endif /* CONFIG_BT_CTLR_SYNC_ISO */ + required_memory = sdc_cfg_set(SDC_DEFAULT_RESOURCE_CFG_TAG, + SDC_CFG_TYPE_BIG_COUNT, &cfg); + if (required_memory < 0) { + return required_memory; + } + + cfg.bis_count.count = 0; +#if defined(CONFIG_BT_CTLR_ADV_ISO) + cfg.bis_count.count += CONFIG_BT_CTLR_ADV_ISO_STREAM_COUNT; + +#endif /* CONFIG_BT_CTLR_ADV_ISO */ +#if defined(CONFIG_BT_CTLR_SYNC_ISO) + cfg.bis_count.count += CONFIG_BT_CTLR_SYNC_ISO_STREAM_COUNT; + iso_rx_paths += CONFIG_BT_CTLR_SYNC_ISO_STREAM_COUNT; +#endif /* CONFIG_BT_CTLR_SYNC_ISO */ + required_memory = sdc_cfg_set(SDC_DEFAULT_RESOURCE_CFG_TAG, + SDC_CFG_TYPE_BIS_COUNT, &cfg); + if (required_memory < 0) { + return required_memory; + } +#endif /* CONFIG_BT_CTLR_BROADCAST_ISO */ + +#if defined(CONFIG_BT_CTLR_SDC_ISO_RX_PDU_BUFFER_COUNT) + cfg.iso_rx_pdu_buffer_cfg.count = CONFIG_BT_CTLR_SDC_ISO_RX_PDU_BUFFER_COUNT; + required_memory = sdc_cfg_set(SDC_DEFAULT_RESOURCE_CFG_TAG, + SDC_CFG_TYPE_ISO_RX_PDU_BUFFER_CFG, &cfg); + if (required_memory < 0) { + return required_memory; + } + + cfg.iso_rx_sdu_buffer_cfg.count = iso_rx_paths; + required_memory = sdc_cfg_set(SDC_DEFAULT_RESOURCE_CFG_TAG, + SDC_CFG_TYPE_ISO_RX_SDU_BUFFER_CFG, &cfg); + if (required_memory < 0) { + return required_memory; + } +#endif + +#if defined(CONFIG_BT_CTLR_SDC_ISO_TX_HCI_BUFFER_COUNT) && \ + defined(CONFIG_BT_CTLR_SDC_ISO_TX_PDU_BUFFER_PER_STREAM_COUNT) + cfg.iso_tx_buffer_cfg.tx_hci_buffer_count = CONFIG_BT_CTLR_SDC_ISO_TX_HCI_BUFFER_COUNT; + cfg.iso_tx_buffer_cfg.tx_pdu_buffer_per_stream_count = + CONFIG_BT_CTLR_SDC_ISO_TX_PDU_BUFFER_PER_STREAM_COUNT; + required_memory = sdc_cfg_set(SDC_DEFAULT_RESOURCE_CFG_TAG, + SDC_CFG_TYPE_ISO_TX_BUFFER_CFG, &cfg); + if (required_memory < 0) { + return required_memory; + } +#endif + LOG_DBG("BT mempool size: %u, required: %u", sizeof(sdc_mempool), required_memory); diff --git a/subsys/bluetooth/controller/hci_internal.c b/subsys/bluetooth/controller/hci_internal.c index d6f06572ba0d..76987034b991 100644 --- a/subsys/bluetooth/controller/hci_internal.c +++ b/subsys/bluetooth/controller/hci_internal.c @@ -55,6 +55,12 @@ static bool command_generates_command_complete_event(uint16_t hci_opcode) case SDC_HCI_OPCODE_CMD_VS_WRITE_REMOTE_TX_POWER: case BT_HCI_OP_LE_P256_PUBLIC_KEY: case BT_HCI_OP_LE_GENERATE_DHKEY: + case SDC_HCI_OPCODE_CMD_LE_ACCEPT_CIS_REQUEST: + case SDC_HCI_OPCODE_CMD_LE_CREATE_CIS: + case SDC_HCI_OPCODE_CMD_LE_BIG_CREATE_SYNC: + case SDC_HCI_OPCODE_CMD_LE_CREATE_BIG: + case SDC_HCI_OPCODE_CMD_LE_CREATE_BIG_TEST: + case SDC_HCI_OPCODE_CMD_LE_TERMINATE_BIG: return false; default: return true; @@ -549,6 +555,53 @@ void hci_internal_supported_commands(sdc_hci_ip_supported_commands_t *cmds) cmds->hci_le_generate_dhkey_v1 = 1; cmds->hci_le_generate_dhkey_v2 = 1; #endif + +#if defined(CONFIG_BT_CTLR_SET_HOST_FEATURE) + cmds->hci_le_set_host_feature = 1; +#endif + +#if defined(CONFIG_BT_CTLR_CENTRAL_ISO) + cmds->hci_le_set_cig_parameters = 1; + cmds->hci_le_set_cig_parameters_test = 1; + cmds->hci_le_create_cis = 1; + cmds->hci_le_remove_cig = 1; +#endif + +#if defined(CONFIG_BT_CTLR_PERIPHERAL_ISO) + cmds->hci_le_accept_cis_request = 1; + cmds->hci_le_reject_cis_request = 1; + cmds->hci_write_connection_accept_timeout = 1; + cmds->hci_read_connection_accept_timeout = 1; +#endif + +#if defined(CONFIG_BT_CTLR_ADV_ISO) + cmds->hci_le_create_big = 1; + cmds->hci_le_create_big_test = 1; + cmds->hci_le_terminate_big = 1; +#endif + +#if defined(CONFIG_BT_CTLR_SYNC_ISO) + cmds->hci_le_big_create_sync = 1; + cmds->hci_le_big_terminate_sync = 1; +#endif + +#if defined(CONFIG_BT_CTLR_ISO) + cmds->hci_le_setup_iso_data_path = 1; + cmds->hci_le_remove_iso_data_path = 1; + cmds->hci_le_iso_test_end = 1; + cmds->hci_le_iso_read_test_counters = 1; + cmds->hci_le_read_iso_link_quality = 1; +#endif + +#if defined(CONFIG_BT_CTLR_ISO_TX_BUFFERS) + cmds->hci_le_read_buffer_size_v2 = 1; + cmds->hci_le_read_iso_tx_sync = 1; + cmds->hci_le_iso_transmit_test = 1; +#endif + +#if defined(CONFIG_BT_CTLR_ISO_RX_BUFFERS) + cmds->hci_le_iso_receive_test = 1; +#endif } #if defined(CONFIG_BT_HCI_VS) @@ -665,6 +718,19 @@ void hci_internal_le_supported_features( features->params.sleep_clock_accuracy_updates = 1; #endif +#if defined(CONFIG_BT_CTLR_PERIPHERAL_ISO) + features->params.connected_isochronous_stream_slave = 1; +#endif +#if defined(CONFIG_BT_CTLR_CENTRAL_ISO) + features->params.connected_isochronous_stream_master = 1; +#endif +#if defined(CONFIG_BT_CTLR_SYNC_ISO) + features->params.synchronized_receiver = 1; +#endif +#if defined(CONFIG_BT_CTLR_ADV_ISO) + features->params.isochronous_broadcaster = 1; +#endif + #if defined(CONFIG_BT_CTLR_SDC_PAWR_ADV) features->params.periodic_advertising_with_responses_advertiser = 1; #endif @@ -1234,6 +1300,153 @@ static uint8_t le_controller_cmd_put(uint8_t const * const cmd, return sdc_hci_cmd_le_request_peer_sca((void *)cmd_params); #endif +#ifdef CONFIG_BT_CTLR_PERIPHERAL_ISO + case SDC_HCI_OPCODE_CMD_LE_ACCEPT_CIS_REQUEST: + return sdc_hci_cmd_le_accept_cis_request( + (sdc_hci_cmd_le_accept_cis_request_t const *)cmd_params); + case SDC_HCI_OPCODE_CMD_LE_REJECT_CIS_REQUEST: + *param_length_out += sizeof(sdc_hci_cmd_le_reject_cis_request_return_t); + return sdc_hci_cmd_le_reject_cis_request( + (sdc_hci_cmd_le_reject_cis_request_t const *)cmd_params, + (sdc_hci_cmd_le_reject_cis_request_return_t *)event_out_params); + case SDC_HCI_OPCODE_CMD_CB_READ_CONN_ACCEPT_TIMEOUT: + *param_length_out += sizeof(sdc_hci_cmd_cb_read_conn_accept_timeout_return_t); + return sdc_hci_cmd_cb_read_conn_accept_timeout( + (sdc_hci_cmd_cb_read_conn_accept_timeout_return_t *)event_out_params); + case SDC_HCI_OPCODE_CMD_CB_WRITE_CONN_ACCEPT_TIMEOUT: + return sdc_hci_cmd_cb_write_conn_accept_timeout( + (sdc_hci_cmd_cb_write_conn_accept_timeout_t const *)cmd_params); + +#endif /* CONFIG_BT_CTLR_PERIPHERAL_ISO */ + +#ifdef CONFIG_BT_CTLR_CENTRAL_ISO + case SDC_HCI_OPCODE_CMD_LE_SET_CIG_PARAMS: { + sdc_hci_cmd_le_set_cig_params_return_t *p_cig_params_ret = + (sdc_hci_cmd_le_set_cig_params_return_t *)event_out_params; + uint8_t status = sdc_hci_cmd_le_set_cig_params( + (sdc_hci_cmd_le_set_cig_params_t const *)cmd_params, p_cig_params_ret); + + *param_length_out += + sizeof(sdc_hci_cmd_le_set_cig_params_return_t) + + p_cig_params_ret->cis_count * + sizeof(sdc_hci_le_set_cig_params_output_array_params_t); + + return status; + } + case SDC_HCI_OPCODE_CMD_LE_SET_CIG_PARAMS_TEST: { + sdc_hci_cmd_le_set_cig_params_test_return_t *p_cig_params_test_ret = + (sdc_hci_cmd_le_set_cig_params_test_return_t *)event_out_params; + uint8_t status = sdc_hci_cmd_le_set_cig_params_test( + (sdc_hci_cmd_le_set_cig_params_test_t const *)cmd_params, + p_cig_params_test_ret); + + *param_length_out += + sizeof(sdc_hci_cmd_le_set_cig_params_test_return_t) + + p_cig_params_test_ret->cis_count * + sizeof(sdc_hci_le_set_cig_params_test_output_array_params_t); + + return status; + } + + case SDC_HCI_OPCODE_CMD_LE_CREATE_CIS: + return sdc_hci_cmd_le_create_cis((sdc_hci_cmd_le_create_cis_t const *)cmd_params); + + case SDC_HCI_OPCODE_CMD_LE_REMOVE_CIG: + *param_length_out += sizeof(sdc_hci_cmd_le_remove_cig_return_t); + return sdc_hci_cmd_le_remove_cig( + (sdc_hci_cmd_le_remove_cig_t const *)cmd_params, + (sdc_hci_cmd_le_remove_cig_return_t *)event_out_params); +#endif /* CONFIG_BT_CTLR_CENTRAL_ISO */ + +#ifdef CONFIG_BT_CTLR_SYNC_ISO + case SDC_HCI_OPCODE_CMD_LE_BIG_CREATE_SYNC: + return sdc_hci_cmd_le_big_create_sync( + (sdc_hci_cmd_le_big_create_sync_t const *)cmd_params); + case SDC_HCI_OPCODE_CMD_LE_BIG_TERMINATE_SYNC: + *param_length_out += sizeof(sdc_hci_cmd_le_big_terminate_sync_return_t); + return sdc_hci_cmd_le_big_terminate_sync( + (sdc_hci_cmd_le_big_terminate_sync_t const *)cmd_params, + (sdc_hci_cmd_le_big_terminate_sync_return_t *)event_out_params); +#endif /* CONFIG_BT_CTLR_SYNC_ISO */ + +#ifdef CONFIG_BT_CTLR_ADV_ISO + case SDC_HCI_OPCODE_CMD_LE_CREATE_BIG: + return sdc_hci_cmd_le_create_big((sdc_hci_cmd_le_create_big_t const *)cmd_params); + case SDC_HCI_OPCODE_CMD_LE_CREATE_BIG_TEST: + return sdc_hci_cmd_le_create_big_test( + (sdc_hci_cmd_le_create_big_test_t const *)cmd_params); + case SDC_HCI_OPCODE_CMD_LE_TERMINATE_BIG: + return sdc_hci_cmd_le_terminate_big( + (sdc_hci_cmd_le_terminate_big_t const *)cmd_params); +#endif /* CONFIG_BT_CTLR_ADV_ISO */ + +#ifdef CONFIG_BT_CTLR_ISO_TX_BUFFERS + case SDC_HCI_OPCODE_CMD_LE_READ_BUFFER_SIZE_V2: + *param_length_out += sizeof(sdc_hci_cmd_le_read_buffer_size_v2_return_t); + return sdc_hci_cmd_le_read_buffer_size_v2( + (sdc_hci_cmd_le_read_buffer_size_v2_return_t *)event_out_params); + + case SDC_HCI_OPCODE_CMD_LE_READ_ISO_TX_SYNC: + *param_length_out += sizeof(sdc_hci_cmd_le_read_iso_tx_sync_return_t); + return sdc_hci_cmd_le_read_iso_tx_sync( + (sdc_hci_cmd_le_read_iso_tx_sync_t const *)cmd_params, + (sdc_hci_cmd_le_read_iso_tx_sync_return_t *)event_out_params); + + case SDC_HCI_OPCODE_CMD_LE_ISO_TRANSMIT_TEST: + *param_length_out += sizeof(sdc_hci_cmd_le_iso_transmit_test_return_t); + return sdc_hci_cmd_le_iso_transmit_test( + (sdc_hci_cmd_le_iso_transmit_test_t const *)cmd_params, + (sdc_hci_cmd_le_iso_transmit_test_return_t *)event_out_params); +#endif /* CONFIG_BT_CTLR_ISO_TX_BUFFERS */ + +#if defined(CONFIG_BT_CTLR_ISO_RX_BUFFERS) + case SDC_HCI_OPCODE_CMD_LE_ISO_RECEIVE_TEST: + *param_length_out += sizeof(sdc_hci_cmd_le_iso_receive_test_return_t); + return sdc_hci_cmd_le_iso_receive_test( + (sdc_hci_cmd_le_iso_receive_test_t const *)cmd_params, + (sdc_hci_cmd_le_iso_receive_test_return_t *)event_out_params); +#endif + +#if defined(CONFIG_BT_CTLR_ISO) + case SDC_HCI_OPCODE_CMD_LE_ISO_READ_TEST_COUNTERS: + *param_length_out += sizeof(sdc_hci_cmd_le_iso_read_test_counters_return_t); + return sdc_hci_cmd_le_iso_read_test_counters( + (sdc_hci_cmd_le_iso_read_test_counters_t const *)cmd_params, + (sdc_hci_cmd_le_iso_read_test_counters_return_t *)event_out_params); + + case SDC_HCI_OPCODE_CMD_LE_SETUP_ISO_DATA_PATH: + *param_length_out += sizeof(sdc_hci_cmd_le_setup_iso_data_path_return_t); + return sdc_hci_cmd_le_setup_iso_data_path( + (sdc_hci_cmd_le_setup_iso_data_path_t const *)cmd_params, + (sdc_hci_cmd_le_setup_iso_data_path_return_t *)event_out_params); + + case SDC_HCI_OPCODE_CMD_LE_REMOVE_ISO_DATA_PATH: + *param_length_out += sizeof(sdc_hci_cmd_le_remove_iso_data_path_return_t); + return sdc_hci_cmd_le_remove_iso_data_path( + (sdc_hci_cmd_le_remove_iso_data_path_t const *)cmd_params, + (sdc_hci_cmd_le_remove_iso_data_path_return_t *)event_out_params); + + case SDC_HCI_OPCODE_CMD_LE_ISO_TEST_END: + *param_length_out += sizeof(sdc_hci_cmd_le_iso_test_end_return_t); + return sdc_hci_cmd_le_iso_test_end( + (sdc_hci_cmd_le_iso_test_end_t const *)cmd_params, + (sdc_hci_cmd_le_iso_test_end_return_t *)event_out_params); + + case SDC_HCI_OPCODE_CMD_LE_READ_ISO_LINK_QUALITY: + *param_length_out += sizeof(sdc_hci_cmd_le_read_iso_link_quality_return_t); + uint8_t ret = sdc_hci_cmd_le_read_iso_link_quality( + (sdc_hci_cmd_le_read_iso_link_quality_t const *)cmd_params, + (sdc_hci_cmd_le_read_iso_link_quality_return_t *)event_out_params); + + return ret; +#endif /* CONFIG_BT_CTLR_ISO */ + +#if defined(CONFIG_BT_CTLR_SET_HOST_FEATURE) + case SDC_HCI_OPCODE_CMD_LE_SET_HOST_FEATURE: + return sdc_hci_cmd_le_set_host_feature( + (sdc_hci_cmd_le_set_host_feature_t const *)cmd_params); +#endif + #if defined(CONFIG_BT_CTLR_SDC_PAWR_ADV) case SDC_HCI_OPCODE_CMD_LE_EXT_CREATE_CONN_V2: return sdc_hci_cmd_le_ext_create_conn_v2((void *)cmd_params);