lc3: refactor codec init/deinit functions#2039
Merged
koffes merged 1 commit intonrfconnect:mainfrom Apr 8, 2026
Merged
Conversation
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Mar 9, 2026
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-nrfxlib#2039 Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
This was referenced Mar 9, 2026
b271422 to
92611e0
Compare
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Mar 20, 2026
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-nrfxlib#2039 Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
92611e0 to
b298f55
Compare
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Mar 20, 2026
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-nrfxlib#2039 Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
Contributor
Author
|
Changes in this PR didn't really improve performance of audio app in terms of CPU usage, but it decreases RAM usage and time to initialize lc3 codec. |
koffes
requested changes
Mar 30, 2026
b298f55 to
d39ab37
Compare
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Mar 31, 2026
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-nrfxlib#2039 Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
d39ab37 to
81767b1
Compare
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Mar 31, 2026
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-nrfxlib#2039 Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
- added sw_codec_lc3_single_rate_init() function that enables only one requested sample rate for encoder and decoder, which decreases RAM usage and time to initialize codec compared to sw_codec_lc3_init() which enables all supported sample rates; - added sw_codec_lc3_uninit() function to deinit LC3 completely. This change allows changing a codec usage flow where we initialize it with only one sample rate, and de-initialize the codec when audio stream has stopped; Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
81767b1 to
651c0f7
Compare
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Apr 7, 2026
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-nrfxlib#2039 Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
|
alexsven
approved these changes
Apr 8, 2026
koffes
approved these changes
Apr 8, 2026
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Apr 8, 2026
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-nrfxlib#2039 Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



sw_codec_lc3_init(). The function used to enable all the
supported sample rates, but it adds redundant overhead to
LC3 run-time, so the function changed to enable only one
requested sample rate for both encoder and decoder;
deinit LC3 completely. This change allows changing a codec
usage flow where we initialize it with only one sample rate,
and de-initialize the codec when audio stream has stopped;
framesizefromLC3FrameSize_ttoLC3FrameSizeConfig_tto avoid implicit enum conversionwhen passing it to
LC3Initialize()Changes in this commit allow enabling only the required
sample rate in LC3 codec, which decreases RAM usage and
time to initalize codec.