diff mbox series

ASoC: pcm: DRAIN support reactivation

Message ID 20201026100129.8216-1-cezary.rojewski@intel.com (mailing list archive)
State Accepted
Commit 4c22b80f61540ea99d9b4af0127315338755f05b
Headers show
Series ASoC: pcm: DRAIN support reactivation | expand

Commit Message

Cezary Rojewski Oct. 26, 2020, 10:01 a.m. UTC
soc-pcm's dpcm_fe_dai_do_trigger() supported DRAIN commnad up to kernel
v5.4 where explicit switch(cmd) has been introduced which takes into
account all SNDRV_PCM_TRIGGER_xxx but SNDRV_PCM_TRIGGER_DRAIN. Update
switch statement to reactive support for it.

As DRAIN is somewhat unique by lacking negative/stop counterpart, bring
behaviour of dpcm_fe_dai_do_trigger() for said command back to its
pre-v5.4 state by adding it to START/RESUME/PAUSE_RELEASE group.

Fixes: acbf27746ecf ("ASoC: pcm: update FE/BE trigger order based on the command")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
 sound/soc/soc-pcm.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Sridharan, Ranjani Nov. 3, 2020, 5:11 p.m. UTC | #1
On Mon, 2020-10-26 at 11:01 +0100, Cezary Rojewski wrote:
> soc-pcm's dpcm_fe_dai_do_trigger() supported DRAIN commnad up to
> kernel
> v5.4 where explicit switch(cmd) has been introduced which takes into
> account all SNDRV_PCM_TRIGGER_xxx but SNDRV_PCM_TRIGGER_DRAIN. Update
> switch statement to reactive support for it.
> 
> As DRAIN is somewhat unique by lacking negative/stop counterpart,
> bring
> behaviour of dpcm_fe_dai_do_trigger() for said command back to its
> pre-v5.4 state by adding it to START/RESUME/PAUSE_RELEASE group.
> 
> Fixes: acbf27746ecf ("ASoC: pcm: update FE/BE trigger order based on
> the command")
> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Looks good to me. Thanks, Cezary!

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Mark Brown Nov. 5, 2020, 4:45 p.m. UTC | #2
On Mon, 26 Oct 2020 11:01:29 +0100, Cezary Rojewski wrote:
> soc-pcm's dpcm_fe_dai_do_trigger() supported DRAIN commnad up to kernel
> v5.4 where explicit switch(cmd) has been introduced which takes into
> account all SNDRV_PCM_TRIGGER_xxx but SNDRV_PCM_TRIGGER_DRAIN. Update
> switch statement to reactive support for it.
> 
> As DRAIN is somewhat unique by lacking negative/stop counterpart, bring
> behaviour of dpcm_fe_dai_do_trigger() for said command back to its
> pre-v5.4 state by adding it to START/RESUME/PAUSE_RELEASE group.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: pcm: DRAIN support reactivation
      commit: 4c22b80f61540ea99d9b4af0127315338755f05b

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index dcab9527ba3d..91bf33958159 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2231,6 +2231,7 @@  static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd)
 		case SNDRV_PCM_TRIGGER_START:
 		case SNDRV_PCM_TRIGGER_RESUME:
 		case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+		case SNDRV_PCM_TRIGGER_DRAIN:
 			ret = dpcm_dai_trigger_fe_be(substream, cmd, true);
 			break;
 		case SNDRV_PCM_TRIGGER_STOP:
@@ -2248,6 +2249,7 @@  static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd)
 		case SNDRV_PCM_TRIGGER_START:
 		case SNDRV_PCM_TRIGGER_RESUME:
 		case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+		case SNDRV_PCM_TRIGGER_DRAIN:
 			ret = dpcm_dai_trigger_fe_be(substream, cmd, false);
 			break;
 		case SNDRV_PCM_TRIGGER_STOP: