Commit 78b50f39 authored by Mark Brown's avatar Mark Brown

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: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent bc0195aa
...@@ -141,6 +141,8 @@ struct snd_soc_tplg_ops { ...@@ -141,6 +141,8 @@ struct snd_soc_tplg_ops {
int io_ops_count; int io_ops_count;
}; };
#ifdef CONFIG_SND_SOC_TOPOLOGY
/* gets a pointer to data from the firmware block header */ /* 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) 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, ...@@ -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, const struct snd_soc_tplg_widget_events *events, int num_events,
u16 event_type); u16 event_type);
#else
static inline int snd_soc_tplg_component_remove(struct snd_soc_component *comp,
u32 index)
{
return 0;
}
#endif
#endif #endif
...@@ -30,6 +30,9 @@ config SND_SOC_GENERIC_DMAENGINE_PCM ...@@ -30,6 +30,9 @@ config SND_SOC_GENERIC_DMAENGINE_PCM
bool bool
select SND_DMAENGINE_PCM select SND_DMAENGINE_PCM
config SND_SOC_TOPOLOGY
bool
# All the supported SoCs # All the supported SoCs
source "sound/soc/adi/Kconfig" source "sound/soc/adi/Kconfig"
source "sound/soc/atmel/Kconfig" source "sound/soc/atmel/Kconfig"
......
snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o
snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o soc-devres.o soc-ops.o snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o soc-devres.o soc-ops.o
ifneq ($(CONFIG_SND_SOC_TOPOLOGY),)
snd-soc-core-objs += soc-topology.o snd-soc-core-objs += soc-topology.o
endif
ifneq ($(CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM),) ifneq ($(CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM),)
snd-soc-core-objs += soc-generic-dmaengine-pcm.o snd-soc-core-objs += soc-generic-dmaengine-pcm.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment