aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-01-06 15:09:53 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-06 15:35:56 -0500
commit57a04513cb35086d54bcb2cb92e6627fc8fa0fae (patch)
treed2089bff9abdd2327e317cdfc90834d0bedf95f8 /sound
parent3fee37c1e2579ed3d6090f690e5fd8cf7fa3bb44 (diff)
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 <mingo@elte.hu> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_intel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 3fa0f9704909..62b9fb386903 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)
555 } 555 }
556 if (!chip->rirb.cmds) 556 if (!chip->rirb.cmds)
557 return chip->rirb.res; /* the last value */ 557 return chip->rirb.res; /* the last value */
558 schedule_timeout_uninterruptible(1); 558 udelay(10);
559 cond_resched();
559 } while (time_after_eq(timeout, jiffies)); 560 } while (time_after_eq(timeout, jiffies));
560 561
561 if (chip->msi) { 562 if (chip->msi) {