Patch "ALSA: pcm: Set missing stop_operating flag at undoing trigger start" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: pcm: Set missing stop_operating flag at undoing trigger start

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-pcm-set-missing-stop_operating-flag-at-undoing-.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ff57c342d6e4fcaad791762ddabef3d82294c1a6
Author: Takashi Iwai <tiwai@xxxxxxx>
Date:   Mon Dec 5 14:21:22 2022 +0100

    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@xxxxxxxxx
    Link: https://lore.kernel.org/r/20221205132124.11585-2-tiwai@xxxxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index ad0541e9e888..ac985cec5c16 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1432,8 +1432,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,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux