From: Ingo Molnar Date: Sun, 6 Jan 2008 20:09:53 +0000 (+0100) Subject: hda_intel suspend latency: shorten codec read X-Git-Tag: v2.6.24-rc7~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=57a04513cb35086d54bcb2cb92e6627fc8fa0fae;p=linux-2.6-omap-h63xx.git 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=9332 Signed-off-by: Ingo Molnar Acked-by: Takashi Iwai Signed-off-by: Linus Torvalds --- diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 3fa0f970490..62b9fb38690 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -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) {