diff options
| author | 2026-10-07 11:49:31 +0300 | |
|---|---|---|
| committer | 2026-10-07 13:16:48 +0200 | |
| commit | 84aede82dd4e628d863d5eb597f3b164f1c1f2d9 (patch) | |
| tree | d2b743d12a472e6134afad296b97f52886bf00f2 /scripts/Makefile.thinlto | |
| parent | ALSA: compress: stop active streams on disconnect (diff) | |
ALSA: compress: Set the draining state before the drain trigger
The state of the stream is set to SNDRV_PCM_STATE_DRAINING only after the
drain trigger has been sent to the driver.
Drivers can not block in the trigger callback and the drain is completed
asynchronously: snd_compr_drain_notify() can be called either from the
trigger callback itself or from a different context as soon as the
trigger returns. If that happens before the core updates the state then
the notification is lost: the state is overwritten with DRAINING right
after it and the wait for the drain to complete will not be woken up.
Set the state before the trigger is issued and restore it if the trigger
fails. The partial_drain flag is cleared on the error path as well as it
would otherwise be left set for the next drain.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20261007084955.1256-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
