This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 3b1aea4bb0f sim/alsa: Use bundled codec headers.
3b1aea4bb0f is described below
commit 3b1aea4bb0f7af36ca931ca969f360b001830fa8
Author: Marco Casaroli <[email protected]>
AuthorDate: Sun Jul 26 09:48:37 2026 +0200
sim/alsa: Use bundled codec headers.
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 <[email protected]>
---
arch/sim/src/sim/CMakeLists.txt | 3 +++
arch/sim/src/sim/sim_offload.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/sim/src/sim/CMakeLists.txt b/arch/sim/src/sim/CMakeLists.txt
index 42c569f145e..a378448d1a3 100644
--- a/arch/sim/src/sim/CMakeLists.txt
+++ b/arch/sim/src/sim/CMakeLists.txt
@@ -137,6 +137,9 @@ if(CONFIG_SIM_SOUND_ALSA)
list(APPEND SRCS posix/sim_alsa.c)
list(APPEND SRCS sim_offload.c)
list(APPEND STDLIBS asound)
+ target_include_directories(
+ arch PRIVATE ${NUTTX_APPS_DIR}/audioutils/lame/lame/include
+ ${NUTTX_APPS_DIR}/audioutils/libmad/libmad)
endif()
# host sources ###############################################################
diff --git a/arch/sim/src/sim/sim_offload.c b/arch/sim/src/sim/sim_offload.c
index 71ebb084636..9951a1b7d74 100644
--- a/arch/sim/src/sim/sim_offload.c
+++ b/arch/sim/src/sim/sim_offload.c
@@ -27,7 +27,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/debug.h>
-#include <lame/lame.h>
+#include <lame.h>
#include <mad.h>
#include "sim_offload.h"