alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: pcm: DRAIN support reactivation
@ 2020-10-26 10:01 Cezary Rojewski
  2020-11-03 17:11 ` Sridharan, Ranjani
  2020-11-05 16:45 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Cezary Rojewski @ 2020-10-26 10:01 UTC (permalink / raw)
  To: alsa-devel
  Cc: pierre-louis.bossart, Cezary Rojewski, ranjani.sridharan,
	lgirdwood, tiwai, broonie

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(+)

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:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: pcm: DRAIN support reactivation
  2020-10-26 10:01 [PATCH] ASoC: pcm: DRAIN support reactivation Cezary Rojewski
@ 2020-11-03 17:11 ` Sridharan, Ranjani
  2020-11-05 16:45 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Sridharan, Ranjani @ 2020-11-03 17:11 UTC (permalink / raw)
  To: Rojewski, Cezary, alsa-devel
  Cc: tiwai, broonie, pierre-louis.bossart, lgirdwood

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: pcm: DRAIN support reactivation
  2020-10-26 10:01 [PATCH] ASoC: pcm: DRAIN support reactivation Cezary Rojewski
  2020-11-03 17:11 ` Sridharan, Ranjani
@ 2020-11-05 16:45 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-11-05 16:45 UTC (permalink / raw)
  To: alsa-devel, Cezary Rojewski
  Cc: lgirdwood, ranjani.sridharan, pierre-louis.bossart, tiwai

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-05 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 10:01 [PATCH] ASoC: pcm: DRAIN support reactivation Cezary Rojewski
2020-11-03 17:11 ` Sridharan, Ranjani
2020-11-05 16:45 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).