@@ -1569,14 +1569,14 @@ static void iso_rx_cig_ref_point_update(struct ll_conn_iso_group *cig,
1569
1569
1570
1570
static void iso_rx_demux (void * param )
1571
1571
{
1572
- #if defined(CONFIG_BT_CTLR_CONN_ISO )
1573
- struct ll_conn_iso_stream * cis ;
1574
- struct ll_conn_iso_group * cig ;
1572
+ #if defined(CONFIG_BT_CTLR_CONN_ISO ) || \
1573
+ defined(CONFIG_BT_CTLR_SYNC_ISO )
1575
1574
struct ll_iso_datapath * dp ;
1575
+ #endif /* CONFIG_BT_CTLR_CONN_ISO || CONFIG_BT_CTLR_SYNC_ISO */
1576
1576
struct node_rx_pdu * rx_pdu ;
1577
- #endif /* CONFIG_BT_CTLR_CONN_ISO */
1578
1577
struct node_rx_hdr * rx ;
1579
1578
memq_link_t * link ;
1579
+ uint16_t handle ;
1580
1580
1581
1581
do {
1582
1582
link = memq_peek (memq_ull_iso_rx .head , memq_ull_iso_rx .tail ,
@@ -1596,14 +1596,35 @@ static void iso_rx_demux(void *param)
1596
1596
(void )memq_dequeue (memq_ull_iso_rx .tail , & memq_ull_iso_rx .head ,
1597
1597
NULL );
1598
1598
1599
- #if defined(CONFIG_BT_CTLR_CONN_ISO )
1600
1599
rx_pdu = (struct node_rx_pdu * )rx ;
1601
- cis = ll_conn_iso_stream_get (rx_pdu -> hdr .handle );
1602
- cig = cis -> group ;
1603
- dp = cis -> hdr .datapath_out ;
1600
+ handle = rx_pdu -> hdr .handle ;
1601
+ dp = NULL ;
1604
1602
1605
- iso_rx_cig_ref_point_update (cig , cis , & rx_pdu -> hdr .rx_iso_meta );
1603
+ if (false) {
1604
+ #if defined(CONFIG_BT_CTLR_CONN_ISO )
1605
+ } else if (IS_CIS_HANDLE (handle )) {
1606
+ struct ll_conn_iso_stream * cis ;
1607
+ struct ll_conn_iso_group * cig ;
1608
+
1609
+ cis = ll_conn_iso_stream_get (handle );
1610
+ cig = cis -> group ;
1611
+ dp = cis -> hdr .datapath_out ;
1606
1612
1613
+ iso_rx_cig_ref_point_update (cig , cis ,
1614
+ & rx_pdu -> hdr .rx_iso_meta );
1615
+ #endif /* CONFIG_BT_CTLR_CONN_ISO */
1616
+ #if defined(CONFIG_BT_CTLR_SYNC_ISO )
1617
+ } else if (IS_SYNC_ISO_HANDLE (handle )) {
1618
+ struct lll_sync_iso_stream * sync_stream ;
1619
+ uint16_t stream_handle ;
1620
+
1621
+ stream_handle = LL_BIS_SYNC_IDX_FROM_HANDLE (handle );
1622
+ sync_stream = ull_sync_iso_stream_get (stream_handle );
1623
+ dp = sync_stream ? sync_stream -> dp : NULL ;
1624
+ #endif /* CONFIG_BT_CTLR_SYNC_ISO */
1625
+ }
1626
+
1627
+ #if defined(CONFIG_BT_CTLR_CONN_ISO ) || defined(CONFIG_BT_CTLR_SYNC_ISO )
1607
1628
if (dp && dp -> path_id != BT_HCI_DATAPATH_ID_HCI ) {
1608
1629
/* If vendor specific datapath pass to ISO AL here,
1609
1630
* in case of HCI destination it will be passed in
@@ -1620,7 +1641,7 @@ static void iso_rx_demux(void *param)
1620
1641
1621
1642
LL_ASSERT (err == ISOAL_STATUS_OK ); /* TODO handle err */
1622
1643
}
1623
- #endif /* CONFIG_BT_CTLR_CONN_ISO */
1644
+ #endif /* CONFIG_BT_CTLR_CONN_ISO || CONFIG_BT_CTLR_SYNC_ISO */
1624
1645
1625
1646
/* Let ISO PDU start its long journey upwards */
1626
1647
ll_iso_rx_put (link , rx );
0 commit comments