diff options
Diffstat (limited to 'sound/soc/codecs/wm8728.c')
-rw-r--r-- | sound/soc/codecs/wm8728.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c index 736b0352d0a7..86d4718d3a76 100644 --- a/sound/soc/codecs/wm8728.c +++ b/sound/soc/codecs/wm8728.c | |||
@@ -65,22 +65,11 @@ SND_SOC_DAPM_OUTPUT("VOUTL"), | |||
65 | SND_SOC_DAPM_OUTPUT("VOUTR"), | 65 | SND_SOC_DAPM_OUTPUT("VOUTR"), |
66 | }; | 66 | }; |
67 | 67 | ||
68 | static const struct snd_soc_dapm_route intercon[] = { | 68 | static const struct snd_soc_dapm_route wm8728_intercon[] = { |
69 | {"VOUTL", NULL, "DAC"}, | 69 | {"VOUTL", NULL, "DAC"}, |
70 | {"VOUTR", NULL, "DAC"}, | 70 | {"VOUTR", NULL, "DAC"}, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static int wm8728_add_widgets(struct snd_soc_codec *codec) | ||
74 | { | ||
75 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
76 | |||
77 | snd_soc_dapm_new_controls(dapm, wm8728_dapm_widgets, | ||
78 | ARRAY_SIZE(wm8728_dapm_widgets)); | ||
79 | snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon)); | ||
80 | |||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | static int wm8728_mute(struct snd_soc_dai *dai, int mute) | 73 | static int wm8728_mute(struct snd_soc_dai *dai, int mute) |
85 | { | 74 | { |
86 | struct snd_soc_codec *codec = dai->codec; | 75 | struct snd_soc_codec *codec = dai->codec; |
@@ -255,7 +244,6 @@ static int wm8728_probe(struct snd_soc_codec *codec) | |||
255 | 244 | ||
256 | snd_soc_add_controls(codec, wm8728_snd_controls, | 245 | snd_soc_add_controls(codec, wm8728_snd_controls, |
257 | ARRAY_SIZE(wm8728_snd_controls)); | 246 | ARRAY_SIZE(wm8728_snd_controls)); |
258 | wm8728_add_widgets(codec); | ||
259 | 247 | ||
260 | return ret; | 248 | return ret; |
261 | } | 249 | } |
@@ -275,6 +263,10 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8728 = { | |||
275 | .reg_cache_size = ARRAY_SIZE(wm8728_reg_defaults), | 263 | .reg_cache_size = ARRAY_SIZE(wm8728_reg_defaults), |
276 | .reg_word_size = sizeof(u16), | 264 | .reg_word_size = sizeof(u16), |
277 | .reg_cache_default = wm8728_reg_defaults, | 265 | .reg_cache_default = wm8728_reg_defaults, |
266 | .dapm_widgets = wm8728_dapm_widgets, | ||
267 | .num_dapm_widgets = ARRAY_SIZE(wm8728_dapm_widgets), | ||
268 | .dapm_routes = wm8728_intercon, | ||
269 | .num_dapm_routes = ARRAY_SIZE(wm8728_intercon), | ||
278 | }; | 270 | }; |
279 | 271 | ||
280 | #if defined(CONFIG_SPI_MASTER) | 272 | #if defined(CONFIG_SPI_MASTER) |