]> err.no Git - linux-2.6/commitdiff
[ALSA] snd hda suspend latency: shorten codec read
authorIngo Molnar <mingo@elte.hu>
Fri, 16 Nov 2007 14:20:28 +0000 (15:20 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 31 Jan 2008 16:29:26 +0000 (17:29 +0100)
not sleeping for every codec read/write but doing a short udelay and
a conditional reschedule has cut suspend+resume latency by about 1
second on my T60.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/pci/hda/hda_intel.c

index 38c5916491478959061379df6dec3268c8cc00d6..41edf85db38b1306ae09bbf167436bfc4cb8850e 100644 (file)
@@ -561,7 +561,8 @@ static unsigned int azx_rirb_get_response(struct hda_codec *codec)
                }
                if (!chip->rirb.cmds)
                        return chip->rirb.res; /* the last value */
-               schedule_timeout_uninterruptible(1);
+               udelay(10);
+               cond_resched();
        } while (time_after_eq(timeout, jiffies));
 
        if (chip->msi) {