]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ASoC: Support registering a DAI dynamically
authorMengdong Lin <mengdong.lin@linux.intel.com>
Thu, 31 Dec 2015 08:40:43 +0000 (16:40 +0800)
committerMark Brown <broonie@kernel.org>
Sun, 10 Jan 2016 12:06:19 +0000 (12:06 +0000)
commit68003e6cf2bbd239a322bd8a28dacfaf8174fdee
treea4286e7b5d9cbfe6bf68c5173bddbec519412090
parent5e4fb372117f476e0c7f85418ed3e39506fbb75c
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>
include/sound/soc-dai.h
include/sound/soc.h
sound/soc/soc-core.c