applications: nrf5340_audio: Prevent hard coding frame duration in LE_AUDIO_SDU_SIZE_OCTETS #25113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
LE_AUDIO_SDU_SIZE_OCTETS is a define which is used in nrf aura config application inside the function bt_le_audio_tx_send (https://github.com/nrfconnect/sdk-nrf/blob/v3.1.0/applications/nrf5340_audio/src/bluetooth/bt_stream/bt_le_audio_tx/bt_le_audio_tx.c#L259) with a frame duration other than 10ms like 7.5ms.
The problem is that this define is using an hard coded value of the frame duration and will miscalculate from the bitrate the sdu size and fail to send data.
Another solution would be to stop using LE_AUDIO_SDU_SIZE_OCTETS and let it as it is for the nrf5340 audio demo application which is using hard coded configuration.