Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1687757 > unrolled thread

[PATCH for v4.9 LTS 60/87] ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused

Started by"Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
First post2017-07-15 03:30 +0200
Last post2017-07-15 03:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH for v4.9 LTS 60/87] ASoC: dpcm: Avoid putting stream state to  STOP when FE stream is paused "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-07-15 03:30 +0200

#1687757 — [PATCH for v4.9 LTS 60/87] ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused

From"Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
Date2017-07-15 03:30 +0200
Subject[PATCH for v4.9 LTS 60/87] ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused
Message-ID<u3k4b-3a5-43@gated-at.bofh.it>
From: Patrick Lai <plai@codeaurora.org>

[ 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>
---
 sound/soc/soc-pcm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index d56a16a0f6fa..21c3ef01c438 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2184,9 +2184,11 @@ static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd)
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
 	case SNDRV_PCM_TRIGGER_SUSPEND:
-	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
 		fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP;
 		break;
+	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+		fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED;
+		break;
 	}
 
 out:
-- 
2.11.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web