From: Mark Brown Date: Thu, 6 Oct 2011 12:30:55 +0000 (+0100) Subject: ASoC: Ensure DAPM widgets are set up before we sync jacks X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=143d62a45b5f976067a8d705f7fae26a402651f9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ASoC: Ensure DAPM widgets are set up before we sync jacks We synchronise jack state on startup - when we do that make sure that we have set up all the DAPM widgets first in case we end up touching any of the partially set up widgets when syncing the jack pins. Signed-off-by: Mark Brown Tested-by: Peter Ujfalusi --- diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index fa31d9c2abd8..52db96636290 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -188,6 +188,8 @@ int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count, list_add(&(pins[i].list), &jack->pins); } + snd_soc_dapm_new_widgets(&jack->codec->card->dapm); + /* Update to reflect the last reported status; canned jack * implementations are likely to set their state before the * card has an opportunity to associate pins.