Skip to content

Commit

Permalink
ASoC: Add debug trace for bias level transitions
Browse files Browse the repository at this point in the history
A standard way of making sure we know when the bias level changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed May 18, 2009
1 parent 452c5ea commit f83fba8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f83fba8

Please sign in to comment.