Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293152
b: refs/heads/master
c: 803b378
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Jan 20, 2012
1 parent e2b158c commit 49f8ac8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 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: ad6cdec507d877189c9813655dfa30579256a2fc
refs/heads/master: 803b37885d355438192516d73ba3565e744a8b90
25 changes: 8 additions & 17 deletions trunk/sound/soc/codecs/wm8978.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ static const struct snd_soc_dapm_widget wm8978_dapm_widgets[] = {
SND_SOC_DAPM_OUTPUT("RSPK"),
};

static const struct snd_soc_dapm_route audio_map[] = {
static const struct snd_soc_dapm_route wm8978_dapm_routes[] = {
/* Output mixer */
{"Right Output Mixer", "PCM Playback Switch", "Right DAC"},
{"Right Output Mixer", "Aux Playback Switch", "RAUX"},
Expand Down Expand Up @@ -351,18 +351,6 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"Left Input Mixer", "MicP Switch", "LMICP"},
};

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

snd_soc_dapm_new_controls(dapm, wm8978_dapm_widgets,
ARRAY_SIZE(wm8978_dapm_widgets));
/* set up the WM8978 audio map */
snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));

return 0;
}

/* PLL divisors */
struct wm8978_pll_div {
u32 k;
Expand Down Expand Up @@ -975,10 +963,6 @@ static int wm8978_probe(struct snd_soc_codec *codec)

wm8978_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

snd_soc_add_controls(codec, wm8978_snd_controls,
ARRAY_SIZE(wm8978_snd_controls));
wm8978_add_widgets(codec);

return 0;
}

Expand All @@ -998,6 +982,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8978 = {
.reg_cache_size = ARRAY_SIZE(wm8978_reg),
.reg_word_size = sizeof(u16),
.reg_cache_default = wm8978_reg,

.controls = wm8978_snd_controls,
.num_controls = ARRAY_SIZE(wm8978_snd_controls),
.dapm_widgets = wm8978_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(wm8978_dapm_widgets),
.dapm_routes = wm8978_dapm_routes,
.num_dapm_routes = ARRAY_SIZE(wm8978_dapm_routes),
};

static __devinit int wm8978_i2c_probe(struct i2c_client *i2c,
Expand Down

0 comments on commit 49f8ac8

Please sign in to comment.