diff mbox series

[BlueZ,v3,1/8] shared/lc3: Add QoS definitions

Message ID 20231204221527.2990674-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit e3d9aad7d6e6ef07384b92b5632e9bab9f6f61bd
Headers show
Series [BlueZ,v3,1/8] shared/lc3: Add QoS definitions | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
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 warning ScanBuild: src/shared/bap.c:4696:23: warning: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'lpac') if (!match.rpac && (lpac->type != BT_BAP_BCAST_SOURCE)) ^~~~~~~~~~ 1 warning generated.

Commit Message

Luiz Augusto von Dentz Dec. 4, 2023, 10:15 p.m. UTC
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(+)

Comments

bluez.test.bot@gmail.com Dec. 5, 2023, 12:43 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=806820

---Test result---

Test Summary:
CheckPatch                    FAIL      5.64 seconds
GitLint                       PASS      2.80 seconds
BuildEll                      PASS      24.28 seconds
BluezMake                     PASS      734.05 seconds
MakeCheck                     PASS      11.65 seconds
MakeDistcheck                 PASS      160.10 seconds
CheckValgrind                 PASS      222.68 seconds
CheckSmatch                   PASS      327.47 seconds
bluezmakeextell               PASS      102.44 seconds
IncrementalBuild              PASS      5000.55 seconds
ScanBuild                     WARNING   976.07 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v3,2/8] test-bap: Introduce QoS tests for LC3
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#78: 
  Verify that a Unicast Client IUT can initiate a Config QoS operation for the

/github/workspace/src/src/13479151.patch total: 0 errors, 1 warnings, 992 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/13479151.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.


[BlueZ,v3,3/8] test-bap: Add SCC Config QoS, VS tests
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#77: 
  Verify that a Unicast Client IUT can initiate a Config QoS operation for a

/github/workspace/src/src/13479149.patch total: 0 errors, 1 warnings, 54 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/13479149.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.


[BlueZ,v3,4/8] test-bap: Add SCC Enable tests
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#77: 
  Verify that a Unicast Client IUT can initiate an Enable operation for an ASE

/github/workspace/src/src/13479150.patch total: 0 errors, 1 warnings, 116 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/13479150.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.


[BlueZ,v3,5/8] test-bap: Add SCC Disable tests
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#77: 
  Verify that a Unicast Client IUT can initiate a Disable operation for an ASE

/github/workspace/src/src/13479152.patch total: 0 errors, 1 warnings, 177 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/13479152.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.


[BlueZ,v3,7/8] test-bap: Add SCC Release tests
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#77: 
  Verify that a Unicast Client IUT can release an ASE by initiating a Release

/github/workspace/src/src/13479154.patch total: 0 errors, 1 warnings, 333 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/13479154.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.


[BlueZ,v3,8/8] test-bap: Add SCC Update Metadata tests
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#81: 
  The IUT successfully writes to the ASE Control Point characteristic with the

/github/workspace/src/src/13479155.patch total: 0 errors, 1 warnings, 151 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/13479155.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.


##############################
Test: ScanBuild - WARNING
Desc: Run Scan Build
Output:
src/shared/bap.c:4696:23: warning: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'lpac')
                if (!match.rpac && (lpac->type != BT_BAP_BCAST_SOURCE))
                                    ^~~~~~~~~~
1 warning generated.



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Dec. 5, 2023, 3:40 a.m. UTC | #2
Hello:

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

On Mon,  4 Dec 2023 17:15:20 -0500 you wrote:
> 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(+)

Here is the summary with links:
  - [BlueZ,v3,1/8] shared/lc3: Add QoS definitions
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e3d9aad7d6e6
  - [BlueZ,v3,2/8] test-bap: Introduce QoS tests for LC3
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=9c3824db2aa5
  - [BlueZ,v3,3/8] test-bap: Add SCC Config QoS, VS tests
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f93fec890447
  - [BlueZ,v3,4/8] test-bap: Add SCC Enable tests
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=6f957d3b6c43
  - [BlueZ,v3,5/8] test-bap: Add SCC Disable tests
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=58805e4f28a3
  - [BlueZ,v3,6/8] shared/bap: Fix possible crash when freeing requests
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f10faf387d7f
  - [BlueZ,v3,7/8] test-bap: Add SCC Release tests
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=5d2277071237
  - [BlueZ,v3,8/8] test-bap: Add SCC Update Metadata tests
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=9b322d3a52a1

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/shared/lc3.h b/src/shared/lc3.h
index ae193f9e2fa7..e6b043699bc1 100644
--- a/src/shared/lc3.h
+++ b/src/shared/lc3.h
@@ -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)