Skip to content

Commit

Permalink
ASoC: jack: Always update jack state even for noop changes
Browse files Browse the repository at this point in the history
Now that DAPM is very cheap for most updates we've no need to avoid trying
to run it so always notify even if we don't think there are any changes.
This avoids potential issues with bootstrapping state like the pin state
or other notifiers when there's nothing in the jack.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
  • Loading branch information
broonie committed Aug 3, 2012
1 parent 5ef75e7 commit acaf24f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions sound/soc/soc-jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
jack->status &= ~mask;
jack->status |= status & mask;

/* The DAPM sync is expensive enough to be worth skipping.
* However, empty mask means pin synchronization is desired. */
if (mask && (jack->status == oldstatus))
goto out;

trace_snd_soc_jack_notify(jack, status);

list_for_each_entry(pin, &jack->pins, list) {
Expand All @@ -109,7 +104,6 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)

snd_jack_report(jack->jack, jack->status);

out:
mutex_unlock(&jack->mutex);
}
EXPORT_SYMBOL_GPL(snd_soc_jack_report);
Expand Down

0 comments on commit acaf24f

Please sign in to comment.