diff mbox series

[BlueZ,v2,1/2] shared/lc3: Add definitions for Audio Configurations

Message ID 20240306230440.3983598-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit a070ceac6ba897ba64021d1f9963dbb4f1a1c203
Headers show
Series [BlueZ,v2,1/2] shared/lc3: Add definitions for Audio Configurations | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch fail ERROR:SPACING: space prohibited before that close parenthesis ')' #178: FILE: src/shared/lc3.h:161: + LC3_CONFIG_8(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_8_2 ) /github/workspace/src/src/13584719.patch total: 1 errors, 0 warnings, 608 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/src/13584719.patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Luiz Augusto von Dentz March 6, 2024, 11:04 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This adds defines for Audio Configurations so it can be used for
upcoming tests.
---
 src/shared/lc3.h | 482 +++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 401 insertions(+), 81 deletions(-)

Comments

bluez.test.bot@gmail.com March 7, 2024, 12:49 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=833147

---Test result---

Test Summary:
CheckPatch                    FAIL      3.90 seconds
GitLint                       PASS      0.51 seconds
BuildEll                      PASS      23.88 seconds
BluezMake                     PASS      1625.19 seconds
MakeCheck                     PASS      13.70 seconds
MakeDistcheck                 PASS      173.11 seconds
CheckValgrind                 PASS      242.93 seconds
CheckSmatch                   PASS      343.99 seconds
bluezmakeextell               PASS      116.95 seconds
IncrementalBuild              PASS      2206.43 seconds
ScanBuild                     PASS      952.13 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v2,1/2] shared/lc3: Add definitions for Audio Configurations
ERROR:SPACING: space prohibited before that close parenthesis ')'
#178: FILE: src/shared/lc3.h:161:
+	LC3_CONFIG_8(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_8_2 )

/github/workspace/src/src/13584719.patch total: 1 errors, 0 warnings, 608 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13584719.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth
Paul Menzel March 7, 2024, 6:52 a.m. UTC | #2
Dear Luiz,


Am 07.03.24 um 00:04 schrieb Luiz Augusto von Dentz:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This summary could be:

Define macros for Audio Configurations

> This adds defines for Audio Configurations so it can be used for
> upcoming tests.
> ---
>   src/shared/lc3.h | 482 +++++++++++++++++++++++++++++++++++++++--------
>   1 file changed, 401 insertions(+), 81 deletions(-)
> 
> diff --git a/src/shared/lc3.h b/src/shared/lc3.h
> index e0b2cdfc346d..41b29d4d1c8f 100644
> --- a/src/shared/lc3.h
> +++ b/src/shared/lc3.h
> @@ -88,77 +88,200 @@
>   			0x02, LC3_CONFIG_DURATION, _duration, \
>   			0x03, LC3_CONFIG_FRAME_LEN, _len, _len >> 8)
>   
> +#define LC3_AC_BITS(_ac) (BIT(_ac) - 1)

I’d appreciate a comment, that AC means audio configuration.

[…]


Kind regards,

Paul
patchwork-bot+bluetooth@kernel.org March 7, 2024, 2:50 p.m. UTC | #3
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed,  6 Mar 2024 18:04:39 -0500 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This adds defines for Audio Configurations so it can be used for
> upcoming tests.
> ---
>  src/shared/lc3.h | 482 +++++++++++++++++++++++++++++++++++++++--------
>  1 file changed, 401 insertions(+), 81 deletions(-)

Here is the summary with links:
  - [BlueZ,v2,1/2] shared/lc3: Add definitions for Audio Configurations
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a070ceac6ba8
  - [BlueZ,v2,2/2] test-bap: Add STR sink tests
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2da45fc7e2d6

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/shared/lc3.h b/src/shared/lc3.h
index e0b2cdfc346d..41b29d4d1c8f 100644
--- a/src/shared/lc3.h
+++ b/src/shared/lc3.h
@@ -88,77 +88,200 @@ 
 			0x02, LC3_CONFIG_DURATION, _duration, \
 			0x03, LC3_CONFIG_FRAME_LEN, _len, _len >> 8)
 
+#define LC3_AC_BITS(_ac) (BIT(_ac) - 1)
+
+#define LC3_CONFIG_AC(_freq, _duration, _len, _ac) \
+	UTIL_IOV_INIT(0x02, LC3_CONFIG_FREQ, _freq, \
+			0x02, LC3_CONFIG_DURATION, _duration, \
+			0x03, LC3_CONFIG_FRAME_LEN, _len, _len >> 8, \
+			0x05, LC3_CONFIG_CHAN_ALLOC, LC3_AC_BITS(_ac), \
+			LC3_AC_BITS(_ac) >> 8 & 0xff, \
+			LC3_AC_BITS(_ac) >> 16 & 0xff, \
+			LC3_AC_BITS(_ac) >> 24 & 0xff)
+
 #define LC3_CONFIG_8(_duration, _len) \
 	LC3_CONFIG(LC3_CONFIG_FREQ_8KHZ, _duration, _len)
 
+#define LC3_CONFIG_8_AC(_duration, _len, _ac) \
+	LC3_CONFIG_AC(LC3_CONFIG_FREQ_8KHZ, _duration, _len, _ac)
+
 #define LC3_CONFIG_11(_duration, _len) \
 	LC3_CONFIG(LC3_CONFIG_FREQ_11KHZ, _duration, _len)
 
+#define LC3_CONFIG_11_AC(_duration, _len, _ac) \
+	LC3_CONFIG_AC(LC3_CONFIG_FREQ_11KHZ, _duration, _len, _ac)
+
 #define LC3_CONFIG_16(_duration, _len) \
 	LC3_CONFIG(LC3_CONFIG_FREQ_16KHZ, _duration, _len)
 
+#define LC3_CONFIG_16_AC(_duration, _len, _ac) \
+	LC3_CONFIG_AC(LC3_CONFIG_FREQ_16KHZ, _duration, _len, _ac)
+
 #define LC3_CONFIG_22(_duration, _len) \
 	LC3_CONFIG(LC3_CONFIG_FREQ_22KHZ, _duration, _len)
 
+#define LC3_CONFIG_22_AC(_duration, _len) \
+	LC3_CONFIG(LC3_CONFIG_FREQ_22KHZ, _duration, _len, _ac)
+
 #define LC3_CONFIG_24(_duration, _len) \
 	LC3_CONFIG(LC3_CONFIG_FREQ_24KHZ, _duration, _len)
 
+#define LC3_CONFIG_24_AC(_duration, _len, _ac) \
+	LC3_CONFIG_AC(LC3_CONFIG_FREQ_24KHZ, _duration, _len, _ac)
+
 #define LC3_CONFIG_32(_duration, _len) \
 	LC3_CONFIG(LC3_CONFIG_FREQ_32KHZ, _duration, _len)
 
+#define LC3_CONFIG_32_AC(_duration, _len, _ac) \
+	LC3_CONFIG_AC(LC3_CONFIG_FREQ_32KHZ, _duration, _len, _ac)
+
 #define LC3_CONFIG_44(_duration, _len) \
 	LC3_CONFIG(LC3_CONFIG_FREQ_44KHZ, _duration, _len)
 
+#define LC3_CONFIG_44_AC(_duration, _len, _ac) \
+	LC3_CONFIG_AC(LC3_CONFIG_FREQ_44KHZ, _duration, _len, _ac)
+
 #define LC3_CONFIG_48(_duration, _len) \
 	LC3_CONFIG(LC3_CONFIG_FREQ_48KHZ, _duration, _len)
 
+#define LC3_CONFIG_48_AC(_duration, _len, _ac) \
+	LC3_CONFIG_AC(LC3_CONFIG_FREQ_48KHZ, _duration, _len, _ac)
+
+#define LC3_CONFIG_FRAME_LEN_8_1 26u
+
 #define LC3_CONFIG_8_1 \
-	LC3_CONFIG_8(LC3_CONFIG_DURATION_7_5, 26u)
+	LC3_CONFIG_8(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_8_1)
+
+#define LC3_CONFIG_8_1_AC(_ac) \
+	LC3_CONFIG_8_AC(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_8_1, _ac)
+
+#define LC3_CONFIG_FRAME_LEN_8_2 30u
 
 #define LC3_CONFIG_8_2 \
-	LC3_CONFIG_8(LC3_CONFIG_DURATION_10, 30u)
+	LC3_CONFIG_8(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_8_2 )
+
+#define LC3_CONFIG_8_2_AC(_ac) \
+	LC3_CONFIG_8_AC(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_8_2, _ac)
+
+#define LC3_CONFIG_FRAME_LEN_16_1 30u
 
 #define LC3_CONFIG_16_1 \
-	LC3_CONFIG_16(LC3_CONFIG_DURATION_7_5, 30u)
+	LC3_CONFIG_16(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_16_1)
+
+#define LC3_CONFIG_16_1_AC(_ac) \
+	LC3_CONFIG_16_AC(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_16_1, \
+			_ac)
+
+#define LC3_CONFIG_FRAME_LEN_16_2 40u
 
 #define LC3_CONFIG_16_2 \
-	LC3_CONFIG_16(LC3_CONFIG_DURATION_10, 40u)
+	LC3_CONFIG_16(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_16_2)
+
+#define LC3_CONFIG_16_2_AC(_ac) \
+	LC3_CONFIG_16_AC(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_16_2, _ac)
+
+#define LC3_CONFIG_FRAME_LEN_24_1 45u
 
 #define LC3_CONFIG_24_1 \
-	LC3_CONFIG_24(LC3_CONFIG_DURATION_7_5, 45u)
+	LC3_CONFIG_24(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_24_1)
+
+#define LC3_CONFIG_24_1_AC(_ac) \
+	LC3_CONFIG_24_AC(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_24_1, \
+			_ac)
+
+#define LC3_CONFIG_FRAME_LEN_24_2 60u
 
 #define LC3_CONFIG_24_2 \
-	LC3_CONFIG_24(LC3_CONFIG_DURATION_10, 60u)
+	LC3_CONFIG_24(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_24_2)
+
+#define LC3_CONFIG_24_2_AC(_ac) \
+	LC3_CONFIG_24_AC(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_24_2, _ac)
+
+#define LC3_CONFIG_FRAME_LEN_32_1 60u
 
 #define LC3_CONFIG_32_1 \
-	LC3_CONFIG_32(LC3_CONFIG_DURATION_7_5, 60u)
+	LC3_CONFIG_32(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_32_1)
+
+#define LC3_CONFIG_32_1_AC(_ac) \
+	LC3_CONFIG_32_AC(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_32_1, \
+			_ac)
+
+#define LC3_CONFIG_FRAME_LEN_32_2 80u
 
 #define LC3_CONFIG_32_2 \
-	LC3_CONFIG_32(LC3_CONFIG_DURATION_10, 80u)
+	LC3_CONFIG_32(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_32_2)
+
+#define LC3_CONFIG_32_2_AC(_ac) \
+	LC3_CONFIG_32_AC(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_32_2, _ac)
+
+#define LC3_CONFIG_FRAME_LEN_44_1 98u
 
 #define LC3_CONFIG_44_1 \
-	LC3_CONFIG_44(LC3_CONFIG_DURATION_7_5, 98u)
+	LC3_CONFIG_44(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_44_1)
+
+#define LC3_CONFIG_44_1_AC(_ac) \
+	LC3_CONFIG_44_AC(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_44_1, \
+			 _ac)
+
+#define LC3_CONFIG_FRAME_LEN_44_2 130u
 
 #define LC3_CONFIG_44_2 \
-	LC3_CONFIG_44(LC3_CONFIG_DURATION_10, 130u)
+	LC3_CONFIG_44(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_44_2)
+
+#define LC3_CONFIG_44_2_AC(_ac) \
+	LC3_CONFIG_44_AC(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_44_2, _ac)
+
+#define LC3_CONFIG_FRAME_LEN_48_1 75u
 
 #define LC3_CONFIG_48_1 \
-	LC3_CONFIG_48(LC3_CONFIG_DURATION_7_5, 75u)
+	LC3_CONFIG_48(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_48_1)
+
+#define LC3_CONFIG_48_1_AC(_ac) \
+	LC3_CONFIG_48_AC(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_48_1, \
+			_ac)
+
+#define LC3_CONFIG_FRAME_LEN_48_2 100u
 
 #define LC3_CONFIG_48_2 \
-	LC3_CONFIG_48(LC3_CONFIG_DURATION_10, 100u)
+	LC3_CONFIG_48(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_48_2)
+
+#define LC3_CONFIG_48_2_AC(_ac) \
+	LC3_CONFIG_48_AC(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_48_2, _ac)
+
+#define LC3_CONFIG_FRAME_LEN_48_3 90u
 
 #define LC3_CONFIG_48_3 \
-	LC3_CONFIG_48(LC3_CONFIG_DURATION_7_5, 90u)
+	LC3_CONFIG_48(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_48_3)
+
+#define LC3_CONFIG_48_3_AC(_ac) \
+	LC3_CONFIG_48_AC(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_48_3, \
+			_ac)
+
+#define LC3_CONFIG_FRAME_LEN_48_4 120u
 
 #define LC3_CONFIG_48_4 \
-	LC3_CONFIG_48(LC3_CONFIG_DURATION_10, 120u)
+	LC3_CONFIG_48(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_48_4)
+
+#define LC3_CONFIG_48_4_AC(_ac) \
+	LC3_CONFIG_48_AC(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_48_4, _ac)
+
+#define LC3_CONFIG_FRAME_LEN_48_5 117u
 
 #define LC3_CONFIG_48_5 \
-	LC3_CONFIG_48(LC3_CONFIG_DURATION_7_5, 117u)
+	LC3_CONFIG_48(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_48_5)
+
+#define LC3_CONFIG_48_5_AC(_ac) \
+	LC3_CONFIG_48_AC(LC3_CONFIG_DURATION_7_5, LC3_CONFIG_FRAME_LEN_48_5, \
+			_ac)
+
+#define LC3_CONFIG_FRAME_LEN_48_6 155u
 
 #define LC3_CONFIG_48_6 \
-	LC3_CONFIG_48(LC3_CONFIG_DURATION_10, 155u)
+	LC3_CONFIG_48(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_48_6)
+
+#define LC3_CONFIG_48_6_AC(_ac) \
+	LC3_CONFIG_48_AC(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_48_6, \
+			_ac)
 
 #define LC3_QOS_UNFRAMED	0x00
 #define LC3_QOS_FRAMED		0x01
@@ -185,130 +308,327 @@ 
 #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 \
+#define LC3_QOS_8_1_1_LATENCY 8u
+#define LC3_QOS_8_1_1_RTN 2u
+
+#define LC3_QOS_8_1_1_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					8u, 26u, 2u)
+					LC3_QOS_8_1_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_8_1, \
+					LC3_QOS_8_1_1_RTN)
+#define LC3_QOS_8_1_1 LC3_QOS_8_1_1_AC(1)
 
-#define LC3_QOS_8_1_2 \
+#define LC3_QOS_8_1_2_LATENCY 75u
+#define LC3_QOS_8_1_2_RTN 13u
+
+#define LC3_QOS_8_1_2_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					75u, 26u, 13u)
+					LC3_QOS_8_1_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_8_1, \
+					LC3_QOS_8_1_2_RTN)
+#define LC3_QOS_8_1_2 LC3_QOS_8_1_2_AC(1)
 
-#define LC3_QOS_8_2_1 \
+#define LC3_QOS_8_2_1_LATENCY 10u
+#define LC3_QOS_8_2_1_RTN 2u
+
+#define LC3_QOS_8_2_1_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					10u, 30u, 2u)
+					LC3_QOS_8_2_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_8_2, \
+					LC3_QOS_8_2_1_RTN)
+#define LC3_QOS_8_2_1 LC3_QOS_8_2_1_AC(1)
 
-#define LC3_QOS_8_2_2 \
+#define LC3_QOS_8_2_2_LATENCY 95u
+#define LC3_QOS_8_2_2_RTN 13u
+
+#define LC3_QOS_8_2_2_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					95u, 30u, 13u)
+					LC3_QOS_8_2_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_8_2, \
+					LC3_QOS_8_2_2_RTN)
+#define LC3_QOS_8_2_2 LC3_QOS_8_2_2_AC(1)
 
-#define LC3_QOS_16_1_1 \
+#define LC3_QOS_16_1_1_LATENCY 8u
+#define LC3_QOS_16_1_1_RTN 2u
+
+#define LC3_QOS_16_1_1_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					8u, 30u, 2u)
+					LC3_QOS_16_1_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_16_1, \
+					LC3_QOS_16_1_1_RTN)
+#define LC3_QOS_16_1_1 LC3_QOS_16_1_1_AC(1)
 
-#define LC3_QOS_16_1_2 \
+#define LC3_QOS_16_1_2_LATENCY 75u
+#define LC3_QOS_16_1_2_RTN 13u
+
+#define LC3_QOS_16_1_2_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					75u, 30u, 13u)
+					LC3_QOS_16_1_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_16_1, \
+					LC3_QOS_16_1_2_RTN)
+#define LC3_QOS_16_1_2 LC3_QOS_16_1_2_AC(1)
 
-#define LC3_QOS_16_2_1 \
+#define LC3_QOS_16_2_1_LATENCY 10u
+#define LC3_QOS_16_2_1_RTN 2u
+
+#define LC3_QOS_16_2_1_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					10u, 40u, 2u)
+					LC3_QOS_16_2_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_16_2, \
+					LC3_QOS_16_2_1_RTN)
+#define LC3_QOS_16_2_1 LC3_QOS_16_2_1_AC(1)
 
-#define LC3_QOS_16_2_2 \
+#define LC3_QOS_16_2_2_LATENCY 95u
+#define LC3_QOS_16_2_2_RTN 13u
+
+#define LC3_QOS_16_2_2_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					95u, 40u, 13u)
+					LC3_QOS_16_2_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_16_2, \
+					LC3_QOS_16_2_2_RTN)
+#define LC3_QOS_16_2_2 LC3_QOS_16_2_2_AC(1)
 
-#define LC3_QOS_24_1_1 \
+#define LC3_QOS_24_1_1_LATENCY 8u
+#define LC3_QOS_24_1_1_RTN 2u
+
+#define LC3_QOS_24_1_1_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					8u, 45u, 2u)
+					LC3_QOS_24_1_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_24_1, 2u)
+#define LC3_QOS_24_1_1 LC3_QOS_24_1_1_AC(1)
 
-#define LC3_QOS_24_1_2 \
+#define LC3_QOS_24_1_2_LATENCY 75u
+#define LC3_QOS_24_1_2_RTN 13u
+
+#define LC3_QOS_24_1_2_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					75u, 45u, 13u)
+					LC3_QOS_24_1_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_24_1, \
+					LC3_QOS_24_1_2_RTN)
+#define LC3_QOS_24_1_2 LC3_QOS_24_1_2_AC(1)
 
-#define LC3_QOS_24_2_1 \
+#define LC3_QOS_24_2_1_LATENCY 10u
+#define LC3_QOS_24_2_1_RTN 2u
+
+#define LC3_QOS_24_2_1_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					10u, 60u, 2u)
+					LC3_QOS_24_2_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_24_2, \
+					LC3_QOS_24_2_1_RTN)
+#define LC3_QOS_24_2_1 LC3_QOS_24_2_1_AC(1)
 
-#define LC3_QOS_24_2_2 \
+#define LC3_QOS_24_2_2_LATENCY 95u
+#define LC3_QOS_24_2_2_RTN 13u
+
+#define LC3_QOS_24_2_2_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					95u, 60u, 13u)
+					LC3_QOS_24_2_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_24_2, \
+					LC3_QOS_24_2_2_RTN)
+#define LC3_QOS_24_2_2 LC3_QOS_24_2_2_AC(1)
 
-#define LC3_QOS_32_1_1 \
+#define LC3_QOS_32_1_1_LATENCY 8u
+#define LC3_QOS_32_1_1_RTN 2u
+
+#define LC3_QOS_32_1_1_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					8u, 60u, 2u)
+					LC3_QOS_32_1_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_32_1, \
+					LC3_QOS_32_1_1_RTN)
+#define LC3_QOS_32_1_1 LC3_QOS_32_1_1_AC(1)
 
-#define LC3_QOS_32_1_2 \
+#define LC3_QOS_32_1_2_LATENCY 75u
+#define LC3_QOS_32_1_2_RTN 13u
+
+#define LC3_QOS_32_1_2_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					75u, 60u, 13u)
+					LC3_QOS_32_1_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_32_1, \
+					LC3_QOS_32_1_2_RTN)
+#define LC3_QOS_32_1_2 LC3_QOS_32_1_2_AC(1)
 
-#define LC3_QOS_32_2_1 \
+#define LC3_QOS_32_2_1_LATENCY 10u
+#define LC3_QOS_32_2_1_RTN 2u
+
+#define LC3_QOS_32_2_1_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					10u, 80u, 2u)
+					LC3_QOS_32_2_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_32_2, \
+					LC3_QOS_32_2_1_RTN)
+#define LC3_QOS_32_2_1 LC3_QOS_32_2_1_AC(1)
 
-#define LC3_QOS_32_2_2 \
+#define LC3_QOS_32_2_2_LATENCY 95u
+#define LC3_QOS_32_2_2_RTN 13u
+
+#define LC3_QOS_32_2_2_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					95u, 80u, 13u)
+					LC3_QOS_32_2_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_32_2, \
+					LC3_QOS_32_2_2_RTN)
+#define LC3_QOS_32_2_2 LC3_QOS_32_2_2_AC(1)
 
-#define LC3_QOS_44_1_1 \
+#define LC3_QOS_44_1_INTERVAL 8163u
+#define LC3_QOS_44_1_1_LATENCY 24u
+#define LC3_QOS_44_1_1_RTN 5u
+
+#define LC3_QOS_44_1_1_AC(_ac) \
 	LC3_QOS_UCAST_FRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					8163u, 24u, 98u, 5u)
+					LC3_QOS_44_1_INTERVAL, \
+					LC3_QOS_44_1_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_44_1, \
+					LC3_QOS_44_1_1_RTN)
+#define LC3_QOS_44_1_1 LC3_QOS_44_1_1_AC(1)
 
-#define LC3_QOS_44_1_2 \
+#define LC3_QOS_44_1_2_LATENCY 80u
+#define LC3_QOS_44_1_2_RTN 13u
+
+#define LC3_QOS_44_1_2_AC(_ac) \
 	LC3_QOS_UCAST_FRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					8163u, 80u, 98u, 13u)
+					LC3_QOS_44_1_INTERVAL, \
+					LC3_QOS_44_1_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_44_1, \
+					LC3_QOS_44_1_2_RTN)
+#define LC3_QOS_44_1_2 LC3_QOS_44_1_2_AC(1)
 
-#define LC3_QOS_44_2_1 \
+#define LC3_QOS_44_2_INTERVAL 10884u
+#define LC3_QOS_44_2_1_LATENCY 31u
+#define LC3_QOS_44_2_1_RTN 5u
+
+#define LC3_QOS_44_2_1_AC(_ac) \
 	LC3_QOS_UCAST_FRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					10884u, 31u, 130u, 5u)
+					LC3_QOS_44_2_INTERVAL, \
+					LC3_QOS_44_2_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_44_2, \
+					LC3_QOS_44_2_1_RTN)
+#define LC3_QOS_44_2_1 LC3_QOS_44_2_1_AC(1)
 
-#define LC3_QOS_44_2_2 \
+#define LC3_QOS_44_2_2_LATENCY 85u
+#define LC3_QOS_44_2_2_RTN 13u
+
+#define LC3_QOS_44_2_2_AC(_ac) \
 	LC3_QOS_UCAST_FRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					10884u, 85u, 130u, 13u)
+					LC3_QOS_44_2_INTERVAL, \
+					LC3_QOS_44_2_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_44_2, \
+					LC3_QOS_44_2_2_RTN)
+#define LC3_QOS_44_2_2 LC3_QOS_44_2_2_AC(1)
 
-#define LC3_QOS_48_1_1 \
+#define LC3_QOS_48_1_1_LATENCY 15u
+#define LC3_QOS_48_1_1_RTN 5u
+
+#define LC3_QOS_48_1_1_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					15u, 75u, 5u)
+					LC3_QOS_48_1_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_48_1,\
+					LC3_QOS_48_1_1_RTN)
+#define LC3_QOS_48_1_1 LC3_QOS_48_1_1_AC(1)
 
-#define LC3_QOS_48_1_2 \
+#define LC3_QOS_48_1_2_LATENCY 75u
+#define LC3_QOS_48_1_2_RTN 13u
+
+#define LC3_QOS_48_1_2_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					75u, 75u, 13u)
+					LC3_QOS_48_1_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_48_1, \
+					LC3_QOS_48_1_2_RTN)
+#define LC3_QOS_48_1_2 LC3_QOS_48_1_2_AC(1)
 
-#define LC3_QOS_48_2_1 \
+#define LC3_QOS_48_2_1_LATENCY 20u
+#define LC3_QOS_48_2_1_RTN 5u
+
+#define LC3_QOS_48_2_1_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					20u, 100u, 5u)
+					LC3_QOS_48_2_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_48_2, \
+					LC3_QOS_48_2_1_RTN)
+#define LC3_QOS_48_2_1 LC3_QOS_48_2_1_AC(1)
 
-#define LC3_QOS_48_2_2 \
+#define LC3_QOS_48_2_2_LATENCY 95u
+#define LC3_QOS_48_2_2_RTN 13u
+
+#define LC3_QOS_48_2_2_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					95u, 100u, 13u)
+					LC3_QOS_48_2_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_48_2, \
+					LC3_QOS_48_2_2_RTN)
+#define LC3_QOS_48_2_2 LC3_QOS_48_2_2_AC(1)
 
-#define LC3_QOS_48_3_1 \
+#define LC3_QOS_48_3_1_LATENCY 15u
+#define LC3_QOS_48_3_1_RTN 5u
+
+#define LC3_QOS_48_3_1_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					15u, 90u, 5u)
+					LC3_QOS_48_3_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_48_3, \
+					LC3_QOS_48_3_1_RTN)
+#define LC3_QOS_48_3_1 LC3_QOS_48_3_1_AC(1)
 
-#define LC3_QOS_48_3_2 \
+#define LC3_QOS_48_3_2_LATENCY 75u
+#define LC3_QOS_48_3_2_RTN 13u
+
+#define LC3_QOS_48_3_2_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					75u, 90u, 13u)
+					LC3_QOS_48_3_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_48_3, \
+					LC3_QOS_48_3_2_RTN)
+#define LC3_QOS_48_3_2 LC3_QOS_48_3_2_AC(1)
 
-#define LC3_QOS_48_4_1 \
+#define LC3_QOS_48_4_1_LATENCY 20u
+#define LC3_QOS_48_4_1_RTN 5u
+
+#define LC3_QOS_48_4_1_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					20u, 120u, 5u)
+					LC3_QOS_48_4_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_48_4, \
+					LC3_QOS_48_4_1_RTN)
+#define LC3_QOS_48_4_1 LC3_QOS_48_4_1_AC(1)
 
-#define LC3_QOS_48_4_2 \
+#define LC3_QOS_48_4_2_LATENCY 100u
+#define LC3_QOS_48_4_2_RTN 13u
+
+#define LC3_QOS_48_4_2_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					100u, 120u, 13u)
+					LC3_QOS_48_4_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_48_4, \
+					LC3_QOS_48_4_2_RTN)
+#define LC3_QOS_48_4_2 LC3_QOS_48_4_2_AC(1)
 
-#define LC3_QOS_48_5_1 \
+#define LC3_QOS_48_5_1_LATENCY 15u
+#define LC3_QOS_48_5_1_RTN 5u
+
+#define LC3_QOS_48_5_1_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					15u, 117u, 5u)
+					LC3_QOS_48_5_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_48_5, \
+					LC3_QOS_48_5_1_RTN)
+#define LC3_QOS_48_5_1 LC3_QOS_48_5_1_AC(1)
 
-#define LC3_QOS_48_5_2 \
+#define LC3_QOS_48_5_2_LATENCY 75u
+#define LC3_QOS_48_5_2_RTN 13u
+
+#define LC3_QOS_48_5_2_AC(_ac) \
 	LC3_QOS_UCAST_7_5_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					75u, 117u, 13u)
+					LC3_QOS_48_5_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_48_5, \
+					LC3_QOS_48_5_2_RTN)
+#define LC3_QOS_48_5_2 LC3_QOS_48_5_2_AC(1)
 
-#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_1_LATENCY 20u
+#define LC3_QOS_48_6_1_RTN 5u
 
-#define LC3_QOS_48_6_2 \
+#define LC3_QOS_48_6_1_AC(_ac) \
 	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
-					100u, 155u, 13u)
+					LC3_QOS_48_6_1_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_48_6, \
+					LC3_QOS_48_6_1_RTN)
+#define LC3_QOS_48_6_1 LC3_QOS_48_6_1_AC(1)
+
+#define LC3_QOS_48_6_2_LATENCY 100u
+#define LC3_QOS_48_6_2_RTN 13u
+
+#define LC3_QOS_48_6_2_AC(_ac) \
+	LC3_QOS_UCAST_10_UNFRAMED(40000u, BT_BAP_CONFIG_LATENCY_BALANCED, \
+					LC3_QOS_48_6_2_LATENCY, \
+					_ac * LC3_CONFIG_FRAME_LEN_48_6, \
+					LC3_QOS_48_6_2_RTN)
+#define LC3_QOS_48_6_2 LC3_QOS_48_6_2_AC(1)