Commit f5c7bc7a authored by Su Hui's avatar Su Hui Committed by Mark Brown

ASoC: Intel: Skylake: add an error code check in skl_pcm_trigger

skl_decoupled_trigger() can return error code like -EPIPE if failed,
add check for this.
Signed-off-by: default avatarSu Hui <suhui@nfschina.com>
Link: https://lore.kernel.org/r/20231020092619.210520-1-suhui@nfschina.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7618ab52
...@@ -518,6 +518,9 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd, ...@@ -518,6 +518,9 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
return ret; return ret;
ret = skl_decoupled_trigger(substream, cmd); ret = skl_decoupled_trigger(substream, cmd);
if (ret < 0)
return ret;
if ((cmd == SNDRV_PCM_TRIGGER_SUSPEND) && !w->ignore_suspend) { if ((cmd == SNDRV_PCM_TRIGGER_SUSPEND) && !w->ignore_suspend) {
/* save the dpib and lpib positions */ /* save the dpib and lpib positions */
hstream->dpib = readl(bus->remap_addr + hstream->dpib = readl(bus->remap_addr +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment