ASoC: support adding a DAI dynamically
RFC PATCH 7/10 ASoC: support adding a DAI dynamically
From: Mengdong Lin <[email protected]>
API snd_soc_add_dai() is defined to register a DAI dynamically, create its DAI widget, and notify the machine driver. This API can be used by the topology core to add DAIs dynamically.
And a callback add_dai() is defined for the soc card. The machine driver can implement this callback. Adding a new DAI dynmaically will trigger this callback, and the machine driver can create relavant DAI link in the callback context.
Signed-off-by Mengdong Lin <[email protected]>
include/sound/soc.h +4 -0
@@ -1081,6 +1081,7 @@ struct snd_soc_card {int (*set_bias_level_post)(struct snd_soc_card *,struct snd_soc_dapm_context *dapm,enum snd_soc_bias_level level); +int (*add_dai)(struct snd_soc_card *,struct snd_soc_dai_driver *);long pmdown_time;
@@ -1634,6 +1635,9 @@ int snd_soc_of_get_dai_link_codecs(struct device *dev,void snd_soc_add_dai_link (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link); +int snd_soc_add_dai (struct snd_soc_component *component, +struct snd_soc_dai_driver *dai_drv); +#include <sound/soc-dai.h> #ifdef CONFIG_DEBUG_FS
sound/soc/soc-core.c +92 -0
98 lines not on this page · raw message
Signature · 1 line
1.9.1