Repository navigation
Conversation
Add state machine control for SmartMic voice trigger and an ALSA compressed stream to report the trigger event. This is initial support with the following limitations: - The compressed stream is currently a dummy implementation. It will report data available when there is a trigger event but the returned data is only a buffer of '.' characters. The plumbing into a SoundWire data stream is still to-do. - The voice trigger functionality is expected to be provided by the "SMPU 16" and "MFPU 16" entities, and a streaming output terminal connected directly to SMPU 16. - Detection is one-shot; stop and restart the stream to arm it again. Continuous triggers and concurrect triggers are not supported. - Only required MFPU algorithms are managed, and they must already be prepared and ready before arming. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
rfvirgil
force-pushed
the
topic/sdca-wov-prototype
branch
from
November 20, 2026 13:13
dff8c01 to
5728fd5
Compare
There was a problem hiding this comment.
🟡 Changes recommended
A close-path race with IRQ notification can cause a NULL dereference, while fragment-parameter validation and START/probe failure cleanup also remain incomplete.
4 open issues
What changed in this PR
Introduces initial SDCA SmartMic wake-on-voice support in ASoC, reporting one-shot trigger events through an ALSA compressed capture stream. Capture data remains a placeholder; SoundWire audio transport is not yet implemented.
Changes:
- Add voice/speech trigger handling, readiness checks, and MFPU algorithm control.
- Parse behavior sets and bit mappings to identify supported triggers and algorithms.
- Integrate compressed capture interfaces, audio power routes, interrupt cleanup, and build dependencies.
| File | Description |
|---|---|
sound/soc/sdca/sdca_wov.c |
Implements trigger control and dummy compressed capture. |
sound/soc/sdca/sdca_interrupts.c |
Registers and dispatches wake-on-voice interrupts. |
sound/soc/sdca/sdca_functions.c |
Parses behavior sets and readiness metadata; adds bit-mapping helpers. |
sound/soc/sdca/sdca_class_function.c |
Passes interrupt context and defers cleanup until after component removal. |
sound/soc/sdca/sdca_asoc.c |
Adds wake-on-voice capture interfaces and power routes. |
sound/soc/sdca/Makefile |
Builds wake-on-voice support with SDCA interrupts. |
sound/soc/sdca/Kconfig |
Selects ASoC compressed-stream support. |
include/sound/sdca_wov.h |
Declares wake-on-voice APIs, constants, and disabled-feature stubs. |
include/sound/sdca_function.h |
Defines behavior-set, bit-mapping, and readiness data structures. |
include/sound/sdca_asoc.h |
Extends component initialization to accept interrupt context. |
Review effort: Balanced
Comment on lines
+788
to
+794
| struct sdca_wov_state *state = stream->runtime->private_data; | ||
|
|
||
| state->stream = NULL; | ||
| stream->runtime->private_data = NULL; | ||
|
|
||
| /* Cancel the outstanding arm before ASoC can power down the stream's DAPM path. */ | ||
| return sdca_wov_cancel_voice_trigger(state->interrupt); |
| */ | ||
| ret = devm_add_action_or_reset(dev, class_function_irq_cleanup_late, drv); | ||
| if (ret) | ||
| return ret; |
| dev_err(interrupt->dev, | ||
| "wov: %s: failed to drain trigger status before arming: %d\n", | ||
| interrupt->entity->label, ret); | ||
| return ret; |
Comment on lines
+890
to
+893
| static const struct snd_compress_ops sdca_wov_compress_ops = { | ||
| .open = sdca_wov_compr_open, | ||
| .free = sdca_wov_compr_free, | ||
| .trigger = sdca_wov_compr_trigger, |
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.


Add state machine control for SmartMic voice trigger and an ALSA compressed stream to report the trigger event.
This is initial support with the following limitations:
The compressed stream is currently a dummy implementation. It will report data available when there is a trigger event but the returned data is only a buffer of '.' characters. The plumbing into a SoundWire data stream is still to-do.
The voice trigger functionality is expected to be provided by the "SMPU 16" and "MFPU 16" entities, and a streaming output terminal connected directly to SMPU 16.
Detection is one-shot; stop and restart the stream to arm it again. Continuous triggers and concurrect triggers are not supported.
Only required MFPU algorithms are managed, and they must already be prepared and ready before arming.