[alsa-devel] [PATCH] ASoC: rsnd: add SNDRV_PCM_TRIGGER_SUSPEND/RESUME

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Sep 29 05:09:22 CEST 2016


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

This patch adds SNDRV_PCM_TRIGGER_SUSPEND/RESUME.
Otherwise, it breaks rsnd driver internal start/stop counter
when suspend/resume. This issue was reported/tested by Hiep

Tested-by: Hiep Cao Minh <cm-hiep at jinso.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 sound/soc/sh/rcar/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index f718a20..f181410 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -576,6 +576,7 @@ static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd,
 
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
+	case SNDRV_PCM_TRIGGER_RESUME:
 		rsnd_dai_stream_init(io, substream);
 
 		ret = rsnd_dai_call(init, io, priv);
@@ -592,6 +593,7 @@ static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd,
 
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
+	case SNDRV_PCM_TRIGGER_SUSPEND:
 		ret = rsnd_dai_call(irq, io, priv, 0);
 
 		ret |= rsnd_dai_call(stop, io, priv);
-- 
1.9.1



More information about the Alsa-devel mailing list