ALSA: pcm: Set missing stop_operating flag at undoing trigger start
authorTakashi Iwai <tiwai@suse.de>
Mon, 5 Dec 2022 13:21:22 +0000 (14:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:22 +0000 (13:32 +0100)
commit809b48cb2eee2d9f5259eb79a22f9c725e9c6ed9
tree60ea964c343f7979dbeac94a7c6329c9ff2476f4
parent5c3568166129bc73fd6b37748d2d8f95cd8f22f3
ALSA: pcm: Set missing stop_operating flag at undoing trigger start

[ Upstream commit 5c8cc93b06d1ff860327a273abf3ac006290d242 ]

When a PCM trigger-start fails at snd_pcm_do_start(), PCM core tries
to undo the action at snd_pcm_undo_start() by issuing the trigger STOP
manually.  At that point, we forgot to set the stop_operating flag,
hence the sync-stop won't be issued at the next prepare or other
calls.

This patch adds the missing stop_operating flag at
snd_pcm_undo_start().

Fixes: 1e850beea278 ("ALSA: pcm: Add the support for sync-stop operation")
Link: https://lore.kernel.org/r/b4e71631-4a94-613-27b2-fb595792630@carlh.net
Link: https://lore.kernel.org/r/20221205132124.11585-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/core/pcm_native.c