aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/uda1380.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/uda1380.c')
-rw-r--r--sound/soc/codecs/uda1380.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index e6bf0844fbf3..a957b4365b9d 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -271,21 +271,6 @@ static const struct snd_kcontrol_new uda1380_snd_controls[] = {
271 SOC_SINGLE("AGC Switch", UDA1380_AGC, 0, 1, 0), 271 SOC_SINGLE("AGC Switch", UDA1380_AGC, 0, 1, 0),
272}; 272};
273 273
274/* add non dapm controls */
275static int uda1380_add_controls(struct snd_soc_codec *codec)
276{
277 int err, i;
278
279 for (i = 0; i < ARRAY_SIZE(uda1380_snd_controls); i++) {
280 err = snd_ctl_add(codec->card,
281 snd_soc_cnew(&uda1380_snd_controls[i], codec, NULL));
282 if (err < 0)
283 return err;
284 }
285
286 return 0;
287}
288
289/* Input mux */ 274/* Input mux */
290static const struct snd_kcontrol_new uda1380_input_mux_control = 275static const struct snd_kcontrol_new uda1380_input_mux_control =
291 SOC_DAPM_ENUM("Route", uda1380_input_sel_enum); 276 SOC_DAPM_ENUM("Route", uda1380_input_sel_enum);
@@ -675,7 +660,8 @@ static int uda1380_init(struct snd_soc_device *socdev, int dac_clk)
675 } 660 }
676 661
677 /* uda1380 init */ 662 /* uda1380 init */
678 uda1380_add_controls(codec); 663 snd_soc_add_controls(codec, uda1380_snd_controls,
664 ARRAY_SIZE(uda1380_snd_controls));
679 uda1380_add_widgets(codec); 665 uda1380_add_widgets(codec);
680 ret = snd_soc_init_card(socdev); 666 ret = snd_soc_init_card(socdev);
681 if (ret < 0) { 667 if (ret < 0) {