Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283868
b: refs/heads/master
c: b4505ab
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Dec 3, 2011
1 parent 85daebf commit 3a9f7f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 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: e6c94e9f6dd77c928419dc05af2b3d17ed9463b9
refs/heads/master: b4505ab141a72f65bf7bb1f7c120411ab129181a
29 changes: 8 additions & 21 deletions trunk/sound/soc/codecs/wm8400.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,6 @@ SOC_SINGLE("RIN34 Mute Switch", WM8400_RIGHT_LINE_INPUT_3_4_VOLUME,

};

/* add non dapm controls */
static int wm8400_add_controls(struct snd_soc_codec *codec)
{
return snd_soc_add_controls(codec, wm8400_snd_controls,
ARRAY_SIZE(wm8400_snd_controls));
}

/*
* _DAPM_ Controls
*/
Expand Down Expand Up @@ -783,7 +776,7 @@ SND_SOC_DAPM_OUTPUT("RON"),
SND_SOC_DAPM_OUTPUT("Internal DAC Sink"),
};

static const struct snd_soc_dapm_route audio_map[] = {
static const struct snd_soc_dapm_route wm8400_dapm_routes[] = {
/* Make DACs turn on when playing even if not mixed into any outputs */
{"Internal DAC Sink", NULL, "Left DAC"},
{"Internal DAC Sink", NULL, "Right DAC"},
Expand Down Expand Up @@ -909,17 +902,6 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"RON", NULL, "RONMIX"},
};

static int wm8400_add_widgets(struct snd_soc_codec *codec)
{
struct snd_soc_dapm_context *dapm = &codec->dapm;

snd_soc_dapm_new_controls(dapm, wm8400_dapm_widgets,
ARRAY_SIZE(wm8400_dapm_widgets));
snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));

return 0;
}

/*
* Clock after FLL and dividers
*/
Expand Down Expand Up @@ -1421,8 +1403,6 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)
ret = -EINVAL;
goto err_regulator;
}
wm8400_add_controls(codec);
wm8400_add_widgets(codec);
return 0;

err_regulator:
Expand Down Expand Up @@ -1451,6 +1431,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8400 = {
.read = wm8400_read,
.write = wm8400_write,
.set_bias_level = wm8400_set_bias_level,

.controls = wm8400_snd_controls,
.num_controls = ARRAY_SIZE(wm8400_snd_controls),
.dapm_widgets = wm8400_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(wm8400_dapm_widgets),
.dapm_routes = wm8400_dapm_routes,
.num_dapm_routes = ARRAY_SIZE(wm8400_dapm_routes),
};

static int __devinit wm8400_probe(struct platform_device *pdev)
Expand Down

0 comments on commit 3a9f7f1

Please sign in to comment.