Skip to content

Commit

Permalink
ASoC: core: giving WARN when device starting from non-off bias with i…
Browse files Browse the repository at this point in the history
…dle_bias_off

Just found some cases that some codec drivers set the bias to _STANDBY and
set idle_bias_off to 1 during probing.
It will cause unpaired runtime_get_sync/put() issue. Also as Mark suggested,
there is no reason to start from _STANDBY bias with idle_bias_off == 1.

So here giving one warning when detected (dapm.idle_bias_off == 1) and
(dapm.bias_level != SND_SOC_BIAS_OFF) just after driver->probe().

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Chuansheng Liu authored and Mark Brown committed Dec 24, 2012
1 parent a49f0d1 commit ff541f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,10 @@ static int soc_probe_codec(struct snd_soc_card *card,
"ASoC: failed to probe CODEC %d\n", ret);
goto err_probe;
}
WARN(codec->dapm.idle_bias_off &&
codec->dapm.bias_level != SND_SOC_BIAS_OFF,
"codec %s can not start from non-off bias"
" with idle_bias_off==1\n", codec->name);
}

/* If the driver didn't set I/O up try regmap */
Expand Down

0 comments on commit ff541f4

Please sign in to comment.