From 1633281b79fd276f1c7c2fb37c3b97da74e42ae5 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 23 Nov 2011 12:42:04 -0700 Subject: 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 Signed-off-by: Mark Brown --- include/sound/soc-dapm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sound/soc-dapm.h') diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 17a4c17f19f..0c159a7d211 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, const char *pin); int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, const char *pin); +void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec); /* Mostly internal - should not normally be used */ void dapm_mark_dirty(struct snd_soc_dapm_widget *w, const char *reason); -- cgit v1.2.3