* [PATCH] ASoC: dont call dapm_sync while reporting jack always
@ 2013-10-21 13:32 Vinod Koul
0 siblings, 0 replies; only message in thread
From: Vinod Koul @ 2013-10-21 13:32 UTC (permalink / raw)
To: alsa-devel; +Cc: Vinod Koul, broonie, lgirdwood
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
Change-Id: I671cd444d1b6610dcb83b28f7339477556373e5c
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
sound/soc/soc-jack.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index c9f7953..9fd4ed8 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)
struct snd_soc_codec *codec;
struct snd_soc_dapm_context *dapm;
struct snd_soc_jack_pin *pin;
+ unsigned int sync = 0;
int enable;
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)
snd_soc_dapm_enable_pin(dapm, pin->pin);
else
snd_soc_dapm_disable_pin(dapm, pin->pin);
+
+ /* we need to sync for this case only */
+ sync = 1;
}
/* Report before the DAPM sync to help users updating micbias status */
blocking_notifier_call_chain(&jack->notifier, jack->status, jack);
- snd_soc_dapm_sync(dapm);
+ if (sync)
+ snd_soc_dapm_sync(dapm);
snd_jack_report(jack->jack, jack->status);
--
1.7.0.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-21 14:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-21 13:32 [PATCH] ASoC: dont call dapm_sync while reporting jack always Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).