aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2011-11-07 11:33:25 -0500
committerTakashi Iwai <tiwai@suse.de>2011-11-08 01:51:21 -0500
commit5a9a51799b23142d2fc3ef94894d3b5ac00d05a5 (patch)
tree44cb622d21314688a2b107fddba720e2136fc523 /sound
parent1ea6b8f48918282bdca0b32a34095504ee65bab5 (diff)
ALSA: intel8x0: Improve comments for VM optimization
The recently merged 228cf79376f1 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: Denis V. Lunev <den@openvz.org> Signed-off-by: Konstantin Ozerkov <kozerkov@parallels.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/intel8x0.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 29e312597f20..c3b9bd0e188e 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -1077,6 +1077,13 @@ static snd_pcm_uframes_t snd_intel8x0_pcm_pointer(struct snd_pcm_substream *subs
1077 } 1077 }
1078 if (civ != igetbyte(chip, ichdev->reg_offset + ICH_REG_OFF_CIV)) 1078 if (civ != igetbyte(chip, ichdev->reg_offset + ICH_REG_OFF_CIV))
1079 continue; 1079 continue;
1080
1081 /* IO read operation is very expensive inside virtual machine
1082 * as it is emulated. The probability that subsequent PICB read
1083 * will return different result is high enough to loop till
1084 * timeout here.
1085 * Same CIV is strict enough condition to be sure that PICB
1086 * is valid inside VM on emulated card. */
1080 if (chip->inside_vm) 1087 if (chip->inside_vm)
1081 break; 1088 break;
1082 if (ptr1 == igetword(chip, ichdev->reg_offset + ichdev->roff_picb)) 1089 if (ptr1 == igetword(chip, ichdev->reg_offset + ichdev->roff_picb))