Skip to content

Commit 3e6ea47

Browse files
Thalleycarlescufi
authored andcommitted
Bluetooth: ISO: Additional text for setting unidir values for the CIG
Add additional text to explain why we use the TX values if RX is disabled and vice versa. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 5652d59 commit 3e6ea47

File tree

1 file changed

+12
-2
lines changed
  • subsys/bluetooth/host

1 file changed

+12
-2
lines changed

subsys/bluetooth/host/iso.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,12 @@ static struct net_buf *hci_le_set_cig_params(struct bt_iso_create_param *param)
405405
sys_put_le24(param->chans[0]->qos->tx->interval, req->m_interval);
406406
req->m_latency = sys_cpu_to_le16(param->chans[0]->qos->tx->latency);
407407
} else {
408-
/* Use RX values if TX is disabled */
408+
/* Use RX values if TX is disabled.
409+
* If TX is disabled then the values don't have any meaning, as
410+
* we will create a new CIG in case we want to change the
411+
* directions, but will need to be set to the fields to some
412+
* valid (nonzero) values for the controller to accept them.
413+
*/
409414
sys_put_le24(param->chans[0]->qos->rx->interval, req->m_interval);
410415
req->m_latency = sys_cpu_to_le16(param->chans[0]->qos->rx->latency);
411416
}
@@ -414,7 +419,12 @@ static struct net_buf *hci_le_set_cig_params(struct bt_iso_create_param *param)
414419
sys_put_le24(param->chans[0]->qos->rx->interval, req->s_interval);
415420
req->s_latency = sys_cpu_to_le16(param->chans[0]->qos->rx->latency);
416421
} else {
417-
/* Use TX values if RX is disabled */
422+
/* Use TX values if RX is disabled.
423+
* If RX is disabled then the values don't have any meaning, as
424+
* we will create a new CIG in case we want to change the
425+
* directions, but will need to be set to the fields to some
426+
* valid (nonzero) values for the controller to accept them.
427+
*/
418428
sys_put_le24(param->chans[0]->qos->tx->interval, req->s_interval);
419429
req->s_latency = sys_cpu_to_le16(param->chans[0]->qos->tx->latency);
420430
}

0 commit comments

Comments
 (0)