Skip to content

wov-d0i3: fixes from previous copilot review and MFCC build fixes - #11494

Merged
lgirdwood merged 12 commits into
thesofproject:intel/wov-d0i3-002from
singalsu:intel_wov-d0i3-002_some_code_fixes
Nov 27, 2026
Merged

lgirdwood merged 12 commits into
thesofproject:intel/wov-d0i3-002from
singalsu:intel_wov-d0i3-002_some_code_fixes

Conversation

@singalsu

Copy link
Copy Markdown
Collaborator

No description provided.

@singalsu

Copy link
Copy Markdown
Collaborator Author

Note: The Simple-IPC-fuzz_sh(3/4) CI issues have a fix in main branch in commit ffda587.

@singalsu
singalsu removed the request for review from tmleman November 19, 2026 11:54
@singalsu

Copy link
Copy Markdown
Collaborator Author

@tmleman My mouse click for copilot review dropped you from review that I didn't intend. Please ignore and review if possible. I can't add you back due a max reviewer count of 15.

@intel-sofci

Copy link
Copy Markdown

PR 11494: test results

Run date: 2026-11-19 12:34 UTC

Tested commit: 09f208207358da7f20ca1a38e3627160776b7e12

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

@lgirdwood

Copy link
Copy Markdown
Member

@singalsu I assume validated by you on with Linux ?
@naveen-manohar dont know if you have had a chance to check these yet either ?

@lgirdwood

Copy link
Copy Markdown
Member

@harajend can you schedule this PR for manual test tomorrow for WoV. Thanks !

The MFCC component calls FFT, DCT, matrix, auditory, window and PCAN
functions from the math library, but none of them were exported. With
CONFIG_COMP_MFCC=m the module could not resolve these symbols when it
was loaded. Export them, along with the two TFLM microfrontend
functions that the PCAN inline helpers call, from SOF code since the
TFLM sources are not modified.

Also add the missing mfcc_vad.c and mfcc_ipc4.c to the MFCC LLEXT
build so the module contains the same code as the built-in version.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The testbench build enables MFCC with PCAN, which compiles the PCAN
gain control, noise reduction and log scale sources from the TFLM
microfrontend library. The testbench workflow only checks out the SOF
repository, so these sources are missing and the build fails.

Add a step that fetches only the microfrontend library directory of
tflite-micro next to sof/, at the revision pinned in
submanifests/tflm.yml, using a shallow sparse checkout.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
A remote core notification shares one notify_data slot per target
core. If a previous event to that core is still queued, e.g. after a
blocking IDC timeout, the next event would overwrite its payload. Mark
the slot pending until the target core has run its callbacks and drop
new events for a busy core with an error trace instead.

The blocking IDC send is not allowed in interrupt context, so use a
non-blocking send there. The posix build gets a k_is_in_isr() stub.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The D0ix state notification is sent to all cores. If the blocking IDC
to a remote core times out, the work item stays queued and the target
core may read the payload later, after the stack frame of the sender
is gone. Use two constant static payloads for the enter and exit
cases instead of a stack variable.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
When a component is freed while still active, the pipeline task could
keep running on the freed components. Cancel the pipeline schedule
before stopping the component when the pipeline is active and owned by
the current core.

If the component reset fails, the component may still hold resources
that the free would leave dangling. Log the failure and return an
error instead of freeing the component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
A sink/source mode module may have no data consumer, e.g. a detector
bound to a virtual sink, so don't fail its prepare for a missing sink.
A module needs at least a source when it has no sink, and a raw data
module still needs a sink because its buffering is sized from the sink
period. Reject those cases with an error.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The AGC gain and the Mel value are both Q9.23 and their sum can
overflow 32 bits before clipping. Do the attack limit and the gain
addition with a 64-bit intermediate.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The WoV arbiter input pin binding for the slot 0 detector was
hardcoded as mww.111.1. Use the WOV_SLOT0_PIPELINE_ID variable so the
binding follows the pipeline definition.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The KPB registers for client and WoV control notifications in prepare
but left them registered when prepare failed after the registration,
so a stale callback could still run on a component that is not ready.
Unregister them with a new helper on all error paths after the
registration: the history buffer allocation, the cross-pipeline
detector prepare and the sink search failures.

Detector components include kpb.h also in builds without the KPB, so
give KPB_MAX_NO_OF_CLIENTS a fallback value when the Kconfig option is
not set. Also clarify the buffer time parameter unit.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The 32-bit Mel filterbank computes magnitudes with the fixed-point
square root, so select SQRT_FIXED to avoid a link failure when no other
user enables it.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add the missing Doxygen parameter and return value descriptions for
pcan_gain_lookup_function() and pcan_compute_lut().

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Keep the existing DTS codec entry in place and add the wov_arbiter
subdirectory after it, so the WoV change does not reorder unrelated
lines.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu
singalsu force-pushed the intel_wov-d0i3-002_some_code_fixes branch from 09f2082 to e9e0a40 Compare November 26, 2026 15:28
@lgirdwood
lgirdwood merged commit 76ec607 into thesofproject:intel/wov-d0i3-002 Nov 27, 2026
33 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants