Skip to content

Commit

Permalink
ASoC: Add debug output tracing all cache register writes
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
  • Loading branch information
Mark Brown committed May 5, 2010
1 parent 39b8eab commit 985d8c4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sound/soc/soc-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ static int snd_soc_4_12_write(struct snd_soc_codec *codec, unsigned int reg,
return 0;
}

dev_dbg(codec->dev, "0x%x = 0x%x\n", reg, value);

ret = codec->hw_write(codec->control_data, data, 2);
if (ret == 2)
return 0;
Expand Down Expand Up @@ -112,6 +114,8 @@ static int snd_soc_7_9_write(struct snd_soc_codec *codec, unsigned int reg,
return 0;
}

dev_dbg(codec->dev, "0x%x = 0x%x\n", reg, value);

ret = codec->hw_write(codec->control_data, data, 2);
if (ret == 2)
return 0;
Expand Down Expand Up @@ -171,6 +175,8 @@ static int snd_soc_8_8_write(struct snd_soc_codec *codec, unsigned int reg,
return 0;
}

dev_dbg(codec->dev, "0x%x = 0x%x\n", reg, value);

if (codec->hw_write(codec->control_data, data, 2) == 2)
return 0;
else
Expand Down Expand Up @@ -205,6 +211,8 @@ static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg,
return 0;
}

dev_dbg(codec->dev, "0x%x = 0x%x\n", reg, value);

if (codec->hw_write(codec->control_data, data, 3) == 3)
return 0;
else
Expand Down Expand Up @@ -362,6 +370,8 @@ static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg,
return 0;
}

dev_dbg(codec->dev, "0x%x = 0x%x\n", reg, value);

ret = codec->hw_write(codec->control_data, data, 3);
if (ret == 3)
return 0;
Expand Down Expand Up @@ -472,6 +482,8 @@ static int snd_soc_16_16_write(struct snd_soc_codec *codec, unsigned int reg,
return 0;
}

dev_dbg(codec->dev, "0x%x = 0x%x\n", reg, value);

ret = codec->hw_write(codec->control_data, data, 4);
if (ret == 4)
return 0;
Expand Down

0 comments on commit 985d8c4

Please sign in to comment.