Commit 9b1fffdd authored by Ingo Molnar's avatar Ingo Molnar Committed by Jaroslav Kysela
Browse files

[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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 27da1834
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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) {