From 5f4a6d2f49e6b62d0c5a609635af59fa4139f390 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Wed, 21 Feb 2007 20:46:58 +0000 Subject: Fix stuttering audio playback as reported by Igor Grabin. Tested by several folks and ok canacar --- sys/dev/acpi/acpiec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/dev/acpi/acpiec.c') 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 * @@ -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, -- cgit v1.2.3