Commit 167e5b8
audio: drc: add IPC-time blob validator
This patch hooks a drc blob validator into the model handler so a
corrupted run-time configuration update is rejected before it can
replace the working blob. Playback or capture then continues with
the previously set parameters instead of being interrupted by a
bad IPC.
The DRC configuration is a fixed-size struct sof_drc_config, so the
validator requires the IPC payload size to match exactly and the
self-declared config->size to agree with it. It is installed in
drc_init() when the model handler is created, so every blob swap is
covered - including any received while the component is in READY - and
the redundant size check that drc_prepare() used to run on the initial
blob is dropped.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>1 parent 5ba08e6 commit 167e5b8
1 file changed
Lines changed: 22 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
142 | 156 | | |
143 | 157 | | |
144 | 158 | | |
| |||
168 | 182 | | |
169 | 183 | | |
170 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
171 | 190 | | |
172 | 191 | | |
173 | 192 | | |
| |||
326 | 345 | | |
327 | 346 | | |
328 | 347 | | |
329 | | - | |
330 | 348 | | |
331 | 349 | | |
332 | 350 | | |
| |||
352 | 370 | | |
353 | 371 | | |
354 | 372 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
360 | 376 | | |
361 | 377 | | |
362 | 378 | | |
| |||
0 commit comments