浏览代码

[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 <mingo@elte.hu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Ingo Molnar 17 年之前
父节点
当前提交
9b1fffddc8
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      sound/pci/hda/hda_intel.c

+ 2 - 1
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)
 		if (!chip->rirb.cmds)
 			return chip->rirb.res; /* the last value */
 			return chip->rirb.res; /* the last value */
-		schedule_timeout_uninterruptible(1);
+		udelay(10);
+		cond_resched();
 	} while (time_after_eq(timeout, jiffies));
 	} while (time_after_eq(timeout, jiffies));
 
 
 	if (chip->msi) {
 	if (chip->msi) {