diff options
author | Mengdong Lin <mengdong.lin@linux.intel.com> | 2015-12-31 16:40:43 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-01-10 12:06:19 +0000 |
commit | 68003e6cf2bbd239a322bd8a28dacfaf8174fdee (patch) | |
tree | a4286e7b5d9cbfe6bf68c5173bddbec519412090 /include/sound/soc.h | |
parent | 5e4fb372117f476e0c7f85418ed3e39506fbb75c (diff) | |
download | op-kernel-dev-68003e6cf2bbd239a322bd8a28dacfaf8174fdee.zip op-kernel-dev-68003e6cf2bbd239a322bd8a28dacfaf8174fdee.tar.gz |
ASoC: Support registering a DAI dynamically
Define API snd_soc_register_dai() to add a DAI dynamically and
create the DAI widgets. Topology can use this API to register DAIs
when probing a component with topology info. These DAIs's playback
& capture widgets will be freed when the sound card is unregistered
and the DAIs will be freed when cleaning up the component.
And a dobj is embedded into the struct snd_soc_dai_driver. Topology
can use the dobj to find the DAI drivers created by it and free them
when the topology component is removed.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r-- | include/sound/soc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index af347bc..9d1383e 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1663,6 +1663,9 @@ int snd_soc_add_dai_link(struct snd_soc_card *card, void snd_soc_remove_dai_link(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); +int snd_soc_register_dai(struct snd_soc_component *component, + struct snd_soc_dai_driver *dai_drv); + #include <sound/soc-dai.h> #ifdef CONFIG_DEBUG_FS |