summaryrefslogtreecommitdiffstats
path: root/include/sound/soc-topology.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-08-15 17:24:20 +0200
committerMark Brown <broonie@kernel.org>2015-08-18 07:45:47 +0200
commit78b50f39142612d01073595d33e7cc48f03a5a2f (patch)
tree1f1d528104103efc050c367a052edf9d16b542bf /include/sound/soc-topology.h
parentLinux 4.2-rc2 (diff)
downloadlinux-78b50f39142612d01073595d33e7cc48f03a5a2f.tar.xz
linux-78b50f39142612d01073595d33e7cc48f03a5a2f.zip
ASoC: topology: Add Kconfig option for topology
Allow the topology code to be compiled out so that users who don't need topology don't need to havve the code compiled in, saving them some memory. Some more configuration could be added to remove some of the hooks into the core data structures but that is probably best done with some refactoring to use functions to do the updates of the data structures rather than ifdefing in the code as we'd need to do at the minute. Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/soc-topology.h')
-rw-r--r--include/sound/soc-topology.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sound/soc-topology.h b/include/sound/soc-topology.h
index 865a141b118b..427bc41df3ae 100644
--- a/include/sound/soc-topology.h
+++ b/include/sound/soc-topology.h
@@ -141,6 +141,8 @@ struct snd_soc_tplg_ops {
int io_ops_count;
};
+#ifdef CONFIG_SND_SOC_TOPOLOGY
+
/* gets a pointer to data from the firmware block header */
static inline const void *snd_soc_tplg_get_data(struct snd_soc_tplg_hdr *hdr)
{
@@ -165,4 +167,14 @@ int snd_soc_tplg_widget_bind_event(struct snd_soc_dapm_widget *w,
const struct snd_soc_tplg_widget_events *events, int num_events,
u16 event_type);
+#else
+
+static inline int snd_soc_tplg_component_remove(struct snd_soc_component *comp,
+ u32 index)
+{
+ return 0;
+}
+
+#endif
+
#endif