Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283872
b: refs/heads/master
c: 0f185e3
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Dec 3, 2011
1 parent c6580a3 commit eaad691
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: 0e62780f5f27f24a30d5a08ed731088115e1fe80
refs/heads/master: 0f185e3f8b06c1d0fd817af3d4c03f9c21d776e9
23 changes: 8 additions & 15 deletions trunk/sound/soc/codecs/wm8750.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ static const struct snd_soc_dapm_widget wm8750_dapm_widgets[] = {
SND_SOC_DAPM_INPUT("RINPUT3"),
};

static const struct snd_soc_dapm_route audio_map[] = {
static const struct snd_soc_dapm_route wm8750_dapm_routes[] = {
/* left mixer */
{"Left Mixer", "Playback Switch", "Left DAC"},
{"Left Mixer", "Left Bypass Switch", "Left Line Mux"},
Expand Down Expand Up @@ -395,17 +395,6 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"Right ADC", NULL, "Right ADC Mux"},
};

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

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

return 0;
}

struct _coeff_div {
u32 mclk;
u32 rate;
Expand Down Expand Up @@ -708,9 +697,6 @@ static int wm8750_probe(struct snd_soc_codec *codec)
snd_soc_update_bits(codec, WM8750_LINVOL, 0x0100, 0x0100);
snd_soc_update_bits(codec, WM8750_RINVOL, 0x0100, 0x0100);

snd_soc_add_controls(codec, wm8750_snd_controls,
ARRAY_SIZE(wm8750_snd_controls));
wm8750_add_widgets(codec);
return ret;
}

Expand All @@ -729,6 +715,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8750 = {
.reg_cache_size = ARRAY_SIZE(wm8750_reg),
.reg_word_size = sizeof(u16),
.reg_cache_default = wm8750_reg,

.controls = wm8750_snd_controls,
.num_controls = ARRAY_SIZE(wm8750_snd_controls),
.dapm_widgets = wm8750_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(wm8750_dapm_widgets),
.dapm_routes = wm8750_dapm_routes,
.num_dapm_routes = ARRAY_SIZE(wm8750_dapm_routes),
};

static const struct of_device_id wm8750_of_match[] = {
Expand Down

0 comments on commit eaad691

Please sign in to comment.