sim/alsa: Use bundled codec headers.#19541
Merged
xiaoxiang781216 merged 1 commit intoJul 26, 2026
Merged
Conversation
Expose the bundled LAME and libmad headers to the sim:alsa arch target and include LAME through its installed public header name. This lets the CMake build compile sim_offload.c without relying on host codec development packages. Assisted-by: Zed:GPT-5.6 Terra Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
5 tasks
acassis
approved these changes
Jul 26, 2026
xiaoxiang781216
approved these changes
Jul 26, 2026
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.
Summary
Fix CMake header integration for the
sim:alsaaudio offload codec implementation.sim_offload.cuses LAME and libmad from the checked-outnuttx-appstree, but thearchCMake target did not receive their include directories. It also included LAME as<lame/lame.h>, while the bundled public header islame/include/lame.h. The build consequently depended on host-installed codec development headers and failed when they were absent.This change uses
<lame.h>and exposes the bundled LAME and libmad include directories only whenCONFIG_SIM_SOUND_ALSA=y.Companion Apps PR: apache/nuttx-apps#3666
The companion PR adds the LAME vector translation units that are required at link time when LAME enables x86 SSE2/AVX2 runtime dispatch. Both PRs are required for a complete CMake
sim:alsafix.Impact
sim:alsatarget use bundled LAME/libmad headers instead of relying on host codec header installation.Testing
Verified locally with the companion Apps branch.
sim:alsa, CMake/Ninja,CONFIG_SIM_M32=y.Before this change, compilation stopped in
sim_offload.c:After this change, with the companion Apps change applied:
completed successfully and produced
nuttx.tgz.Additional verification:
All checks completed successfully.
No hardware runtime test applies to this host simulator build.
PR verification self-check
Signed-off-by, andAssisted-bytrailer.checkpatch.shandgit diff --check.