Repository navigation
Conversation
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>
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.
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: tgl, tgl-h, mtl, lnl, ptl, wcl, nvl, imx8, imx8x, imx8m, imx8m_cm7, imx8ulp, imx95 and qemu_xtensa, and the extra CI configurations:
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.PTL and WCL build mic privacy.
Object changes: as expected, and nothing else:
copier.candmic_privacy_manager_intel.cin the PTL and WCL builds;notifier.ceverywhere, because the notifier ID count changes;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 (22 of 22 configurations).
Host: the host library and the cmocka unit tests build and pass for all nine defconfigs and the library config.
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 d9b1a78 (current main).
Not tested on hardware yet
The mic privacy path has not run on hardware. It needs a PTL or WCL board with a mic privacy switch, or a host that sends the mic privacy IPC.
🤖 Generated with Claude Code