Repository navigation
Conversation
lgirdwood
force-pushed
the
kernel-user/phase5b
branch
from
November 29, 2026 13:09
89a9b96 to
fc47758
Compare
The mic privacy manager tells the copiers about mic privacy state changes with a notifier event. The events come from the mic privacy interrupts, the base firmware IPC and DAI resume, all kernel code, and reach copiers on other cores through IDC. The notifier is not usable from user space, and Phase 5 of the kernel / user-space partition removes it. Post the state in a single atomic word instead: a sequence number, the mic disable state and the DMA data zeroing wait time, the 16-bit DDZWT field. Each copier with mic privacy takes it at the start of its next copy, in its own LL thread, on any core. As with the notifier, which the copier registered for when it configured mic privacy, a copier only takes the states posted since then. A copier that is not running takes the latest state when it runs again, instead of every change in turn. With the notifier, a mute followed by an unmute while a copier was stopped left it fading out: the unmute only applies to a muted copier. Now it stays unmuted. Remove NOTIFIER_ID_MIC_PRIVACY_STATE_CHANGE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
lgirdwood
force-pushed
the
kernel-user/phase5b
branch
from
November 29, 2026 17:31
fc47758 to
c144670
Compare
A copier that configures mic privacy starts unmuted, and only mutes at the next mic privacy state change. A capture started while the mic is muted records the mic until then: tested on WCL, with a test hook that toggles the mute state every 2.5 s, DMIC captures started while muted recorded the mic for their first 0.9 to 2.3 s, until the next change. The state word holds the last state posted, so a copier can start from it: take its mute state and ramp time when configuring mic privacy, and post the state at boot, including after D3, when a mic privacy policy is set, so that the word holds it before the first change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
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.
Phase 5 of #11306 (kernel / user-space partition), second part: mic privacy state changes no longer go through the notifier. This changes behaviour, see below.
Background
The mic privacy manager tells the copiers about mic privacy state changes with a
NOTIFIER_ID_MIC_PRIVACY_STATE_CHANGEevent.The notifier is not usable from user space, and Phase 5 removes it.
What changes
DDZWTfield, which the copier turns into its ramp time.copier_process()), in its own LL thread, on any core. No IDC is needed.NOTIFIER_ID_MIC_PRIVACY_STATE_CHANGE.This follows the same pattern as the KPB draining requests in #11497.
Patch 2: start a copier muted when the mic is muted
A copier that configures mic privacy starts unmuted, and only mutes at the next state change, on main as with patch 1. A capture started while the mic is muted records the mic until then (see Hardware below).
Behaviour changes
Not in this part
The copier still calls kernel functions of the mic privacy manager when it configures mic privacy (
mic_privacy_enable_dmic_irq(),mic_privacy_get_dma_zeroing_wait_time()). Andmic_privacy_process(), which runs in the copier, is in the kernel file. Both are on the Phase 5 list, as is re-enabling mic privacy for user-space LL.Testing
Builds, per commit: tgl, tgl-h, mtl, lnl, ptl, wcl, nvl, imx8, imx8x, imx8m, imx8m_cm7, imx8ulp, imx95 and qemu_xtensa, and the extra CI configurations:
internal_ci_overlay.conf;CONFIG_SOF_USERSPACE_PROXY=n;os_linux_overlay.conf;llext_relocatable.conf;app/debug_stream_overlay.conf, and PTL with that overlay and user-space LL.Only the internal CI configurations build mic privacy.
Object changes: as expected, and nothing else:
copier.candmic_privacy_manager_intel.cin the PTL and WCL internal CI builds,notifier.cin the imx93 and native_sim stub builds (the notifier ID count changes), and the PTL internal CI kernel object hash tables, which is layout;copier.candmic_privacy_manager_intel.cin the PTL and WCL internal CI builds.Signing: rimage runs for every Intel platform, and the generated configs are unchanged.
Cadence xt-clang (RI-2022.10): MTL, PTL and NVL compile.
ZTest: the unit tests pass, run as in CI (37 of 37 configurations).
Host: the host library builds. The CMocka tests were removed from main.
Testbench and tools: pass.
Include checker: passes with
--strict, for the builds and for the sources.Failing platforms: the platforms that already fail on main (acp_6_0, acp_7_0, acp_7_x, mt8186, mt8188, mt8195, mt8196, mt8365) have unchanged error sets.
All of the above was run on 4bdfa15 (current main).
Hardware
Tested on a WCL board (RT722 and 4 DMICs). It has no remote mic privacy switch, so a test-only firmware timer posted a mute toggle every 2.5 s from interrupt context, as the DMIC mic privacy interrupt does. The board reports no mic privacy policy and a zero
DDZWT, so there is no hardware zeroing and no fade: the copier's mute is a hard cut. The 4-channel DMIC capture was checked per 1 ms block.Without the test timer, at the tip: DMIC captures are never muted, playback works, and capture works after a D3 cycle.
Found by the test, not changed here: the host copier's mic privacy code never runs. It is set up for a capture copier on
ipc4_hda_host_output_class, which is the playback (host to DSP) class. Only the DAI copiers apply mic privacy.Changes since the last push
🤖 Generated with Claude Code