diff options
| author | Peter Ujfalusi <peter.ujfalusi@linux.intel.com> | 2026-10-07 11:49:30 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-10-07 13:16:48 +0200 |
| commit | b04c9229ee31be8f3cd87d15648b040bee2e64ae (patch) | |
| tree | 0002d6fbb817fe48ff8aa90ff8afc6e7929b1239 /include | |
| parent | fd7f98db9c28574b102303e317f4dca712281003 (diff) | |
| download | linux-next-b04c9229ee31be8f3cd87d15648b040bee2e64ae.tar.gz linux-next-b04c9229ee31be8f3cd87d15648b040bee2e64ae.zip | |
ALSA: compress: stop active streams on disconnect
Track open compressed streams per device so disconnect can stop
active streams and wake waiters before snd_unregister_device().
This aligns compressed stream teardown with PCM disconnect behavior
and prevents active userspace streams from running into unregister
races.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20261007084955.1256-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/compress_driver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h index 9e3d801e45ec..84f51edc3f9d 100644 --- a/include/sound/compress_driver.h +++ b/include/sound/compress_driver.h @@ -188,6 +188,7 @@ struct snd_compr_ops { * @card: sound card pointer * @direction: Playback or capture direction * @lock: device lock + * @open_list: list of open compress files * @device: device id * @use_pause_in_draining: allow pause in draining, true when set */ @@ -199,6 +200,7 @@ struct snd_compr { struct snd_card *card; unsigned int direction; struct mutex lock; + struct list_head open_list; int device; bool use_pause_in_draining; #ifdef CONFIG_SND_VERBOSE_PROCFS |
