Commit 007dffc661cf20f9e924eccc7b161ce2419ba81b

Authored by Patrick Lai
Committed by Greg Kroah-Hartman
1 parent 27ef0283b6

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>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -2184,8 +2184,10 @@
2184 2184 break;
2185 2185 case SNDRV_PCM_TRIGGER_STOP:
2186 2186 case SNDRV_PCM_TRIGGER_SUSPEND:
2187   - case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
2188 2187 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP;
  2188 + break;
  2189 + case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
  2190 + fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED;
2189 2191 break;
2190 2192 }
2191 2193