Skip to content

Conversation

@Thalley
Copy link
Contributor

@Thalley Thalley commented Nov 7, 2024

Add a selection of interval values that are suitable for BAP,
which will allow better coexistence between ISO and ACL,
for both broadcast and unicast.

Samples and tests have been updated to use these new values.

The shell has also been updated to use the LE Audio (BAP) values
if audio is enabled, and the audio.conf file has disabled automatic
updating of the connection parameters as the peripheral, as we rarely
(if ever) want to do that.

@Thalley Thalley changed the title Audio interval macros Bluetooth: BAP: Add a set of suggested intervals to use with BAP Nov 7, 2024
@Thalley Thalley added this to the v4.1.0 milestone Nov 7, 2024
@Thalley Thalley force-pushed the audio_interval_macros branch 3 times, most recently from ad61f81 to b94bd7b Compare November 7, 2024 20:37
@Thalley Thalley force-pushed the audio_interval_macros branch 2 times, most recently from f7716ab to 3c06ff4 Compare January 24, 2025 13:32
@Thalley Thalley force-pushed the audio_interval_macros branch from 3c06ff4 to ab7faed Compare February 6, 2025 06:15
@Thalley
Copy link
Contributor Author

Thalley commented Feb 6, 2025

CI failure depends on #84297

@cvinayak
Copy link
Contributor

cvinayak commented Feb 6, 2025

CI failure depends on #84297

This PR is no longer blocked by Controller bugs, if any?

@Thalley
Copy link
Contributor Author

Thalley commented Feb 6, 2025

CI failure depends on #84297

This PR is no longer blocked by Controller bugs, if any?

Nope :) #83539 is still though, and the combination of these 2 PRs might bring out new bugs

@cvinayak cvinayak dismissed their stale review February 7, 2025 07:14

Will re-review after #84297 is merged.

cvinayak
cvinayak previously approved these changes Feb 7, 2025
larsgk
larsgk previously approved these changes Feb 15, 2025
@Thalley Thalley modified the milestones: v4.1.0, v4.2.0 Feb 17, 2025
@Thalley Thalley force-pushed the audio_interval_macros branch from ab7faed to 44004d5 Compare February 17, 2025 10:30
@Thalley
Copy link
Contributor Author

Thalley commented Feb 24, 2025

@rugeGerritsen please re-review or dismiss you change request :)

Copy link
Contributor

@rugeGerritsen rugeGerritsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message needs to be updated as we are no longer disabling tests

*
* Defined by Table 8.1 in BAP 1.0.2
*/
#define BT_BAP_ADV_PARAM_CONN_QUICK \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this file we now use QUICK/SHORT/FAST and REDUCED/SLOW. The existing advertising macros use FAST and SLOW only, so maybe we should stick to that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing advertising macros use FAST and SLOW only, so maybe we should stick to that?

The BT Core spec uses "FAST" and "SLOW" when defining the values
image

The BAP spec does not defines values for advertising, but the BAP macros for advertising in this PR uses SLOW and FAST.

The Core spec does not defined slow/fast values for connection parameters, and only has

image

Not sure if it makes sense to define SLOW and FAST for connection parameters, since those are not defined by Zephyr or Core Spec either.

The BAP spec uses the following terminology
image

image

I'm OK to modify it to always be fast and slow for consistency if you think that makes more sense

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not have a strong opinion on this. But I believe it may make sense to align terminology with existing macros

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe @cvinayak or @larsgk have some opinion on this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically, I always open up a Spec PDF and search for terms like "quick" or "reduced", in this case the BAP spec. Hence, I will keep the QUICK and REDUCED in this context to be able to quickly refer to spec definitions.

If the other new defined with FAST, SLOW and RELAXED too have references to in the BAP spec, I will use it so.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rugeGerritsen Please re-review :)

@Thalley Thalley dismissed stale reviews from larsgk and cvinayak via 364e18e March 9, 2025 21:38
@Thalley Thalley force-pushed the audio_interval_macros branch from 44004d5 to 364e18e Compare March 9, 2025 21:38
@zephyrbot zephyrbot added the Release Notes To be mentioned in the release notes label Mar 9, 2025
Copy link
Contributor

@cvinayak cvinayak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this PR passed CI before rebase, the bsim air trace needs to be analysed to figure cause.

*
* Defined by Table 8.1 in BAP 1.0.2
*/
#define BT_BAP_ADV_PARAM_CONN_QUICK \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically, I always open up a Spec PDF and search for terms like "quick" or "reduced", in this case the BAP spec. Hence, I will keep the QUICK and REDUCED in this context to be able to quickly refer to spec definitions.

If the other new defined with FAST, SLOW and RELAXED too have references to in the BAP spec, I will use it so.

@cvinayak
Copy link
Contributor

cvinayak commented Mar 10, 2025

Workaround for failing test due to overlapping Peripheral ACL in the broadcast sink device:

diff --git a/tests/bsim/bluetooth/audio/test_scripts/bap_broadcast_audio_assistant.sh b/tests/bsim/bluetooth/audio/test_scripts/bap_broadcast_audio_assistant.sh
index 4b2bc395429..92a67968e64 100755
--- a/tests/bsim/bluetooth/audio/test_scripts/bap_broadcast_audio_assistant.sh
+++ b/tests/bsim/bluetooth/audio/test_scripts/bap_broadcast_audio_assistant.sh
@@ -25,7 +25,8 @@ Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
 Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
   -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=2 \
   -testid=broadcast_source -RealEncryption=1 -rs=69 -D=3 \
-  -start_offset=5e3 -argstest subgroup_cnt 1 streams_per_subgroup_cnt 2
+  -start_offset=2e3 \
+  -argstest subgroup_cnt 1 streams_per_subgroup_cnt 2 \
 
 # Simulation time should be larger than the WAIT_TIME in common.h
 Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -D=3 -sim_length=60e6 $@

To correctly handle drifting ACL into BIG events, need the scheduling to permit selective BIS subevent reception. Some experiments in this draft #75760 (still a WIP though as support for interleaved too needs consideration, which is also open #67231).

Add a selection of interval values that are suitable for BAP,
which will allow better coexistence between ISO and ACL,
for both broadcast and unicast. Some of these are defined
by the BAP spec, and some are defined by Zephyr, since they
do have a suggested value from BAP.

Samples and tests have been updated to use these new values.
Peripheral samples have also been updated with
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS so that the connection
parameters from the centrals aren't updated to something else
shortly after.

The shell has also been updated to use the LE Audio (BAP) values
if audio is enabled, and the audio.conf file has disabled automatic
updating of the connection parameters as the peripheral, as we rarely
(if ever) want to do that.

Due to the connection interval change, CI hit an issue
with test_bass_broadcast_code in test_main_client_sync, where
the reading of the long receive state did not finish before we
attempted to do another procedure, so the function was updated to have
a retry.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
@Thalley Thalley force-pushed the audio_interval_macros branch from 364e18e to 7d84741 Compare March 10, 2025 06:15
@Thalley Thalley requested a review from larsgk March 10, 2025 09:49
@kartben kartben merged commit 9d4cc4b into zephyrproject-rtos:main Mar 11, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Bluetooth LE Audio Mar 11, 2025
@Thalley Thalley deleted the audio_interval_macros branch March 11, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Bluetooth Audio area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth Qualification Bluetooth Qualification -related issues and pull requests area: Bluetooth area: Samples Samples platform: nRF BSIM Nordic Semiconductors, nRF BabbleSim Release Notes To be mentioned in the release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants