Commit 52609de
audio: mic_privacy: Fix feature functionality after D3 resume
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>1 parent 2913f9d commit 52609de
File tree
3 files changed
+74
-2
lines changed- src
- audio/mic_privacy_manager
- include/sof/audio
- zephyr/lib
3 files changed
+74
-2
lines changedLines changed: 34 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
65 | 71 | | |
66 | | - | |
| 72 | + | |
67 | 73 | | |
68 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
69 | 86 | | |
| 87 | + | |
70 | 88 | | |
71 | 89 | | |
72 | 90 | | |
| |||
235 | 253 | | |
236 | 254 | | |
237 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
| 73 | + | |
67 | 74 | | |
68 | 75 | | |
69 | 76 | | |
| |||
79 | 86 | | |
80 | 87 | | |
81 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
82 | 93 | | |
83 | 94 | | |
84 | 95 | | |
| |||
95 | 106 | | |
96 | 107 | | |
97 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
98 | 114 | | |
99 | 115 | | |
100 | 116 | | |
| |||
107 | 123 | | |
108 | 124 | | |
109 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
110 | 149 | | |
111 | 150 | | |
112 | 151 | | |
| |||
0 commit comments