From 572f968f0422945c5829d08ce645835f2ecae91c Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Fri, 7 Oct 2011 14:29:19 +0100 Subject: [PATCH] --- yaml --- r: 270801 b: refs/heads/master c: 4f4c0072228785179d35b2bd9e48081ce9fa51f6 h: refs/heads/master i: 270799: f2f903d6718b7f8d3a6ba329bcfd6346532681f5 v: v3 --- [refs] | 2 +- trunk/sound/soc/soc-core.c | 1 + trunk/sound/soc/soc-dapm.c | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e1f9cf3611e9..ec5dfd38dcd3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a1ff89ef3cd6515d378f946db5f3760089bb644e +refs/heads/master: 4f4c0072228785179d35b2bd9e48081ce9fa51f6 diff --git a/trunk/sound/soc/soc-core.c b/trunk/sound/soc/soc-core.c index 2a2507627520..b65e3d40177c 100644 --- a/trunk/sound/soc/soc-core.c +++ b/trunk/sound/soc/soc-core.c @@ -1498,6 +1498,7 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) #endif card->instantiated = 1; + snd_soc_dapm_sync(&card->dapm); mutex_unlock(&card->mutex); return; diff --git a/trunk/sound/soc/soc-dapm.c b/trunk/sound/soc/soc-dapm.c index 8711aab01445..e49c56d4951e 100644 --- a/trunk/sound/soc/soc-dapm.c +++ b/trunk/sound/soc/soc-dapm.c @@ -1845,6 +1845,13 @@ static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm, */ int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm) { + /* + * Suppress early reports (eg, jacks syncing their state) to avoid + * silly DAPM runs during card startup. + */ + if (!dapm->card || !dapm->card->instantiated) + return 0; + return dapm_power_widgets(dapm, SND_SOC_DAPM_STREAM_NOP); } EXPORT_SYMBOL_GPL(snd_soc_dapm_sync);