diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-11-23 14:42:04 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-23 16:34:54 -0500 |
commit | 1633281b79fd276f1c7c2fb37c3b97da74e42ae5 (patch) | |
tree | be8fe06be86f436efb3ddece45338e28a394ccdb /include/sound | |
parent | d4a2eca781bfd7323bfd98dbc7fd63c7d613fef2 (diff) |
ASoC: Implement fully_routed card property
A card is fully routed if the DAPM route table describes all connections on
the board.
When a card is fully routed, some operations can be automated by the ASoC
core. The first, and currently only, such operation is described below, and
implemented by this patch.
Codecs often have a large number of external pins, and not all of these pins
will be connected on all board designs. Some machine drivers therefore call
snd_soc_dapm_nc_pin() for all the unused pins, in order to tell the ASoC core
never to activate them.
However, when a card is fully routed, the information needed to derive the
set of unused pins is present in card->dapm_routes. In this case, have
the ASoC core automatically call snd_soc_dapm_nc_pin() for each unused
codec pin.
This has been tested with soc/tegra/tegra_wm8903.c and soc/tegra/trimslice.c.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc-dapm.h | 1 | ||||
-rw-r--r-- | include/sound/soc.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 17a4c17f19f5..0c159a7d211e 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -380,6 +380,7 @@ int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm, | |||
380 | const char *pin); | 380 | const char *pin); |
381 | int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, | 381 | int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, |
382 | const char *pin); | 382 | const char *pin); |
383 | void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec); | ||
383 | 384 | ||
384 | /* Mostly internal - should not normally be used */ | 385 | /* Mostly internal - should not normally be used */ |
385 | void dapm_mark_dirty(struct snd_soc_dapm_widget *w, const char *reason); | 386 | void dapm_mark_dirty(struct snd_soc_dapm_widget *w, const char *reason); |
diff --git a/include/sound/soc.h b/include/sound/soc.h index b21b3047e91b..737a4f4b18ff 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -815,6 +815,7 @@ struct snd_soc_card { | |||
815 | int num_dapm_widgets; | 815 | int num_dapm_widgets; |
816 | const struct snd_soc_dapm_route *dapm_routes; | 816 | const struct snd_soc_dapm_route *dapm_routes; |
817 | int num_dapm_routes; | 817 | int num_dapm_routes; |
818 | bool fully_routed; | ||
818 | 819 | ||
819 | struct work_struct deferred_resume_work; | 820 | struct work_struct deferred_resume_work; |
820 | 821 | ||