btdev: Fix CIS Establish ISO Interval
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 20 Jun 2023 22:37:35 +0000 (15:37 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 13:34:03 +0000 (19:04 +0530)
ISO Interval is actually using 1.25 ms slots so it needs to be properly
converted.

emulator/btdev.c

index 462f352ea2525f8487a5f2c3e6d3cd3e463bbe4d..0a375febad6872960ffd79be7aa94a2dc7cd78c3 100755 (executable)
@@ -5977,7 +5977,7 @@ static void le_cis_estabilished(struct btdev *dev, struct btdev_conn *conn,
                evt.p_ft = 0x01;
                evt.c_mtu = le_cig->cis[cis_idx].c_sdu;
                evt.p_mtu = le_cig->cis[cis_idx].p_sdu;
-               evt.interval = le_cig->params.c_latency;
+               evt.interval = (le_cig->params.c_latency + 1) / 1.25;
        }
 
        le_meta_event(dev, BT_HCI_EVT_LE_CIS_ESTABLISHED, &evt, sizeof(evt));