LegacySpeaker.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*++
  2. Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. Module Name:
  5. LegacySpeaker.h
  6. Abstract:
  7. Speaker enabling related data
  8. --*/
  9. #ifndef _DXE_LEGACY_SPEAKER_H
  10. #define _DXE_LEGACY_SPEAKER_H
  11. #include "PlatformDxe.h"
  12. //
  13. // Speaker Related Port Information
  14. //
  15. #define EFI_TIMER_COUNTER_PORT 0x40
  16. #define EFI_TIMER_CONTROL_PORT 0x43
  17. #define EFI_TIMER_2_PORT 0x42
  18. #define EFI_SPEAKER_CONTROL_PORT 0x61
  19. #define EFI_SPEAKER_OFF_MASK 0xFC
  20. #define EFI_DEFAULT_BEEP_FREQUENCY 0x500
  21. //
  22. // Default Intervals/Beep Duration
  23. //
  24. #define EFI_DEFAULT_LONG_BEEP_DURATION 0x70000
  25. #define EFI_DEFAULT_SHORT_BEEP_DURATION 0x50000
  26. #define EFI_DEFAULT_BEEP_TIME_INTERVAL 0x20000
  27. EFI_STATUS
  28. EFIAPI
  29. ProgramToneFrequency (
  30. IN EFI_SPEAKER_IF_PROTOCOL * This,
  31. IN UINT16 Frequency
  32. );
  33. EFI_STATUS
  34. EFIAPI
  35. GenerateBeepTone (
  36. IN EFI_SPEAKER_IF_PROTOCOL * This,
  37. IN UINTN NumberOfBeeps,
  38. IN UINTN BeepDuration,
  39. IN UINTN TimeInterval
  40. );
  41. EFI_STATUS
  42. TurnOnSpeaker (
  43. );
  44. EFI_STATUS
  45. TurnOffSpeaker (
  46. );
  47. #endif