Skip to contentSkip to conversation

ASoC: dpcm: allow start or stop during pause for backend

PATCH New 이경택 1 participant 1 message Mar 30, 2020 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20200330070638epcas2p27ad39d4009e60435c65f30ca7a17f850@epcas2p2.samsung.com

이경택

author
#1 lore raw

PATCH 1/1 ASoC: dpcm: allow start or stop during pause for backend

soc_compr_trigger_fe() allows start or stop after pause_push. In dpcm_be_dai_trigger(), however, only pause_release is allowed command after pause_push.
To fix this problem, SND_SOC_DPCM_STATE_PAUSED should be allowed also for start or stop command.

---
 sound/soc/soc-pcm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
sound/soc/soc-pcm.c +0 -0
index 2c59b3688ca0..8f6f0ad50288 100644
@@ -2236,7 +2236,8 @@ int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime

*fe, int stream,
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
if ((be->dpcm[stream].state !=
SND_SOC_DPCM_STATE_PREPARE) &&
- (be->dpcm[stream].state !=
SND_SOC_DPCM_STATE_STOP))
+ (be->dpcm[stream].state !=
SND_SOC_DPCM_STATE_STOP) &&
+ (be->dpcm[stream].state !=
SND_SOC_DPCM_STATE_PAUSED))
continue;

ret = dpcm_do_trigger(dpcm, be_substream, cmd);
@@ -2266,7 +2267,8 @@ int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream,
be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; break;
case SNDRV_PCM_TRIGGER_STOP:
- if (be->dpcm[stream].state !=
SND_SOC_DPCM_STATE_START)
+ if ((be->dpcm[stream].state !=
SND_SOC_DPCM_STATE_START) &&
+ (be->dpcm[stream].state !=
SND_SOC_DPCM_STATE_PAUSED))
continue;

if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream))

Signature · 1 line
2.21.0