From 03843104de332f3259bbd742b6122864e7dec484 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Mon, 23 Nov 2026 16:02:27 +0000 Subject: [PATCH 1/3] audio: ecns: initialise descriptors of unconnected streams ecns_stream_init() returned early for an unconnected pin and left the channel count, frame size and sample format of the descriptor unset. GCC then reports -Wmaybe-uninitialized for the mic and ref descriptors in ecns_copy() and ecns_process(), which breaks every -Werror Intel build of this branch. Clear the whole descriptor before the NULL check. Users already gate on the buffer pointer, so this does not change behaviour. Signed-off-by: Liam Girdwood Co-Authored-By: Claude Opus 5.5 --- src/audio/ecns/ecns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/ecns/ecns.c b/src/audio/ecns/ecns.c index c2fd2250a61f..cf6592d6fd1e 100644 --- a/src/audio/ecns/ecns.c +++ b/src/audio/ecns/ecns.c @@ -349,7 +349,7 @@ static void ecns_stream_init(struct ecns_stream *s, struct comp_buffer *buf) { uint32_t sample_bytes; - s->buf = buf; + *s = (struct ecns_stream){ .buf = buf }; if (!buf) return; From 4e21bcb60e051a4eacaf2293de87a55dbd341291 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Mon, 23 Nov 2026 16:02:27 +0000 Subject: [PATCH 2/3] zephyr: cmake: guard Xtensa compiler options with CONFIG_XTENSA The SOF Zephyr module sets ARCH to "xtensa" for every non-POSIX build because that selects the SOF arch headers, so the ARCH check around -mlongcalls and -mtext-section-literals is always true. The aarch64 imx93 LP64 build then fails with aarch64-zephyr-elf-gcc: error: unrecognized command-line option '-mtext-section-literals' Use the Zephyr CONFIG_XTENSA Kconfig symbol, which reflects the real target architecture. Signed-off-by: Liam Girdwood Co-Authored-By: Claude Opus 5.5 --- zephyr/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index a790edf262f1..7f7e595cf5d8 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -674,7 +674,7 @@ if (NOT CONFIG_COMPILER_INLINE_FUNCTION_OPTION) target_compile_options(SOF INTERFACE -fno-inline-functions) endif() -if (ARCH STREQUAL "xtensa") +if(CONFIG_XTENSA) target_compile_options(SOF INTERFACE -mlongcalls) zephyr_compile_options(-mtext-section-literals) endif() From 54f66a81d38368e5346bbeb423cb479159a0e6de Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Mon, 23 Nov 2026 16:02:27 +0000 Subject: [PATCH 3/3] audio: kpb: fix IPC3, clang and LP64 build errors Fix three build breaks in the multi-KPB WoV changes: - The IPC4 output pin scan and the cross-pipeline detector prepare in kpb_prepare() were unconditional, so IPC3 builds failed with a redeclaration of 'sink' against the existing IPC3 sink search. Compile them only for IPC4, like the rest of the pin handling. - kpb_bind() kept the sink component in a variable that is only used by comp_dbg(), which clang reports as unused when debug logs are compiled out. The sink component was already checked for NULL in the same loop, so pass it to the log directly. - kpb_copy() printed the size_t copy_bytes with %u, which breaks the LP64 build. Use %zu. Signed-off-by: Liam Girdwood Co-Authored-By: Claude Opus 5.5 --- src/audio/kpb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/audio/kpb.c b/src/audio/kpb.c index ed75ff59cb53..2bbd906c7776 100644 --- a/src/audio/kpb.c +++ b/src/audio/kpb.c @@ -387,9 +387,9 @@ static int kpb_bind(struct comp_dev *dev, const struct bind_info *bind_data) sink_buf_id = buf_get_id(sink); if (sink_buf_id == buf_id) { - struct comp_dev *sc = comp_buffer_get_sink_component(sink); - comp_dbg(dev, "kpb_bind: buf_id=%d sink_comp=0x%x -> %s", - buf_id, sc ? dev_comp_id(sc) : 0, sink_buf_id == 0 ? "sel_sink" : "host_sink"); + comp_dbg(dev, "kpb_bind: buf_id=%d sink_comp=0x%x -> %s", buf_id, + dev_comp_id(comp_buffer_get_sink_component(sink)), + sink_buf_id == 0 ? "sel_sink" : "host_sink"); if (sink_buf_id == 0) kpb->sel_sink = sink; else @@ -925,6 +925,7 @@ static int kpb_prepare(struct comp_dev *dev) return -ENOMEM; } +#ifdef CONFIG_IPC_MAJOR_4 struct comp_buffer *sink; /* Output pin IDs: IPC4_COMP_ID(src_queue, dst_queue) = (dst_queue<<16)|src_queue. * In a multi-KPB topology each KPB connects to a different arbiter input pin so @@ -967,6 +968,7 @@ static int kpb_prepare(struct comp_dev *dev) } } } +#endif /* CONFIG_IPC_MAJOR_4 */ kpb_change_state(kpb, KPB_STATE_RUN); @@ -1465,7 +1467,7 @@ static int kpb_copy(struct comp_dev *dev) struct comp_dev *wov_comp = sink ? comp_buffer_get_sink_component(sink) : NULL; if (wov_comp) { - comp_dbg(dev, "kpb_copy: produced=%u bytes, triggering wov=0x%x", + comp_dbg(dev, "kpb_copy: produced=%zu bytes, triggering wov=0x%x", copy_bytes, dev_comp_id(wov_comp)); comp_copy(wov_comp); } else {