From: Pierre-Louis Bossart Date: Wed, 6 Apr 2022 19:00:56 +0000 (-0500) Subject: ASoC: soc-pcm: improve BE transition for TRIGGER_START X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=374b50e234a3e2f92bb881a814218f9740e85dcc;p=linux.git ASoC: soc-pcm: improve BE transition for TRIGGER_START When the BE was in PAUSED state, the correct trigger is PAUSE_RELEASE. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220406190056.233481-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index e8700dd1839fc..6f43db35a5c84 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2122,6 +2122,13 @@ int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, if (be->dpcm[stream].be_start != 1) goto next; + if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_PAUSED) + ret = soc_pcm_trigger(be_substream, + SNDRV_PCM_TRIGGER_PAUSE_RELEASE); + else + ret = soc_pcm_trigger(be_substream, + SNDRV_PCM_TRIGGER_START); + ret = soc_pcm_trigger(be_substream, cmd); if (ret) { be->dpcm[stream].be_start--;