Commit e92a9ce
committed
ASoC: compress/component: Use module_get_when_open/put_when_close for cstream
Currently the try_module_get() and module_put() is not possible for
compressed streams if the module_get_upon_open is set to 1 which means that\
the components are not protected in a same way as components when normal
audio is used.
SOF is setting module_get_upon_open to 1 for component drivers which works
correctly for audio stream but when compressed stream is used then the
module is not protected.
Convert the compress open and free operation to mimic the steps of it's
pcm counterpart to fix this issue.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>1 parent 36b831f commit e92a9ce
3 files changed
Lines changed: 61 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
457 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
458 | 460 | | |
459 | 461 | | |
460 | 462 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
| 426 | + | |
| 427 | + | |
427 | 428 | | |
428 | | - | |
429 | | - | |
430 | | - | |
| 429 | + | |
431 | 430 | | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
439 | 437 | | |
440 | | - | |
441 | 438 | | |
442 | | - | |
| 439 | + | |
443 | 440 | | |
444 | 441 | | |
445 | 442 | | |
446 | | - | |
| 443 | + | |
| 444 | + | |
447 | 445 | | |
448 | 446 | | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
| 447 | + | |
| 448 | + | |
456 | 449 | | |
457 | | - | |
458 | | - | |
459 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
460 | 453 | | |
461 | | - | |
462 | | - | |
| 454 | + | |
| 455 | + | |
463 | 456 | | |
464 | 457 | | |
465 | 458 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
25 | 58 | | |
26 | 59 | | |
27 | 60 | | |
| |||
44 | 77 | | |
45 | 78 | | |
46 | 79 | | |
47 | | - | |
| 80 | + | |
48 | 81 | | |
49 | 82 | | |
50 | 83 | | |
| |||
80 | 113 | | |
81 | 114 | | |
82 | 115 | | |
83 | | - | |
| 116 | + | |
84 | 117 | | |
85 | 118 | | |
86 | 119 | | |
| |||
137 | 170 | | |
138 | 171 | | |
139 | 172 | | |
140 | | - | |
| 173 | + | |
141 | 174 | | |
142 | 175 | | |
143 | 176 | | |
| |||
160 | 193 | | |
161 | 194 | | |
162 | 195 | | |
163 | | - | |
| 196 | + | |
164 | 197 | | |
165 | 198 | | |
166 | 199 | | |
| |||
205 | 238 | | |
206 | 239 | | |
207 | 240 | | |
208 | | - | |
| 241 | + | |
209 | 242 | | |
210 | 243 | | |
211 | 244 | | |
| |||
0 commit comments