diff options
author | Dylan Reid <dgreid@chromium.org> | 2011-12-16 10:37:05 -0800 |
---|---|---|
committer | Dylan Reid <dgreid@chromium.org> | 2011-12-16 14:40:59 -0800 |
commit | c4db02fb9289235a0875c6226fe7fd3dd18adf55 (patch) | |
tree | 0af48f2dfa01a1ad47518be0443ef4550b24a045 /lib/vbexport | |
parent | 95711296fae612c0334c889dc6f3183139d7344b (diff) |
Add beep for x86 chormeos.
Implement the VbExBeep function so that the DEV screen can beep.
Much of this code was coppied from coreboot.
BUG=chrome-os-partner:7114
TEST=manual, check that Stumpy beeps on DEV screen timeout and when
booting from USB with dev_boot_usb=0.
Change-Id: Icd4eabb0b10cc3d226db71e6a2b52d3ed7eb25ef
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13110
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Diffstat (limited to 'lib/vbexport')
-rw-r--r-- | lib/vbexport/utility.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/vbexport/utility.c b/lib/vbexport/utility.c index 6bc53caed1c..90a94be76b1 100644 --- a/lib/vbexport/utility.c +++ b/lib/vbexport/utility.c @@ -16,6 +16,7 @@ #include <common.h> #include <malloc.h> #include <chromeos/common.h> +#include <chromeos/hda_codec.h> #include <chromeos/power_management.h> /* Import the definition of vboot_wrapper interfaces. */ @@ -89,10 +90,17 @@ void VbExSleepMs(uint32_t msec) VbError_t VbExBeep(uint32_t msec, uint32_t frequency) { - /* TODO Implement it later. */ - VbExSleepMs(msec); - VBDEBUG("Beep!\n"); - return VBERROR_NO_SOUND; + if (frequency) + enable_beep(); + else + disable_beep(); + + if (msec > 0) { + VbExSleepMs(msec); + disable_beep(); + } + + return VBERROR_SUCCESS; } int Memcmp(const void *src1, const void *src2, size_t n) |