aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/soc-dapm.h3
-rw-r--r--sound/soc/soc-dapm.c27
2 files changed, 30 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 40cc695b69b6..1f30616afe71 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -205,6 +205,9 @@ int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
205 struct snd_ctl_elem_value *ucontrol); 205 struct snd_ctl_elem_value *ucontrol);
206int snd_soc_dapm_new_control(struct snd_soc_codec *codec, 206int snd_soc_dapm_new_control(struct snd_soc_codec *codec,
207 const struct snd_soc_dapm_widget *widget); 207 const struct snd_soc_dapm_widget *widget);
208int snd_soc_dapm_new_controls(struct snd_soc_codec *codec,
209 const struct snd_soc_dapm_widget *widget,
210 int num);
208 211
209/* dapm path setup */ 212/* dapm path setup */
210int snd_soc_dapm_connect_input(struct snd_soc_codec *codec, 213int snd_soc_dapm_connect_input(struct snd_soc_codec *codec,
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index c60200ccde60..811d65271012 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1234,6 +1234,33 @@ int snd_soc_dapm_new_control(struct snd_soc_codec *codec,
1234EXPORT_SYMBOL_GPL(snd_soc_dapm_new_control); 1234EXPORT_SYMBOL_GPL(snd_soc_dapm_new_control);
1235 1235
1236/** 1236/**
1237 * snd_soc_dapm_new_controls - create new dapm controls
1238 * @codec: audio codec
1239 * @widget: widget array
1240 * @num: number of widgets
1241 *
1242 * Creates new DAPM controls based upon the templates.
1243 *
1244 * Returns 0 for success else error.
1245 */
1246int snd_soc_dapm_new_controls(struct snd_soc_codec *codec,
1247 const struct snd_soc_dapm_widget *widget,
1248 int num)
1249{
1250 int i, ret;
1251
1252 for (i = 0; i < num; i++) {
1253 ret = snd_soc_dapm_new_control(codec, widget);
1254 if (ret < 0)
1255 return ret;
1256 widget++;
1257 }
1258 return 0;
1259}
1260EXPORT_SYMBOL_GPL(snd_soc_dapm_new_controls);
1261
1262
1263/**
1237 * snd_soc_dapm_stream_event - send a stream event to the dapm core 1264 * snd_soc_dapm_stream_event - send a stream event to the dapm core
1238 * @codec: audio codec 1265 * @codec: audio codec
1239 * @stream: stream name 1266 * @stream: stream name