diff options
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 39aff7ec6f63..ee01296d07ff 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -623,6 +623,8 @@ static int fsl_ssi_startup(struct snd_pcm_substream *substream, if (ret) return ret; + pm_runtime_get_sync(dai->dev); + /* When using dual fifo mode, it is safer to ensure an even period * size. If appearing to an odd number while DMA always starts its * task from fifo0, fifo1 would be neglected at the end of each @@ -646,6 +648,8 @@ static void fsl_ssi_shutdown(struct snd_pcm_substream *substream, struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(rtd->cpu_dai); + pm_runtime_put_sync(dai->dev); + clk_disable_unprepare(ssi_private->clk); } @@ -1089,7 +1093,6 @@ static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd, case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - pm_runtime_get_sync(dai->dev); if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) fsl_ssi_tx_config(ssi_private, true); else @@ -1103,7 +1106,6 @@ static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd, fsl_ssi_tx_config(ssi_private, false); else fsl_ssi_rx_config(ssi_private, false); - pm_runtime_put_sync(dai->dev); break; default: |