aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2013-10-21 09:37:34 -0400
committerMark Brown <broonie@linaro.org>2013-10-22 04:29:02 -0400
commit30a765d6433413c0eba90c969eecf12dfa2d111a (patch)
tree63c8ad1b2420212668552790f39700ef168474a0
parent1dd275b60e5db4d0bb3763490b519176dcfc4308 (diff)
ASoC: dont call dapm_sync while reporting jack always
While reporting the jack status snd_soc_jack_report() invokes snd_soc_dapm_sync() always. This should be required when we have pins associated with jack and reporting enables or disables these. So add a check for this case Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/soc-jack.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 71358e3b54d9..23d43dac91da 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -65,6 +65,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
65 struct snd_soc_codec *codec; 65 struct snd_soc_codec *codec;
66 struct snd_soc_dapm_context *dapm; 66 struct snd_soc_dapm_context *dapm;
67 struct snd_soc_jack_pin *pin; 67 struct snd_soc_jack_pin *pin;
68 unsigned int sync = 0;
68 int enable; 69 int enable;
69 70
70 trace_snd_soc_jack_report(jack, mask, status); 71 trace_snd_soc_jack_report(jack, mask, status);
@@ -92,12 +93,16 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
92 snd_soc_dapm_enable_pin(dapm, pin->pin); 93 snd_soc_dapm_enable_pin(dapm, pin->pin);
93 else 94 else
94 snd_soc_dapm_disable_pin(dapm, pin->pin); 95 snd_soc_dapm_disable_pin(dapm, pin->pin);
96
97 /* we need to sync for this case only */
98 sync = 1;
95 } 99 }
96 100
97 /* Report before the DAPM sync to help users updating micbias status */ 101 /* Report before the DAPM sync to help users updating micbias status */
98 blocking_notifier_call_chain(&jack->notifier, jack->status, jack); 102 blocking_notifier_call_chain(&jack->notifier, jack->status, jack);
99 103
100 snd_soc_dapm_sync(dapm); 104 if (sync)
105 snd_soc_dapm_sync(dapm);
101 106
102 snd_jack_report(jack->jack, jack->status); 107 snd_jack_report(jack->jack, jack->status);
103 108