From: Ingo Molnar Date: Fri, 16 Nov 2007 14:20:28 +0000 (+0100) Subject: [ALSA] snd hda suspend latency: shorten codec read X-Git-Tag: firefly_0821_release~23620^2~237 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9b1fffddc80949fb4aa93fdcc57544bc2108ced3;p=firefly-linux-kernel-4.4.55.git [ALSA] snd hda 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. Signed-off-by: Ingo Molnar Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 38c591649147..41edf85db38b 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -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) {