diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2017-01-12 07:09:41 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-01-12 12:20:59 -0500 |
commit | 4a312c9c825adf74c0026c98fed4ab59ce190863 (patch) | |
tree | 8163116fe25cb3a4b63a2d6938b5cc8583bccd46 | |
parent | 80317c2cb40085a3dcf80015bc39fbac40e2092a (diff) |
ASoC: rt5640: use msleep() for long delays
ulseep_range() uses hrtimers and provides no advantage over msleep()
for larger delays. Fix up the 70/80ms delays here passing the "min"
value to msleep(). This reduces the load on the hrtimer subsystem.
Link: http://lkml.org/lkml/2017/1/11/377
Fixes: commit 246693ba7b0b ("ASoC: rt5640: change widget sequence for depop")
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/rt5640.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index 0f1b2165e01c..33e080f80585 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c | |||
@@ -995,7 +995,7 @@ static int rt5640_hp_event(struct snd_soc_dapm_widget *w, | |||
995 | 995 | ||
996 | case SND_SOC_DAPM_PRE_PMD: | 996 | case SND_SOC_DAPM_PRE_PMD: |
997 | rt5640->hp_mute = 1; | 997 | rt5640->hp_mute = 1; |
998 | usleep_range(70000, 75000); | 998 | msleep(70); |
999 | break; | 999 | break; |
1000 | 1000 | ||
1001 | default: | 1001 | default: |
@@ -1059,7 +1059,7 @@ static int rt5640_hp_post_event(struct snd_soc_dapm_widget *w, | |||
1059 | switch (event) { | 1059 | switch (event) { |
1060 | case SND_SOC_DAPM_POST_PMU: | 1060 | case SND_SOC_DAPM_POST_PMU: |
1061 | if (!rt5640->hp_mute) | 1061 | if (!rt5640->hp_mute) |
1062 | usleep_range(80000, 85000); | 1062 | msleep(80); |
1063 | 1063 | ||
1064 | break; | 1064 | break; |
1065 | 1065 | ||