Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1655508

[PATCH 3.16 031/212] ASoC: rt5640: use msleep() for long delays

From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.kernel
Subject [PATCH 3.16 031/212] ASoC: rt5640: use msleep() for long delays
Date 2017-06-01 18:50 +0200
Message-ID <tNBsn-53m-63@gated-at.bofh.it> (permalink)
References <tNAwh-4oP-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.16.44-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Nicholas Mc Guire <hofrat@osadl.org>

commit 4a312c9c825adf74c0026c98fed4ab59ce190863 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 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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 sound/soc/codecs/rt5640.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -974,7 +974,7 @@ static int rt5640_hp_event(struct snd_so
 
 	case SND_SOC_DAPM_PRE_PMD:
 		rt5640->hp_mute = 1;
-		usleep_range(70000, 75000);
+		msleep(70);
 		break;
 
 	default:
@@ -1038,7 +1038,7 @@ static int rt5640_hp_post_event(struct s
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMU:
 		if (!rt5640->hp_mute)
-			usleep_range(80000, 85000);
+			msleep(80);
 
 		break;
 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3.16 000/212] 3.16.44-rc1 review Ben Hutchings <ben@decadent.org.uk> - 2017-06-01 18:50 +0200
  [PATCH 3.16 003/212] adm80211: return an error if adm8211_alloc_rings()  fails Ben Hutchings <ben@decadent.org.uk> - 2017-06-01 18:50 +0200
  [PATCH 3.16 006/212] MIPS: Clear ISA bit correctly in  get_frame_info() Ben Hutchings <ben@decadent.org.uk> - 2017-06-01 18:50 +0200
  [PATCH 3.16 023/212] Drivers: hv: vmbus: Raise retry/wait limits  in vmbus_post_msg() Ben Hutchings <ben@decadent.org.uk> - 2017-06-01 18:50 +0200
  [PATCH 3.16 008/212] MIPS: Fix get_frame_info() handling of  microMIPS function size Ben Hutchings <ben@decadent.org.uk> - 2017-06-01 18:50 +0200
  [PATCH 3.16 011/212] MIPS: Handle microMIPS jumps in the same way  as MIPS32/MIPS64 jumps Ben Hutchings <ben@decadent.org.uk> - 2017-06-01 18:50 +0200
  [PATCH 3.16 031/212] ASoC: rt5640: use msleep() for long delays Ben Hutchings <ben@decadent.org.uk> - 2017-06-01 18:50 +0200
  [PATCH 3.16 027/212] ext4: avoid deadlock when expanding inode size Ben Hutchings <ben@decadent.org.uk> - 2017-06-01 18:50 +0200
  [PATCH 3.16 004/212] iio: st_pressure: Fix data sign Ben Hutchings <ben@decadent.org.uk> - 2017-06-01 18:50 +0200
  [PATCH 3.16 001/212] mm/huge_memory.c: fix up "mm/huge_memory.c:  respect FOLL_FORCE/FOLL_COW for thp" backport Ben Hutchings <ben@decadent.org.uk> - 2017-06-01 18:50 +0200
  Re: [PATCH 3.16 000/212] 3.16.44-rc1 review Guenter Roeck <linux@roeck-us.net> - 2017-06-01 23:20 +0200

csiph-web