Commit adbcf54
committed
audio: mic_privacy: Fix fade effect in audio after D3 resume
When resuming from D3 state with microphone privacy enabled, a short
fade-out effect appears in the audio stream instead of immediate
silence. This causes test failures in mic privacy validation tests that
expect complete silence when privacy is enabled.
The issue occurs because fade parameters aren't properly reset after D3
transitions. This patch fixes the issue by explicitly resetting all fade
parameters during resume from D3:
- Set mic_privacy_state directly to MIC_PRIV_MUTED to avoid fade effects
- Reset fade_in_out_bytes, gain_env and fade_in_sg_count parameters
- Add validation checks to ensure the mic_priv structure is valid
With these changes, the audio stream properly transitions to silence
without fade artifacts when privacy is enabled after D3 resume.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent 9ee7789 commit adbcf54
1 file changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
117 | | - | |
| 115 | + | |
118 | 116 | | |
119 | 117 | | |
120 | 118 | | |
| |||
140 | 138 | | |
141 | 139 | | |
142 | 140 | | |
143 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
144 | 151 | | |
145 | 152 | | |
146 | 153 | | |
| |||
0 commit comments