diff options
author | ScottPeterson <speterson@nvidia.com> | 2012-02-03 16:34:39 -0800 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-03-09 06:05:10 -0800 |
commit | 651aef2849ce18a0e005492c400d7200e92bbc73 (patch) | |
tree | 6fc929bbfaf01efaeb61c78fc7ff0176805abab7 | |
parent | fc4fdec65cdd3d9ccf1abdbd153f3475cfe99cb8 (diff) |
arm: tegra: hda: Improve resume time
Improve the resume time of the HD Audio driver by replacing selected
msleep() functions with mdelay(). msleep() return times are not
deterministic.
Signed-off-by: ScottPeterson <speterson@nvidia.com>
Reviewed-on: http://git-master/r/86896
(cherry picked from commit eccbe7983d1b010cc60b49bfb13d041b3a0957d3)
Change-Id: I261ba51e7f8414bca50076ae73473114a308645c
Reviewed-on: http://git-master/r/88090
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Tested-by: Scott Peterson <speterson@nvidia.com>
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 93f979db5a2e..6e171eef07ee 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -3276,7 +3276,7 @@ void snd_hda_codec_set_power_to_all(struct hda_codec *codec, hda_nid_t fg, AC_VERB_GET_POWER_STATE, 0); if (state == power_state) break; - msleep(1); + mdelay(1); } while (time_after_eq(end_time, jiffies)); } } diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 2407913c9555..b005f550c146 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -996,22 +996,22 @@ static int azx_reset(struct azx *chip, int full_reset) count = 50; while (azx_readb(chip, GCTL) && --count) - msleep(1); + mdelay(1); /* delay for >= 100us for codec PLL to settle per spec * Rev 0.9 section 5.5.1 */ - msleep(1); + mdelay(1); /* Bring controller out of reset */ azx_writeb(chip, GCTL, azx_readb(chip, GCTL) | ICH6_GCTL_RESET); count = 50; while (!azx_readb(chip, GCTL) && --count) - msleep(1); + mdelay(1); /* Brent Chartrand said to wait >= 540us for codecs to initialize */ - msleep(1); + mdelay(1); __skip: /* check to see if controller is ready */ |