diff options
author | Chuansheng Liu <chuansheng.liu@intel.com> | 2012-12-21 05:17:12 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-24 10:35:34 -0500 |
commit | ff541f4b2a7546ffa8edf123f4b3b49bb24574e2 (patch) | |
tree | 07d1f14b59e51119b3caf9fc1da4e815b9b32982 | |
parent | a49f0d1ea3ec94fc7cf33a7c36a16343b74bd565 (diff) |
ASoC: core: giving WARN when device starting from non-off bias with idle_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>
-rw-r--r-- | sound/soc/soc-core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 91d592ff67b7..e0e8ce0c031a 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1107,6 +1107,10 @@ static int soc_probe_codec(struct snd_soc_card *card, | |||
1107 | "ASoC: failed to probe CODEC %d\n", ret); | 1107 | "ASoC: failed to probe CODEC %d\n", ret); |
1108 | goto err_probe; | 1108 | goto err_probe; |
1109 | } | 1109 | } |
1110 | WARN(codec->dapm.idle_bias_off && | ||
1111 | codec->dapm.bias_level != SND_SOC_BIAS_OFF, | ||
1112 | "codec %s can not start from non-off bias" | ||
1113 | " with idle_bias_off==1\n", codec->name); | ||
1110 | } | 1114 | } |
1111 | 1115 | ||
1112 | /* If the driver didn't set I/O up try regmap */ | 1116 | /* If the driver didn't set I/O up try regmap */ |