]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ALSA: pcm: Forcibly stop at disconnect callback
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Oct 2017 09:42:00 +0000 (11:42 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 18 Oct 2017 06:05:46 +0000 (08:05 +0200)
commit6ca73de7ebc5dac358551633e0c69ab6b5007baa
tree4e8b68dbeec41bd449750b60c25bb66486c17c96
parent8b645e4a40dd490b9426670fffe9bb9e2878c3fd
ALSA: pcm: Forcibly stop at disconnect callback

So far we assumed that each driver implements the hotplug PCM handling
properly, e.g. dealing with the pending PCM stream at disconnect
callback.  But most codes don't care, and it eventually leaves the PCM
stream inconsistent state when an abrupt disconnection like sysfs
unbind happens.

This patch is simple but a big-hammer solution: invoke snd_pcm_stop()
at the common PCM disconnect callback always when the stream is
running.

Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm.c