Skip to content
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

tests: bsim: Bluetooth: Enable some high reliability CAP tests #80788

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_ISR_STACK_SIZE=1024
CONFIG_IDLE_STACK_SIZE=256
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=6144

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
Expand Down Expand Up @@ -40,7 +40,11 @@ CONFIG_BT_ISO_PERIPHERAL=n

# ISO Streams
CONFIG_BT_ISO_MAX_CHAN=4
CONFIG_BT_ISO_TX_BUF_COUNT=1
# In theory, CONFIG_BT_ISO_TX_BUF_COUNT=1, should be sufficient but this count
# is used in the context of IPC which falls into a "Newton's Cradle" effect
# where probably (CONFIG_BT_CTLR_ISO_TX_BUFFERS - CONFIG_BT_ISO_TX_BUF_COUNT)
# buffers get throttled. Hence, always have the value equal or greater.
CONFIG_BT_ISO_TX_BUF_COUNT=12
CONFIG_BT_ISO_RX_BUF_COUNT=1

# Controller
Expand Down Expand Up @@ -72,6 +76,7 @@ CONFIG_BT_CTLR_ADV_DATA_BUF_MAX=6
CONFIG_BT_CTLR_SCAN_AUX_SET=1

CONFIG_BT_CTLR_ADV_RESERVE_MAX=n
CONFIG_BT_CTLR_ADV_AUX_SLOT_WINDOW=y
CONFIG_BT_CTLR_SCAN_UNRESERVED=y
CONFIG_BT_TICKER_NEXT_SLOT_GET_MATCH=y

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CONFIG_IPC_SERVICE=y
CONFIG_MBOX=y

CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=6144

CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
Expand Down
10 changes: 7 additions & 3 deletions samples/bluetooth/hci_ipc/nrf5340_cpunet_cis-bt_ll_sw_split.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_ISR_STACK_SIZE=1024
CONFIG_IDLE_STACK_SIZE=256
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=6144

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
Expand Down Expand Up @@ -39,7 +39,11 @@ CONFIG_BT_ISO_PERIPHERAL=y

# ISO Streams
CONFIG_BT_ISO_MAX_CHAN=4
CONFIG_BT_ISO_TX_BUF_COUNT=1
# In theory, CONFIG_BT_ISO_TX_BUF_COUNT=1, should be sufficient but this count
# is used in the context of IPC which falls into a "Newton's Cradle" effect
# where probably (CONFIG_BT_CTLR_ISO_TX_BUFFERS - CONFIG_BT_ISO_TX_BUF_COUNT)
# buffers get throttled. Hence, always have the value equal or greater.
CONFIG_BT_ISO_TX_BUF_COUNT=12
CONFIG_BT_ISO_RX_BUF_COUNT=1

# Controller
Expand Down Expand Up @@ -82,8 +86,8 @@ CONFIG_BT_CTLR_LLCP_LOCAL_PROC_CTX_BUF_NUM=6
# ISO Connection Oriented
CONFIG_BT_CTLR_CENTRAL_ISO=y
CONFIG_BT_CTLR_PERIPHERAL_ISO=y
CONFIG_BT_CTLR_CONN_ISO_STREAMS=2
CONFIG_BT_CTLR_CONN_ISO_GROUPS=1
CONFIG_BT_CTLR_CONN_ISO_STREAMS=2
CONFIG_BT_CTLR_CONN_ISO_STREAMS_PER_GROUP=2
CONFIG_BT_CTLR_CONN_ISO_SDU_LEN_MAX=247
CONFIG_BT_CTLR_CONN_ISO_PDU_LEN_MAX=251
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_ISR_STACK_SIZE=1024
CONFIG_IDLE_STACK_SIZE=256
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=6144

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
Expand Down
19 changes: 12 additions & 7 deletions samples/bluetooth/hci_ipc/nrf5340_cpunet_iso-bt_ll_sw_split.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_ISR_STACK_SIZE=1024
CONFIG_IDLE_STACK_SIZE=256
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=6144
CONFIG_CBPRINTF_REDUCED_INTEGRAL=y

CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
Expand Down Expand Up @@ -46,7 +46,11 @@ CONFIG_BT_ISO_PERIPHERAL=y
CONFIG_BT_ISO_TX_MTU=310
CONFIG_BT_ISO_RX_MTU=310
CONFIG_BT_ISO_MAX_CHAN=4
CONFIG_BT_ISO_TX_BUF_COUNT=1
# In theory, CONFIG_BT_ISO_TX_BUF_COUNT=1, should be sufficient but this count
# is used in the context of IPC which falls into a "Newton's Cradle" effect
# where probably (CONFIG_BT_CTLR_ISO_TX_BUFFERS - CONFIG_BT_ISO_TX_BUF_COUNT)
# buffers get throttled. Hence, always have the value equal or greater.
CONFIG_BT_ISO_TX_BUF_COUNT=8
CONFIG_BT_ISO_RX_BUF_COUNT=1

# Controller
Expand Down Expand Up @@ -80,6 +84,7 @@ CONFIG_BT_CTLR_SCAN_AUX_SET=1
# CONFIG_BT_CTLR_SCAN_AUX_CHAIN_COUNT=1

CONFIG_BT_CTLR_ADV_RESERVE_MAX=n
CONFIG_BT_CTLR_ADV_AUX_SLOT_WINDOW=y
CONFIG_BT_CTLR_ADV_ISO_RESERVE_MAX=y
CONFIG_BT_CTLR_SYNC_ISO_RESERVE_MAX=n
CONFIG_BT_CTLR_CENTRAL_RESERVE_MAX=n
Expand All @@ -100,8 +105,8 @@ CONFIG_BT_CTLR_ADV_EXT=y
CONFIG_BT_CTLR_ADV_PERIODIC=y
CONFIG_BT_CTLR_SYNC_TRANSFER_SENDER=y
CONFIG_BT_CTLR_ADV_ISO=y
CONFIG_BT_CTLR_ADV_ISO_SET=2
CONFIG_BT_CTLR_ADV_ISO_STREAM_COUNT=4
CONFIG_BT_CTLR_ADV_ISO_SET=1
CONFIG_BT_CTLR_ADV_ISO_STREAM_COUNT=2
CONFIG_BT_CTLR_ADV_ISO_STREAM_MAX=2
CONFIG_BT_CTLR_ADV_ISO_PDU_LEN_MAX=247

Expand All @@ -118,16 +123,16 @@ CONFIG_BT_CTLR_SYNC_ISO_PDU_LEN_MAX=251
# ISO Connection Oriented
CONFIG_BT_CTLR_CENTRAL_ISO=y
CONFIG_BT_CTLR_PERIPHERAL_ISO=y
CONFIG_BT_CTLR_CONN_ISO_STREAMS=2
CONFIG_BT_CTLR_CONN_ISO_GROUPS=1
CONFIG_BT_CTLR_CONN_ISO_STREAMS=2
CONFIG_BT_CTLR_CONN_ISO_STREAMS_PER_GROUP=2
CONFIG_BT_CTLR_CONN_ISO_SDU_LEN_MAX=247
CONFIG_BT_CTLR_CONN_ISO_PDU_LEN_MAX=251
CONFIG_BT_CTLR_CONN_ISO_LOW_LATENCY_POLICY=y

# ISO Transmissions
CONFIG_BT_CTLR_ISOAL_SOURCES=4
CONFIG_BT_CTLR_ISO_TX_BUFFERS=12
CONFIG_BT_CTLR_ISOAL_SOURCES=2
CONFIG_BT_CTLR_ISO_TX_BUFFERS=8
CONFIG_BT_CTLR_ISO_TX_BUFFER_SIZE=255

# ISO Receptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_ISR_STACK_SIZE=1024
CONFIG_IDLE_STACK_SIZE=256
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=6144

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
Expand All @@ -20,11 +20,18 @@ CONFIG_BT_OBSERVER=n
CONFIG_BT_EXT_ADV=y
CONFIG_BT_PER_ADV=y
CONFIG_BT_ISO_BROADCASTER=y
CONFIG_BT_ISO_MAX_CHAN=4
CONFIG_BT_ISO_TX_BUF_COUNT=1
CONFIG_BT_CENTRAL=n
CONFIG_BT_PERIPHERAL=n

# ISO Streams
CONFIG_BT_ISO_MAX_CHAN=4
# In theory, CONFIG_BT_ISO_TX_BUF_COUNT=1, should be sufficient but this count
# is used in the context of IPC which falls into a "Newton's Cradle" effect
# where probably (CONFIG_BT_CTLR_ISO_TX_BUFFERS - CONFIG_BT_ISO_TX_BUF_COUNT)
# buffers get throttled. Hence, always have the value equal or greater.
CONFIG_BT_ISO_TX_BUF_COUNT=12
CONFIG_BT_ISO_RX_BUF_COUNT=1

# ISO Broadcast Controller
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_CTLR_ADV_PERIODIC=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_ISR_STACK_SIZE=1024
CONFIG_IDLE_STACK_SIZE=256
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=6144

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
Expand Down Expand Up @@ -35,7 +35,11 @@ CONFIG_BT_ISO_PERIPHERAL=n

# ISO Streams
CONFIG_BT_ISO_MAX_CHAN=2
CONFIG_BT_ISO_TX_BUF_COUNT=1
# In theory, CONFIG_BT_ISO_TX_BUF_COUNT=1, should be sufficient but this count
# is used in the context of IPC which falls into a "Newton's Cradle" effect
# where probably (CONFIG_BT_CTLR_ISO_TX_BUFFERS - CONFIG_BT_ISO_TX_BUF_COUNT)
# buffers get throttled. Hence, always have the value equal or greater.
CONFIG_BT_ISO_TX_BUF_COUNT=12
CONFIG_BT_ISO_RX_BUF_COUNT=1

# Controller
Expand All @@ -46,8 +50,8 @@ CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX=191
# ISO Connection Oriented
CONFIG_BT_CTLR_CENTRAL_ISO=y
CONFIG_BT_CTLR_PERIPHERAL_ISO=n
CONFIG_BT_CTLR_CONN_ISO_STREAMS=2
CONFIG_BT_CTLR_CONN_ISO_GROUPS=1
CONFIG_BT_CTLR_CONN_ISO_STREAMS=2
CONFIG_BT_CTLR_CONN_ISO_STREAMS_PER_GROUP=2
CONFIG_BT_CTLR_CONN_ISO_SDU_LEN_MAX=247
CONFIG_BT_CTLR_CONN_ISO_PDU_LEN_MAX=251
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_ISR_STACK_SIZE=1024
CONFIG_IDLE_STACK_SIZE=256
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=6144

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
Expand Down Expand Up @@ -35,7 +35,11 @@ CONFIG_BT_ISO_PERIPHERAL=y

# ISO Streams
CONFIG_BT_ISO_MAX_CHAN=2
CONFIG_BT_ISO_TX_BUF_COUNT=1
# In theory, CONFIG_BT_ISO_TX_BUF_COUNT=1, should be sufficient but this count
# is used in the context of IPC which falls into a "Newton's Cradle" effect
# where probably (CONFIG_BT_CTLR_ISO_TX_BUFFERS - CONFIG_BT_ISO_TX_BUF_COUNT)
# buffers get throttled. Hence, always have the value equal or greater.
CONFIG_BT_ISO_TX_BUF_COUNT=12
CONFIG_BT_ISO_RX_BUF_COUNT=1

# Controller
Expand All @@ -46,8 +50,8 @@ CONFIG_BT_CTLR_ADV_DATA_LEN_MAX=191
# ISO Connection Oriented
CONFIG_BT_CTLR_CENTRAL_ISO=n
CONFIG_BT_CTLR_PERIPHERAL_ISO=y
CONFIG_BT_CTLR_CONN_ISO_STREAMS=2
CONFIG_BT_CTLR_CONN_ISO_GROUPS=1
CONFIG_BT_CTLR_CONN_ISO_STREAMS=2
CONFIG_BT_CTLR_CONN_ISO_STREAMS_PER_GROUP=2
CONFIG_BT_CTLR_CONN_ISO_SDU_LEN_MAX=247
CONFIG_BT_CTLR_CONN_ISO_PDU_LEN_MAX=251
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_ISR_STACK_SIZE=1024
CONFIG_IDLE_STACK_SIZE=256
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=6144

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Reduce from 310 bytes, in nrf5340_cpunet_iso-bt_ll_sw_split.conf
# to be able to fit in 64KB RAM.

# Example:
# CONFIG_BT_ISO_TX_MTU=247
# CONFIG_BT_ISO_RX_MTU=251
1 change: 1 addition & 0 deletions samples/bluetooth/hci_ipc/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ tests:
tags: bluetooth
extra_args:
- CONF_FILE="nrf5340_cpunet_iso-bt_ll_sw_split.conf"
- EXTRA_CONF_FILE="overlay-nrf5340_cpunet_iso_nrf21540_ek-bt_ll_sw_split.conf"
- DTC_OVERLAY_FILE="./boards/nrf5340_audio_dk_nrf5340_cpunet_nrf21540_ek.overlay"
platform_allow:
- nrf5340_audio_dk/nrf5340/cpunet
Expand Down
1 change: 1 addition & 0 deletions samples/bluetooth/hci_uart/overlay-all-bt_ll_sw_split.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ CONFIG_BT_CTLR_SCAN_AUX_SET=1
# CONFIG_BT_CTLR_SCAN_AUX_CHAIN_COUNT=1

CONFIG_BT_CTLR_ADV_RESERVE_MAX=n
CONFIG_BT_CTLR_ADV_AUX_SLOT_WINDOW=y
CONFIG_BT_CTLR_ADV_ISO_RESERVE_MAX=y
CONFIG_BT_CTLR_SYNC_ISO_RESERVE_MAX=n
CONFIG_BT_CTLR_CENTRAL_RESERVE_MAX=n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ CONFIG_BT_CTLR_SCAN_AUX_SET=1
# CONFIG_BT_CTLR_SCAN_AUX_CHAIN_COUNT=1

CONFIG_BT_CTLR_ADV_RESERVE_MAX=n
CONFIG_BT_CTLR_ADV_AUX_SLOT_WINDOW=y
CONFIG_BT_CTLR_ADV_ISO_RESERVE_MAX=y
CONFIG_BT_CTLR_SYNC_ISO_RESERVE_MAX=n
CONFIG_BT_CTLR_CENTRAL_RESERVE_MAX=n
Expand Down
8 changes: 8 additions & 0 deletions subsys/bluetooth/controller/Kconfig.ll_sw_split
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,14 @@ config BT_CTLR_ADV_RESERVE_MAX
corresponding to the Advertising Data present at the time of the
start/enable of Advertising is used.

config BT_CTLR_ADV_AUX_SLOT_WINDOW
bool "Reschedule Extended Advertising Auxiliary PDUs"
depends on BT_TICKER_EXT && \
BT_BROADCASTER && \
BT_CTLR_ADV_EXT
help
Reschedule Extended Advertising Auxiliary PDUs.

config BT_CTLR_ADV_ISO_RESERVE_MAX
bool "Use maximum Broadcast ISO event time reservation"
depends on BT_CTLR_ADV_ISO
Expand Down
32 changes: 26 additions & 6 deletions subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync_iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
static int create_prepare_cb(struct lll_prepare_param *p);
static int prepare_cb(struct lll_prepare_param *p);
static int prepare_cb_common(struct lll_prepare_param *p);
static int is_abort_cb(void *next, void *curr, lll_prepare_cb_t *resume_cb);
static void abort_cb(struct lll_prepare_param *prepare_param, void *param);
static void isr_rx_estab(void *param);
static void isr_rx(void *param);
Expand All @@ -56,9 +57,10 @@
static void isr_rx_iso_data_valid(const struct lll_sync_iso *const lll,
uint16_t handle, struct node_rx_pdu *node_rx);
static void isr_rx_iso_data_invalid(const struct lll_sync_iso *const lll,
uint8_t bn, uint16_t handle,
uint16_t latency, uint8_t bn,
uint16_t handle,
struct node_rx_pdu *node_rx);
static void isr_rx_ctrl_recv(struct lll_sync_iso *lll, struct pdu_bis *pdu);

Check notice on line 63 in subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync_iso.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync_iso.c:63 -static void isr_rx_iso_data_invalid(const struct lll_sync_iso *const lll, - uint16_t latency, uint8_t bn, - uint16_t handle, - struct node_rx_pdu *node_rx); +static void isr_rx_iso_data_invalid(const struct lll_sync_iso *const lll, uint16_t latency, + uint8_t bn, uint16_t handle, struct node_rx_pdu *node_rx);

/* FIXME: Optimize by moving to a common place, as similar variable is used for
* connections too.
Expand Down Expand Up @@ -146,9 +148,9 @@
int err;

/* Invoke common pipeline handling of prepare */
err = lll_prepare(lll_is_abort_cb, abort_cb, create_prepare_cb, 0U,
err = lll_prepare(is_abort_cb, abort_cb, create_prepare_cb, 0U,
param);
LL_ASSERT(!err || err == -EINPROGRESS);

Check notice on line 153 in subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync_iso.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync_iso.c:153 - err = lll_prepare(is_abort_cb, abort_cb, create_prepare_cb, 0U, - param); + err = lll_prepare(is_abort_cb, abort_cb, create_prepare_cb, 0U, param);
}

static void prepare_bh(void *param)
Expand All @@ -156,7 +158,7 @@
int err;

/* Invoke common pipeline handling of prepare */
err = lll_prepare(lll_is_abort_cb, abort_cb, prepare_cb, 0U, param);
err = lll_prepare(is_abort_cb, abort_cb, prepare_cb, 0U, param);
LL_ASSERT(!err || err == -EINPROGRESS);
}

Expand Down Expand Up @@ -404,6 +406,20 @@
return 0;
}

static int is_abort_cb(void *next, void *curr, lll_prepare_cb_t *resume_cb)
{
if (next != curr) {
struct lll_sync_iso *lll;

lll = curr;
if (lll->bn_curr <= lll->bn) {
return 0;
}
}

return -ECANCELED;
}

static void abort_cb(struct lll_prepare_param *prepare_param, void *param)
{
struct event_done_extra *e;
Expand Down Expand Up @@ -1217,7 +1233,8 @@
pdu->len = 0U;

handle = LL_BIS_SYNC_HANDLE_FROM_IDX(stream_handle);
isr_rx_iso_data_invalid(lll, bn, handle, node_rx);
isr_rx_iso_data_invalid(lll, latency_event, bn,
handle, node_rx);

iso_rx_put(node_rx->hdr.link, node_rx);
}
Expand Down Expand Up @@ -1381,9 +1398,10 @@
}

static void isr_rx_iso_data_invalid(const struct lll_sync_iso *const lll,
uint8_t bn, uint16_t handle,
uint16_t latency, uint8_t bn,
uint16_t handle,
struct node_rx_pdu *node_rx)
{

Check notice on line 1404 in subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync_iso.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync_iso.c:1404 -static void isr_rx_iso_data_invalid(const struct lll_sync_iso *const lll, - uint16_t latency, uint8_t bn, - uint16_t handle, - struct node_rx_pdu *node_rx) +static void isr_rx_iso_data_invalid(const struct lll_sync_iso *const lll, uint16_t latency, + uint8_t bn, uint16_t handle, struct node_rx_pdu *node_rx)
struct lll_sync_iso_stream *stream;
struct node_rx_iso_meta *iso_meta;

Expand All @@ -1391,15 +1409,17 @@
node_rx->hdr.handle = handle;

iso_meta = &node_rx->rx_iso_meta;
iso_meta->payload_number = lll->payload_count - bn - 1U;
iso_meta->payload_number = lll->payload_count - lll->bn - bn - 1U;

stream = ull_sync_iso_lll_stream_get(lll->stream_handle[0]);
iso_meta->timestamp = HAL_TICKER_TICKS_TO_US(radio_tmr_start_get()) +
radio_tmr_aa_restore() - addr_us_get(lll->phy) -
((stream->bis_index - 1U) *
lll->sub_interval * ((lll->irc * lll->bn) +
lll->ptc));
iso_meta->timestamp -= (latency * lll->iso_interval *
PERIODIC_INT_UNIT_US);
iso_meta->timestamp %=

Check notice on line 1422 in subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync_iso.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync_iso.c:1422 - iso_meta->timestamp -= (latency * lll->iso_interval * - PERIODIC_INT_UNIT_US); + iso_meta->timestamp -= (latency * lll->iso_interval * PERIODIC_INT_UNIT_US);
HAL_TICKER_TICKS_TO_US_64BIT(BIT64(HAL_TICKER_CNTR_MSBIT + 1U));
iso_meta->status = 1U;
}
Expand Down
Loading
Loading