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>
snd_soc_component_update_bits(component, WM8962_PWR_MGMT_1,
WM8962_VMID_SEL_MASK, 0x80);
- wm8962_configure_bclk(component);
+ if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_STANDBY)
+ wm8962_configure_bclk(component);
+
break;
case SND_SOC_BIAS_STANDBY: