Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342681
b: refs/heads/master
c: 2f76e68
h: refs/heads/master
i:
  342679: 0d12e49
v: v3
  • Loading branch information
Mark Brown committed Nov 28, 2012
1 parent 67a6364 commit d071b9e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f41e3d2e80ebd093128a02b2009e14faf488052
refs/heads/master: 2f76e6855ff7257230b81dfb223acc1ab0e41b0b
25 changes: 24 additions & 1 deletion trunk/sound/soc/codecs/wm5110.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ SND_SOC_DAPM_REGULATOR_SUPPLY("SPKVDDR", 0, 0),

SND_SOC_DAPM_SIGGEN("TONE"),
SND_SOC_DAPM_SIGGEN("NOISE"),
SND_SOC_DAPM_SIGGEN("HAPTICS"),

SND_SOC_DAPM_INPUT("IN1L"),
SND_SOC_DAPM_INPUT("IN1R"),
Expand Down Expand Up @@ -610,6 +611,7 @@ SND_SOC_DAPM_OUTPUT("SPKDAT2R"),
{ name, "Noise Generator", "Noise Generator" }, \
{ name, "Tone Generator 1", "Tone Generator 1" }, \
{ name, "Tone Generator 2", "Tone Generator 2" }, \
{ name, "Haptics", "HAPTICS" }, \
{ name, "AEC", "AEC Loopback" }, \
{ name, "IN1L", "IN1L PGA" }, \
{ name, "IN1R", "IN1R PGA" }, \
Expand Down Expand Up @@ -902,9 +904,29 @@ static struct snd_soc_dai_driver wm5110_dai[] = {
static int wm5110_codec_probe(struct snd_soc_codec *codec)
{
struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec);
int ret;

codec->control_data = priv->core.arizona->regmap;
return snd_soc_codec_set_cache_io(codec, 32, 16, SND_SOC_REGMAP);
priv->core.arizona->dapm = &codec->dapm;

ret = snd_soc_codec_set_cache_io(codec, 32, 16, SND_SOC_REGMAP);
if (ret != 0)
return ret;

snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS");

priv->core.arizona->dapm = &codec->dapm;

return 0;
}

static int wm5110_codec_remove(struct snd_soc_codec *codec)
{
struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec);

priv->core.arizona->dapm = NULL;

return 0;
}

#define WM5110_DIG_VU 0x0200
Expand Down Expand Up @@ -935,6 +957,7 @@ static unsigned int wm5110_digital_vu[] = {

static struct snd_soc_codec_driver soc_codec_dev_wm5110 = {
.probe = wm5110_codec_probe,
.remove = wm5110_codec_remove,

.idle_bias_off = true,

Expand Down

0 comments on commit d071b9e

Please sign in to comment.