Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283911
b: refs/heads/master
c: 46ce904
h: refs/heads/master
i:
  283909: cf18f16
  283907: 60b0868
  283903: e1e6aed
v: v3
  • Loading branch information
Mark Brown committed Dec 9, 2011
1 parent 6caab68 commit 930f121
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 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: 5a374524216a244d30c42545ab49f743a43b05c7
refs/heads/master: 46ce904f7d4788ebc2ca7894fb56b9aa5b84af2d
24 changes: 8 additions & 16 deletions trunk/sound/soc/codecs/wm8900.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ SND_SOC_DAPM_MIXER("Right Output Mixer", WM8900_REG_POWER3, 2, 0,
};

/* Target, Path, Source */
static const struct snd_soc_dapm_route audio_map[] = {
static const struct snd_soc_dapm_route wm8900_dapm_routes[] = {
/* Inputs */
{"Left Input PGA", "LINPUT1 Switch", "LINPUT1"},
{"Left Input PGA", "LINPUT2 Switch", "LINPUT2"},
Expand Down Expand Up @@ -606,17 +606,6 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"HP_R", NULL, "Headphone Amplifier"},
};

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

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

return 0;
}

static int wm8900_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
Expand Down Expand Up @@ -1203,10 +1192,6 @@ static int wm8900_probe(struct snd_soc_codec *codec)
/* Set the DAC and mixer output bias */
snd_soc_write(codec, WM8900_REG_OUTBIASCTL, 0x81);

snd_soc_add_controls(codec, wm8900_snd_controls,
ARRAY_SIZE(wm8900_snd_controls));
wm8900_add_widgets(codec);

return 0;
}

Expand All @@ -1227,6 +1212,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8900 = {
.reg_cache_size = ARRAY_SIZE(wm8900_reg_defaults),
.reg_word_size = sizeof(u16),
.reg_cache_default = wm8900_reg_defaults,

.controls = wm8900_snd_controls,
.num_controls = ARRAY_SIZE(wm8900_snd_controls),
.dapm_widgets = wm8900_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(wm8900_dapm_widgets),
.dapm_routes = wm8900_dapm_routes,
.num_dapm_routes = ARRAY_SIZE(wm8900_dapm_routes),
};

#if defined(CONFIG_SPI_MASTER)
Expand Down

0 comments on commit 930f121

Please sign in to comment.