Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293166
b: refs/heads/master
c: a2bd691
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Jan 20, 2012
1 parent 7b36003 commit b29f8de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 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: 7a389651bd88f884b46ddcada78730d294ccf1eb
refs/heads/master: a2bd691c64383ab290732d771a7404e26c0b9d53
23 changes: 8 additions & 15 deletions trunk/sound/soc/codecs/wm8974.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ SND_SOC_DAPM_OUTPUT("SPKOUTP"),
SND_SOC_DAPM_OUTPUT("SPKOUTN"),
};

static const struct snd_soc_dapm_route audio_map[] = {
static const struct snd_soc_dapm_route wm8974_dapm_routes[] = {
/* Mono output mixer */
{"Mono Mixer", "PCM Playback Switch", "DAC"},
{"Mono Mixer", "Aux Playback Switch", "Aux Input"},
Expand Down Expand Up @@ -269,17 +269,6 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"Aux Input", NULL, "AUX"},
};

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

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

return 0;
}

struct pll_ {
unsigned int pre_div:1;
unsigned int n:4;
Expand Down Expand Up @@ -611,9 +600,6 @@ static int wm8974_probe(struct snd_soc_codec *codec)
}

wm8974_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
snd_soc_add_controls(codec, wm8974_snd_controls,
ARRAY_SIZE(wm8974_snd_controls));
wm8974_add_widgets(codec);

return ret;
}
Expand All @@ -634,6 +620,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8974 = {
.reg_cache_size = ARRAY_SIZE(wm8974_reg),
.reg_word_size = sizeof(u16),
.reg_cache_default = wm8974_reg,

.controls = wm8974_snd_controls,
.num_controls = ARRAY_SIZE(wm8974_snd_controls),
.dapm_widgets = wm8974_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(wm8974_dapm_widgets),
.dapm_routes = wm8974_dapm_routes,
.num_dapm_routes = ARRAY_SIZE(wm8974_dapm_routes),
};

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

0 comments on commit b29f8de

Please sign in to comment.