Skip to content

Conversation

@kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented May 30, 2025

When resuming from D3 state, the microphone privacy feature wasn't properly restored, causing two critical issues:

  1. The system didn't respond to privacy button inputs after D3 transitions
  2. A short fade-out effect appeared in audio when privacy was enabled, causing test failures that expected complete silence

This patch provides a comprehensive solution by:

  • Adding mic_privacy_manager_init() to resume_dais() to ensure proper re-initialization of the microphone privacy subsystem after D3
  • Implementing mic_privacy_get_mic_disable_status() to correctly retrieve the current microphone disable status
  • Storing the mic_disable_status before entering D3 and comparing it after resume to detect changes during low power state
  • Enhancing mic_privacy_enable_dmic_irq() to immediately check for IRQ status after D3 transitions to catch events that occurred during suspended state
  • Explicitly resetting fade parameters (fade_in_out_bytes, gain parameters) to ensure immediate silence without fade artifacts when privacy is enabled
  • Adding proper error handling and validation to ensure the mic_priv structure is valid before access

With these changes, the microphone privacy feature works correctly through power state transitions and properly mutes audio without fade artifacts when privacy is enabled after D3 resume.

(cherry picked from commit aea8101)

When resuming from D3 state, the microphone privacy feature wasn't
properly restored, causing two critical issues:

1. The system didn't respond to privacy button inputs after D3
   transitions
2. A short fade-out effect appeared in audio when privacy was enabled,
   causing test failures that expected complete silence

This patch provides a comprehensive solution by:
- Adding mic_privacy_manager_init() to resume_dais() to ensure proper
  re-initialization of the microphone privacy subsystem after D3
- Implementing mic_privacy_get_mic_disable_status() to correctly
  retrieve the current microphone disable status
- Storing the mic_disable_status before entering D3 and comparing it
  after resume to detect changes during low power state
- Enhancing mic_privacy_enable_dmic_irq() to immediately check for IRQ
  status after D3 transitions to catch events that occurred during
  suspended state
- Explicitly resetting fade parameters (fade_in_out_bytes, gain
  parameters) to ensure immediate silence without fade artifacts when
  privacy is enabled
- Adding proper error handling and validation to ensure the mic_priv
  structure is valid before access

With these changes, the microphone privacy feature works correctly
through power state transitions and properly mutes audio without fade
artifacts when privacy is enabled after D3 resume.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
(cherry picked from commit aea8101)
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@lgirdwood
Copy link
Member

@wszypelt good to merge ?

@lgirdwood lgirdwood merged commit 52609de into thesofproject:stable-v2.13 May 30, 2025
40 of 48 checks passed
@lgirdwood
Copy link
Member

@wszypelt good to merge ?

Pls ignore, just been informed your CI does not run for stable fork.

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.

4 participants