]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
ALSA: pcm: Don't call sync_stop if it hasn't been stopped
authorTakashi Iwai <tiwai@suse.de>
Sat, 6 Feb 2021 20:36:55 +0000 (21:36 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 15 Mar 2021 14:08:50 +0000 (15:08 +0100)
commit025abf9181a4d51a569324bd0ccd74043f81c964
treed572326e7d2bce22ab52bdafebf7df074a9cf6aa
parentcb6687644eeb0d45871c55aed2cb2a9ab7a68c64
ALSA: pcm: Don't call sync_stop if it hasn't been stopped

commit 700cb70730777c159a988e01daa93f20a1ae9b58 upstream.

The PCM stop operation sets the stop_operating flag for indicating the
sync_stop post-process.  This flag is, however, set unconditionally
even if the PCM trigger weren't issued.  This may lead to
inconsistency in the driver side.

Correct the code to set stop_operating flag only after the trigger
STOP is actually called.

Fixes: 1e850beea278 ("ALSA: pcm: Add the support for sync-stop operation")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210206203656.15959-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
sound/core/pcm_native.c