提交 5a9a5179 编写于 作者: D Denis V. Lunev 提交者: Takashi Iwai

ALSA: intel8x0: Improve comments for VM optimization

The recently merged 228cf793 looks a bit hackish while it is not.
The change was quite simple. In a virtualized environment the
patch unhacks old kludge introduced for old broken AC97 hardware.

This patch adds proper comment to "unkludge" code.
Signed-off-by: NDenis V. Lunev <den@openvz.org>
Signed-off-by: NKonstantin Ozerkov <kozerkov@parallels.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 1ea6b8f4
......@@ -1077,6 +1077,13 @@ static snd_pcm_uframes_t snd_intel8x0_pcm_pointer(struct snd_pcm_substream *subs
}
if (civ != igetbyte(chip, ichdev->reg_offset + ICH_REG_OFF_CIV))
continue;
/* IO read operation is very expensive inside virtual machine
* as it is emulated. The probability that subsequent PICB read
* will return different result is high enough to loop till
* timeout here.
* Same CIV is strict enough condition to be sure that PICB
* is valid inside VM on emulated card. */
if (chip->inside_vm)
break;
if (ptr1 == igetword(chip, ichdev->reg_offset + ichdev->roff_picb))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册