Skip to content

Commit 5c8cc93

Browse files
committed
ALSA: pcm: Set missing stop_operating flag at undoing trigger start
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: 1e850be ("ALSA: pcm: Add the support for sync-stop operation") Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 7d721ba commit 5c8cc93

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sound/core/pcm_native.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1432,8 +1432,10 @@ static int snd_pcm_do_start(struct snd_pcm_substream *substream,
14321432
static void snd_pcm_undo_start(struct snd_pcm_substream *substream,
14331433
snd_pcm_state_t state)
14341434
{
1435-
if (substream->runtime->trigger_master == substream)
1435+
if (substream->runtime->trigger_master == substream) {
14361436
substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_STOP);
1437+
substream->runtime->stop_operating = true;
1438+
}
14371439
}
14381440

14391441
static void snd_pcm_post_start(struct snd_pcm_substream *substream,

0 commit comments

Comments
 (0)