]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Move widgets from DAPM context to snd_soc_card
authorJarkko Nikula <jhnikula@gmail.com>
Tue, 14 Dec 2010 10:18:31 +0000 (12:18 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 15 Dec 2010 18:01:01 +0000 (18:01 +0000)
commit6561cba1c8be543d7a21d3dc3c0281e6266a88af
tree66ba8412fad0974ebf9a30c45ad5d81f26607e6e
parentdff9ba794541fa682db6c4805962e02e5b4df896
ASoC: Move widgets from DAPM context to snd_soc_card

Decoupling widgets from DAPM context is required when extending the ASoC
core to cross-device paths. Even the list of widgets are now kept in
struct snd_soc_card, the widget listing in sysfs and debugs remain sorted
per device.

This patch makes possible to build cross-device paths but does not extend
yet the DAPM to handle codec bias and widget power changes of an another
device.

Cross-device paths are registered by listing the widgets from device A in
a map for device B. In case of conflicting widget names between the devices,
a uniform name prefix is needed to separate them. See commit 52096af
"ASoC: Add optional name_prefix for kcontrol, widget and route names" for
help.

An example below shows a path that connects MONO out of A into Line In of B:

static const struct snd_soc_dapm_route mapA[] = {
{"MONO", NULL, "DAC"},
};

static const struct snd_soc_dapm_route mapB[] = {
{"Line In", NULL, "MONO"},
};

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
include/sound/soc-dapm.h
include/sound/soc.h
sound/soc/codecs/wm8960.c
sound/soc/soc-core.c
sound/soc/soc-dapm.c