Commit 47a6229f authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Ben Hutchings

ASoC: rt5640: use msleep() for long delays

commit 4a312c9c upstream.

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 246693ba ("ASoC: rt5640: change widget sequence for depop")
Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent c124df9e
...@@ -974,7 +974,7 @@ static int rt5640_hp_event(struct snd_soc_dapm_widget *w, ...@@ -974,7 +974,7 @@ static int rt5640_hp_event(struct snd_soc_dapm_widget *w,
case SND_SOC_DAPM_PRE_PMD: case SND_SOC_DAPM_PRE_PMD:
rt5640->hp_mute = 1; rt5640->hp_mute = 1;
usleep_range(70000, 75000); msleep(70);
break; break;
default: default:
...@@ -1038,7 +1038,7 @@ static int rt5640_hp_post_event(struct snd_soc_dapm_widget *w, ...@@ -1038,7 +1038,7 @@ static int rt5640_hp_post_event(struct snd_soc_dapm_widget *w,
switch (event) { switch (event) {
case SND_SOC_DAPM_POST_PMU: case SND_SOC_DAPM_POST_PMU:
if (!rt5640->hp_mute) if (!rt5640->hp_mute)
usleep_range(80000, 85000); msleep(80);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment