diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-12-21 13:05:44 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-12-22 15:44:59 +0300 |
commit | 86d7500326ea71ea72aeaf0da78671eef28be2af (patch) | |
tree | b839a6c58819f2d9d3a278d422112a6caba5fe62 /include/sound/soc-dapm.h | |
parent | 768c0564439bce179e3f0f2ffafe8dcab6a08f40 (diff) | |
download | linux-86d7500326ea71ea72aeaf0da78671eef28be2af.tar.xz |
ASoC: dapm: Simplify fully route card handling
For legacy reasons the ASoC framework assumes that a CODEC INPUT or OUTPUT
widget that is not explicitly connected to a external source or sink is
potentially connected to a source or a sink and hence the framework treats
the widget itself as source (for INPUT) or sink (for OUTPUT). For this
reason a INPUT or OUTPUT widget that is really not connected needs to be
explicitly marked as so.
Setting the card's fully_routed flag will cause the ASoC core, once that all
widgets and routes have been registered, to go through the list of all
widgets and mark all INPUT and OUTPUT that are not externally connected as
non-connected. This essentially negates the default behaviour of treating
INPUT or OUTPUT widgets without external routes as sources or sinks.
This patch takes a different approach while getting the same result. Instead
of first marking INPUT and OUTPUT widgets as sinks/sources and then later
marking them as non-connected, just never mark them as a sink or a source if
the fully_routed flag is set on a card.
This requires a lot less code and also results in a slightly faster card
initialization since there is no need to iterate over all widgets and check
whether the INPUT and OUTPUT widgets are connected or not.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/soc-dapm.h')
-rw-r--r-- | include/sound/soc-dapm.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 89823cfe6f04..ecffeccb5534 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -431,7 +431,6 @@ int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm, const char *pin); int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, const char *pin); -void snd_soc_dapm_auto_nc_pins(struct snd_soc_card *card); unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol); /* Mostly internal - should not normally be used */ |