Skip to content

Commit

Permalink
ASoC: Intel: Skylake: add an error code check in skl_pcm_trigger
Browse files Browse the repository at this point in the history
skl_decoupled_trigger() can return error code like -EPIPE if failed,
add check for this.

Signed-off-by: Su Hui <suhui@nfschina.com>
Link: https://lore.kernel.org/r/20231020092619.210520-1-suhui@nfschina.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Su Hui authored and Mark Brown committed Oct 25, 2023
1 parent 7618ab5 commit f5c7bc7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/intel/skylake/skl-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,9 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
return ret;

ret = skl_decoupled_trigger(substream, cmd);
if (ret < 0)
return ret;

if ((cmd == SNDRV_PCM_TRIGGER_SUSPEND) && !w->ignore_suspend) {
/* save the dpib and lpib positions */
hstream->dpib = readl(bus->remap_addr +
Expand Down

0 comments on commit f5c7bc7

Please sign in to comment.