@@ -155,3 +155,156 @@
#define LC3_CONFIG_48_6 \
LC3_CONFIG_48(LC3_CONFIG_DURATION_10, 155u)
+
+#define LC3_QOS_UNFRAMED 0x00
+#define LC3_QOS_FRAMED 0x01
+
+#define LC3_QOS_UCAST(_frame, _pd, _t_lat, _interval, _lat, _sdu, _rtn) \
+{ \
+ .ucast.cig_id = 0x00, \
+ .ucast.cis_id = 0x00, \
+ .ucast.delay = _pd, \
+ .ucast.target_latency = _t_lat, \
+ .ucast.io_qos.interval = _interval, \
+ .ucast.io_qos.latency = _lat, \
+ .ucast.io_qos.sdu = _sdu, \
+ .ucast.io_qos.phy = BT_BAP_CONFIG_PHY_2M, \
+ .ucast.io_qos.rtn = _rtn, \
+}
+
+#define LC3_QOS_UCAST_7_5_UNFRAMED(_pd, _t_lat, _lat, _sdu, _rtn) \
+ LC3_QOS_UCAST(LC3_QOS_UNFRAMED, _pd, _t_lat, 7500u, _lat, _sdu, _rtn)
+
+#define LC3_QOS_UCAST_10_UNFRAMED(_pd, _t_lat, _lat, _sdu, _rtn) \
+ LC3_QOS_UCAST(LC3_QOS_UNFRAMED, _pd, _t_lat, 10000u, _lat, _sdu, _rtn)
+
+#define LC3_QOS_UCAST_FRAMED(_pd, _t_lat, _interval, _lat, _sdu, _rtn) \
+ LC3_QOS_UCAST(LC3_QOS_FRAMED, _pd, _t_lat, _interval, _lat, _sdu, _rtn)
+
+#define LC3_QOS_8_1_1 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 8u, 26u, 2u)
+
+#define LC3_QOS_8_1_2 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 75u, 26u, 13u)
+
+#define LC3_QOS_8_2_1 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 10u, 30u, 2u)
+
+#define LC3_QOS_8_2_2 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 95u, 30u, 13u)
+
+#define LC3_QOS_16_1_1 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 8u, 30u, 2u)
+
+#define LC3_QOS_16_1_2 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 75u, 30u, 13u)
+
+#define LC3_QOS_16_2_1 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 10u, 40u, 2u)
+
+#define LC3_QOS_16_2_2 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 95u, 40u, 13u)
+
+#define LC3_QOS_24_1_1 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 8u, 45u, 2u)
+
+#define LC3_QOS_24_1_2 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 75u, 45u, 13u)
+
+#define LC3_QOS_24_2_1 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 10u, 60u, 2u)
+
+#define LC3_QOS_24_2_2 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 95u, 60u, 13u)
+
+#define LC3_QOS_32_1_1 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 8u, 60u, 2u)
+
+#define LC3_QOS_32_1_2 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 75u, 60u, 13u)
+
+#define LC3_QOS_32_2_1 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 10u, 80u, 2u)
+
+#define LC3_QOS_32_2_2 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 95u, 80u, 13u)
+
+#define LC3_QOS_44_1_1 \
+ LC3_QOS_UCAST_FRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 8163u, 24u, 98u, 5u)
+
+#define LC3_QOS_44_1_2 \
+ LC3_QOS_UCAST_FRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 8163u, 80u, 98u, 13u)
+
+#define LC3_QOS_44_2_1 \
+ LC3_QOS_UCAST_FRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 10884u, 31u, 130u, 5u)
+
+#define LC3_QOS_44_2_2 \
+ LC3_QOS_UCAST_FRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 10884u, 85u, 130u, 13u)
+
+#define LC3_QOS_48_1_1 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 15u, 75u, 5u)
+
+#define LC3_QOS_48_1_2 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 75u, 75u, 13u)
+
+#define LC3_QOS_48_2_1 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 20u, 100u, 5u)
+
+#define LC3_QOS_48_2_2 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 95u, 100u, 13u)
+
+#define LC3_QOS_48_3_1 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 15u, 90u, 5u)
+
+#define LC3_QOS_48_3_2 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 75u, 90u, 13u)
+
+#define LC3_QOS_48_4_1 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 20u, 120u, 5u)
+
+#define LC3_QOS_48_4_2 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 100u, 120u, 13u)
+
+#define LC3_QOS_48_5_1 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 15u, 117u, 5u)
+
+#define LC3_QOS_48_5_2 \
+ LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 75u, 117u, 13u)
+
+#define LC3_QOS_48_6_1 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 20u, 155u, 5u)
+
+#define LC3_QOS_48_6_2 \
+ LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+ 100u, 155u, 13u)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> This adds the QoS preset definitions as per BAP specification. --- src/shared/lc3.h | 153 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+)