Skip to content

Commit

Permalink
hda_intel suspend latency: shorten codec read
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Takashi Iwai <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Jan 6, 2008
1 parent 3fee37c commit 57a0451
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 57a0451

Please sign in to comment.