summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpiec.c
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2007-02-21 20:46:58 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2007-02-21 20:46:58 +0000
commit5f4a6d2f49e6b62d0c5a609635af59fa4139f390 (patch)
tree944b4443b6177265fd0f559f7fefa8ca2b8a5f7c /sys/dev/acpi/acpiec.c
parentf36735fd65b4132226f77e1b7baddc4e9c0dbeec (diff)
Fix stuttering audio playback as reported by Igor Grabin.
Tested by several folks and ok canacar
Diffstat (limited to 'sys/dev/acpi/acpiec.c')
-rw-r--r--sys/dev/acpi/acpiec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpiec.c b/sys/dev/acpi/acpiec.c
index 5870f93cac2..c5cc1e7d4a6 100644
--- a/sys/dev/acpi/acpiec.c
+++ b/sys/dev/acpi/acpiec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpiec.c,v 1.17 2007/02/21 04:12:47 marco Exp $ */
+/* $OpenBSD: acpiec.c,v 1.18 2007/02/21 20:46:57 marco Exp $ */
/*
* Copyright (c) 2006 Can Erkin Acar <canacar@openbsd.org>
*
@@ -126,7 +126,10 @@ acpiec_wait(struct acpiec_softc *sc, u_int8_t mask, u_int8_t val)
while (((stat = acpiec_status(sc)) & mask) != val) {
if (stat & EC_STAT_SCI_EVT)
sc->sc_gotsci = 1;
- delay(1);
+ if (cold)
+ delay(1);
+ else
+ tsleep(sc, PWAIT, "ecwait", 1);
}
dnprintf(40, "%s: EC wait_ns, stat: %b\n", DEVNAME(sc), (int)stat,