MLK-21480: ASoC: wm8962: add constrain for configure bclk
authorShengjiu Wang <shengjiu.wang@nxp.com>
Thu, 9 May 2019 10:37:52 +0000 (18:37 +0800)
committerShengjiu Wang <shengjiu.wang@nxp.com>
Fri, 10 May 2019 02:36:33 +0000 (10:36 +0800)
commitecacf0a022f3c6f9c99e8434c24cc473a6b76af8
tree7824706b3c96a0ff3c0be23b9c91d94acdcb1409
parent86c2535f6b255afb667b656f12829de3489d29e7
MLK-21480: ASoC: wm8962: add constrain for configure bclk

There is error log when suspend & resume

wm8962 3-001a: Failed to read DSPCLK: -1

when suspend the pm_runtime_suspend is called before the
set_bias_level. so in the wm8962_configure_bclk there is
failure when trying to read a volatile register for we have
enabled regcache_cache_only.

To avoid such issue, we can avoid to call set_bias_level
when the level change from SND_SOC_BIAS_ON to
SND_SOC_BIAS_PREPARE, for this flow is for disabling the codec.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
sound/soc/codecs/wm8962.c