]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ASoC: Add DAPM support at the component level
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 16 Jun 2014 16:13:06 +0000 (18:13 +0200)
committerMark Brown <broonie@linaro.org>
Sat, 21 Jun 2014 20:34:15 +0000 (21:34 +0100)
commitce0fc93ae56e2ba50ff8c220d69e4e860e889320
treeb444788c95c34b08a18f80f00a411f359aa8ce23
parent68f831c2724ab72c0088471b2ed1dc99e81948ef
ASoC: Add DAPM support at the component level

This patch adds full DAPM support at the component level. Previously there was
only full DAPM support for CODECs and partial DAPM support (e.g. no Mixers nor
MUXs) for platforms. Having DAPM support at the component level will allow all
types of components to use DAPM and also help in consolidating the DAPM support
between CODECs and platforms.

Since the DAPM context is directly embedded into the snd_soc_codec and
snd_soc_platform struct and the 'dapm' field is directly referenced in a lot of
drivers moving the field just right now is not possible without causing code
churn. The approach this patch takes is to add two new fields to the component
struct. One field which is the pointer to the actual DAPM context used by the
component and one DAPM context that will be used as the default if no other
context was specified. For CODECs and platforms the pointer is initialized to
point to the CODEC or platform DAPM context. All generic code when referencing
a component's DAPM struct will go via the pointer. This will make it possible to
eventually seamlessly move the DAPM context from snd_soc_codec and
snd_soc_platform struct over once all direct references have been eliminated.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
include/sound/soc-dapm.h
include/sound/soc.h
sound/soc/soc-core.c
sound/soc/soc-dapm.c