summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-07 12:18:44 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-08 02:18:11 +0200
commitb7af1dafdfaf8419065399d07fb7cbae14b286ef (patch)
tree1b7a97fdc716edeed1b236e65d8afd3c3cbd03d3 /include/sound
parentMerge branch 'for-2.6.39' into for-2.6.40 (diff)
downloadlinux-b7af1dafdfaf8419065399d07fb7cbae14b286ef.tar.xz
linux-b7af1dafdfaf8419065399d07fb7cbae14b286ef.zip
ASoC: Add data based control initialisation for CODECs and cards
Allow CODEC and card drivers to point to an array of controls from their driver structure rather than explicitly calling snd_soc_add_controls(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 2720a9f3780b..435cb83c7f48 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -577,7 +577,9 @@ struct snd_soc_codec_driver {
pm_message_t state);
int (*resume)(struct snd_soc_codec *);
- /* Default DAPM setup, added after probe() is run */
+ /* Default control and setup, added after probe() is run */
+ const struct snd_kcontrol_new *controls;
+ int num_controls;
const struct snd_soc_dapm_widget *dapm_widgets;
int num_dapm_widgets;
const struct snd_soc_dapm_route *dapm_routes;
@@ -747,6 +749,9 @@ struct snd_soc_card {
struct snd_soc_pcm_runtime *rtd_aux;
int num_aux_rtd;
+ const struct snd_kcontrol_new *controls;
+ int num_controls;
+
/*
* Card-specific routes and widgets.
*/