arm: tegra: hda: Improve resume time
ScottPeterson [Sat, 4 Feb 2012 00:34:39 +0000 (16:34 -0800)]
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>

sound/pci/hda/hda_codec.c
sound/pci/hda/hda_intel.c

index 93f979d..6e171ee 100644 (file)
@@ -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));
        }
 }
index 2407913..b005f55 100644 (file)
@@ -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 */