summaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-12-05 16:21:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-14 12:15:38 +0300
commit46a9b31369d76ba0f01950a0331e924be05fff58 (patch)
tree209b42a39e57377ee681e318e6ea45582354f35a /sound/core
parentbe719496ae6a7fc325e9e5056a52f63ebc84cc0c (diff)
downloadlinux-46a9b31369d76ba0f01950a0331e924be05fff58.tar.xz
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>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_native.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 6cc7c2a9fe73..9425fcd30c4c 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1413,8 +1413,10 @@ static int snd_pcm_do_start(struct snd_pcm_substream *substream,
static void snd_pcm_undo_start(struct snd_pcm_substream *substream,
snd_pcm_state_t state)
{
- if (substream->runtime->trigger_master == substream)
+ if (substream->runtime->trigger_master == substream) {
substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_STOP);
+ substream->runtime->stop_operating = true;
+ }
}
static void snd_pcm_post_start(struct snd_pcm_substream *substream,