ASoC: fsl_sai: Move clock operation to PM runtime
authorShengjiu Wang <shengjiu.wang@nxp.com>
Tue, 7 May 2019 14:06:52 +0000 (14:06 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 8 May 2019 08:17:26 +0000 (17:17 +0900)
commitc0ffbd64b9dc14d673e393cc5933f3b4a47ab39c
tree2f35be6489dc7d1f9306c9248818c17072ea766a
parent71ed4bddde08285cd02d6d28c861ea1815d67476
ASoC: fsl_sai: Move clock operation to PM runtime

Turn off/on clocks when device enters suspend/resume. This
can help saving power.

As a further optimization, we turn off/on mclk only when SAI
is in master mode because otherwise mclk is externally provided.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_sai.c