Skip to content

Commit 2f8e614

Browse files
Patrick Laigregkh
authored andcommitted
ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused
[ Upstream commit 9f169b9f52a4afccdab7a7d2311b0c53a78a1e6b ] When multiple front-ends are using the same back-end, putting state of a front-end to STOP state upon receiving pause command will result in backend stream getting released by DPCM framework unintentionally. In order to avoid backend to be released when another active front-end stream is present, put the stream state to PAUSED state instead of STOP state. Signed-off-by: Patrick Lai <plai@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 32b850a commit 2f8e614

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sound/soc/soc-pcm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2073,9 +2073,11 @@ static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd)
20732073
break;
20742074
case SNDRV_PCM_TRIGGER_STOP:
20752075
case SNDRV_PCM_TRIGGER_SUSPEND:
2076-
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
20772076
fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP;
20782077
break;
2078+
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
2079+
fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED;
2080+
break;
20792081
}
20802082

20812083
out:

0 commit comments

Comments
 (0)