|
16 | 16 | #include <zephyr/bluetooth/hci_types.h> |
17 | 17 | #include <zephyr/bluetooth/conn.h> |
18 | 18 |
|
| 19 | +#include <zephyr/sys/byteorder.h> |
| 20 | + |
19 | 21 | #include "util/memq.h" |
20 | 22 |
|
21 | 23 | #include "hal/ccm.h" |
@@ -1158,7 +1160,7 @@ static isoal_status_t isoal_rx_framed_consume(struct isoal_sink *sink, |
1158 | 1160 | case ISOAL_START: |
1159 | 1161 | if (!sc) { |
1160 | 1162 | /* Start segment, included time-offset */ |
1161 | | - timeoffset = seg_hdr->timeoffset; |
| 1163 | + timeoffset = sys_le24_to_cpu(seg_hdr->timeoffset); |
1162 | 1164 | anchorpoint = meta->timestamp; |
1163 | 1165 | latency = session->sdu_sync_const; |
1164 | 1166 | timestamp = isoal_get_wrapped_time_us(anchorpoint, |
@@ -1215,7 +1217,7 @@ static isoal_status_t isoal_rx_framed_consume(struct isoal_sink *sink, |
1215 | 1217 |
|
1216 | 1218 | if (!sc) { |
1217 | 1219 | /* Start segment, included time-offset */ |
1218 | | - timeoffset = seg_hdr->timeoffset; |
| 1220 | + timeoffset = sys_le24_to_cpu(seg_hdr->timeoffset); |
1219 | 1221 | anchorpoint = meta->timestamp; |
1220 | 1222 | latency = session->sdu_sync_const; |
1221 | 1223 | timestamp = isoal_get_wrapped_time_us(anchorpoint, |
@@ -1634,7 +1636,7 @@ static isoal_status_t isoal_tx_pdu_emit(const struct isoal_source *source_ctx, |
1634 | 1636 | status = source_ctx->session.pdu_emit(node_tx, handle); |
1635 | 1637 |
|
1636 | 1638 | ISOAL_LOG_DBG("[%p] PDU %llu err=%X len=%u frags=%u released", |
1637 | | - source_ctx, node_tx->payload_count, status, |
| 1639 | + source_ctx, payload_number, status, |
1638 | 1640 | produced_pdu->contents.pdu->len, sdu_fragments); |
1639 | 1641 |
|
1640 | 1642 | if (status != ISOAL_STATUS_OK) { |
@@ -2479,15 +2481,15 @@ static isoal_status_t isoal_tx_framed_produce(isoal_source_handle_t source_hdl, |
2479 | 2481 | */ |
2480 | 2482 | err |= isoal_insert_seg_header_timeoffset(source, |
2481 | 2483 | false, false, |
2482 | | - time_offset); |
| 2484 | + sys_cpu_to_le24(time_offset)); |
2483 | 2485 | pp->pdu_state = BT_ISO_CONT; |
2484 | 2486 | } else if (!padding_pdu && pp->pdu_state == BT_ISO_CONT && pp->pdu_written == 0) { |
2485 | 2487 | /* Continuing an SDU in a new PDU. Segmentation header |
2486 | 2488 | * alone should be inserted. |
2487 | 2489 | */ |
2488 | 2490 | err |= isoal_insert_seg_header_timeoffset(source, |
2489 | 2491 | true, false, |
2490 | | - 0); |
| 2492 | + sys_cpu_to_le24(0)); |
2491 | 2493 | } |
2492 | 2494 |
|
2493 | 2495 | /* |
|
0 commit comments