aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/soc-core.c1
-rw-r--r--sound/soc/soc-dapm.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 2a2507627520..b65e3d40177c 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1498,6 +1498,7 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
1498#endif 1498#endif
1499 1499
1500 card->instantiated = 1; 1500 card->instantiated = 1;
1501 snd_soc_dapm_sync(&card->dapm);
1501 mutex_unlock(&card->mutex); 1502 mutex_unlock(&card->mutex);
1502 return; 1503 return;
1503 1504
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 8711aab01445..e49c56d4951e 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1845,6 +1845,13 @@ static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm,
1845 */ 1845 */
1846int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm) 1846int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm)
1847{ 1847{
1848 /*
1849 * Suppress early reports (eg, jacks syncing their state) to avoid
1850 * silly DAPM runs during card startup.
1851 */
1852 if (!dapm->card || !dapm->card->instantiated)
1853 return 0;
1854
1848 return dapm_power_widgets(dapm, SND_SOC_DAPM_STREAM_NOP); 1855 return dapm_power_widgets(dapm, SND_SOC_DAPM_STREAM_NOP);
1849} 1856}
1850EXPORT_SYMBOL_GPL(snd_soc_dapm_sync); 1857EXPORT_SYMBOL_GPL(snd_soc_dapm_sync);