Skip to content

Commit

Permalink
ASoC: rsnd: add SNDRV_PCM_TRIGGER_SUSPEND/RESUME
Browse files Browse the repository at this point in the history
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@jinso.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
morimoto authored and broonie committed Sep 29, 2016
1 parent 97b4bc7 commit 4b9c75e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/sh/rcar/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 4b9c75e

Please sign in to comment.