Commit 57a04513 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

hda_intel suspend latency: shorten codec read

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.

The patch also fixes the unexpected codec-connection errors that
happen more often in the new power-save mode:
    http://lkml.org/lkml/2007/11/8/255
    http://bugzilla.kernel.org/show_bug.cgi?id=9332Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Acked-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3fee37c1
......@@ -555,7 +555,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) {
......
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