summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-05-18 15:44:43 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-05-18 15:53:16 +0100
commitf83fba8baab9e95fff0fe2be0e1e32a1650bdd7f (patch)
tree9d2f8ed2d36161325606e4139af238c0b53651f5 /sound/soc/soc-dapm.c
parent452c5eaa0d5162e02ffee742ea17540887bc2904 (diff)
downloadlinux-f83fba8baab9e95fff0fe2be0e1e32a1650bdd7f.tar.gz
linux-f83fba8baab9e95fff0fe2be0e1e32a1650bdd7f.tar.bz2
linux-f83fba8baab9e95fff0fe2be0e1e32a1650bdd7f.zip
ASoC: Add debug trace for bias level transitions
A standard way of making sure we know when the bias level changes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 4ca5e56388a3..39a63f958db1 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -110,6 +110,24 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev,
struct snd_soc_codec *codec = socdev->card->codec;
int ret = 0;
+ switch (level) {
+ case SND_SOC_BIAS_ON:
+ dev_dbg(socdev->dev, "Setting full bias\n");
+ break;
+ case SND_SOC_BIAS_PREPARE:
+ dev_dbg(socdev->dev, "Setting bias prepare\n");
+ break;
+ case SND_SOC_BIAS_STANDBY:
+ dev_dbg(socdev->dev, "Setting standby bias\n");
+ break;
+ case SND_SOC_BIAS_OFF:
+ dev_dbg(socdev->dev, "Setting bias off\n");
+ break;
+ default:
+ dev_err(socdev->dev, "Setting invalid bias %d\n", level);
+ return -EINVAL;
+ }
+
if (card->set_bias_level)
ret = card->set_bias_level(card, level);
if (ret == 0 && codec->set_bias_level)