If a beep was enabled, turn it off 3 seconds after resume.
MFC after: 3 days
This commit is contained in:
parent
400e3077d8
commit
ad3d78ead0
@ -180,6 +180,13 @@ acpi_printcpu(void)
|
||||
bcopy(&(val), addr, sizeof(type)); \
|
||||
} while (0)
|
||||
|
||||
/* Turn off bits 1&2 of the PIT, stopping the beep. */
|
||||
static void
|
||||
acpi_stop_beep(void *arg)
|
||||
{
|
||||
outb(0x61, inb(0x61) & ~0x3);
|
||||
}
|
||||
|
||||
int
|
||||
acpi_sleep_machdep(struct acpi_softc *sc, int state)
|
||||
{
|
||||
@ -280,6 +287,10 @@ out:
|
||||
load_cr3(cr3);
|
||||
write_eflags(ef);
|
||||
|
||||
/* If we beeped, turn it off after a delay. */
|
||||
if (acpi_resume_beep)
|
||||
timeout(acpi_stop_beep, NULL, 3 * hz);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user