]> git.baikalelectronics.ru Git - 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)
commit15e47a9f9b1ab212bee6a22da64d576c89a6d153
tree4e8b68dbeec41bd449750b60c25bb66486c17c96
parent82d8a429a48235828df56b81051d295f36a63a54
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