warn_on message is shown for rt5639 dev when usage count for it goes
negative, so if any case the refcount count goes negative we will see
the warn_on message on particular dev, this change will increment the
usage count when the dev changes from SND_SOC_BIAS_OFF to
SND_SOC_BIAS_STANDBY or during LP0 were the resume will set the bias
to SND_SOC_BIAS_STANDBY, so need to increment refcount based on it.
Bug
1410313
Change-Id: Ie2326cffe406d1a3d61905ecba1437445cd350ad
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/336540
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
struct snd_soc_dapm_context *d = data;
int ret;
- /* If we're off and we're not supposed to be go into STANDBY */
- if (d->bias_level == SND_SOC_BIAS_OFF &&
- d->target_bias_level != SND_SOC_BIAS_OFF) {
+ if ((d->bias_level == SND_SOC_BIAS_OFF &&
+ d->target_bias_level != SND_SOC_BIAS_OFF) ||
+ (d->bias_level == SND_SOC_BIAS_STANDBY &&
+ d->target_bias_level == SND_SOC_BIAS_OFF)) {
if (d->dev)
pm_runtime_get_sync(d->dev);
+ }
+ /* If we're off and we're not supposed to be go into STANDBY */
+ if (d->bias_level == SND_SOC_BIAS_OFF &&
+ d->target_bias_level != SND_SOC_BIAS_OFF) {
ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_STANDBY);
if (ret != 0)
dev_err(d->dev,