#include <Uefi.h>
Go to the source code of this file.
|
| typedef struct EFI_AUDIO_IO_PROTOCOL_ | EFI_AUDIO_IO_PROTOCOL |
| |
| typedef VOID(EFIAPI * | EFI_AUDIO_IO_CALLBACK) (IN EFI_AUDIO_IO_PROTOCOL *AudioIo, IN VOID *Context) |
| |
| typedef EFI_STATUS(EFIAPI * | EFI_AUDIO_IO_GET_OUTPUTS) (IN EFI_AUDIO_IO_PROTOCOL *This, OUT EFI_AUDIO_IO_PROTOCOL_PORT **OutputPorts, OUT UINTN *OutputPortsCount) |
| |
| typedef EFI_STATUS(EFIAPI * | EFI_AUDIO_IO_RAW_GAIN_TO_DECIBELS) (IN EFI_AUDIO_IO_PROTOCOL *This, IN UINT64 OutputIndexMask, IN UINT8 GainParam, OUT INT8 *Gain) |
| |
| typedef EFI_STATUS(EFIAPI * | EFI_AUDIO_IO_SETUP_PLAYBACK) (IN EFI_AUDIO_IO_PROTOCOL *This, IN UINT64 OutputIndexMask, IN INT8 Gain, IN EFI_AUDIO_IO_PROTOCOL_FREQ Freq, IN EFI_AUDIO_IO_PROTOCOL_BITS Bits, IN UINT8 Channels, IN UINTN PlaybackDelay) |
| |
| typedef EFI_STATUS(EFIAPI * | EFI_AUDIO_IO_START_PLAYBACK) (IN EFI_AUDIO_IO_PROTOCOL *This, IN VOID *Data, IN UINTN DataLength, IN UINTN Position OPTIONAL) |
| |
| typedef EFI_STATUS(EFIAPI * | EFI_AUDIO_IO_START_PLAYBACK_ASYNC) (IN EFI_AUDIO_IO_PROTOCOL *This, IN VOID *Data, IN UINTN DataLength, IN UINTN Position OPTIONAL, IN EFI_AUDIO_IO_CALLBACK Callback OPTIONAL, IN VOID *Context OPTIONAL) |
| |
| typedef EFI_STATUS(EFIAPI * | EFI_AUDIO_IO_STOP_PLAYBACK) (IN EFI_AUDIO_IO_PROTOCOL *This) |
| |
|
| enum | EFI_AUDIO_IO_PROTOCOL_TYPE { EfiAudioIoTypeOutput
, EfiAudioIoTypeInput
, EfiAudioIoTypeMaximum
} |
| |
| enum | EFI_AUDIO_IO_PROTOCOL_DEVICE {
EfiAudioIoDeviceLine
, EfiAudioIoDeviceSpeaker
, EfiAudioIoDeviceHeadphones
, EfiAudioIoDeviceSpdif
,
EfiAudioIoDeviceMic
, EfiAudioIoDeviceHdmi
, EfiAudioIoDeviceOther
, EfiAudioIoDeviceMaximum
} |
| |
| enum | EFI_AUDIO_IO_PROTOCOL_LOCATION {
EfiAudioIoLocationNone
, EfiAudioIoLocationRear
, EfiAudioIoLocationFront
, EfiAudioIoLocationLeft
,
EfiAudioIoLocationRight
, EfiAudioIoLocationTop
, EfiAudioIoLocationBottom
, EfiAudioIoLocationOther
,
EfiAudioIoLocationMaximum
} |
| |
| enum | EFI_AUDIO_IO_PROTOCOL_SURFACE { EfiAudioIoSurfaceExternal
, EfiAudioIoSurfaceInternal
, EfiAudioIoSurfaceOther
, EfiAudioIoSurfaceMaximum
} |
| |
| enum | EFI_AUDIO_IO_PROTOCOL_BITS {
EfiAudioIoBits8 = BIT0
, EfiAudioIoBits16 = BIT1
, EfiAudioIoBits20 = BIT2
, EfiAudioIoBits24 = BIT3
,
EfiAudioIoBits32 = BIT4
} |
| |
| enum | EFI_AUDIO_IO_PROTOCOL_FREQ {
EfiAudioIoFreq8kHz = BIT0
, EfiAudioIoFreq11kHz = BIT1
, EfiAudioIoFreq16kHz = BIT2
, EfiAudioIoFreq22kHz = BIT3
,
EfiAudioIoFreq32kHz = BIT4
, EfiAudioIoFreq44kHz = BIT5
, EfiAudioIoFreq48kHz = BIT6
, EfiAudioIoFreq88kHz = BIT7
,
EfiAudioIoFreq96kHz = BIT8
, EfiAudioIoFreq192kHz = BIT9
} |
| |
◆ EFI_AUDIO_IO_PROTOCOL_GUID
| #define EFI_AUDIO_IO_PROTOCOL_GUID |
Value: { 0x22266891, 0x2032, 0x4BAE, \
{ 0xB7, 0xB5, 0x43, 0x74, 0xE7, 0x32, 0x09, 0x49 } }
Audio I/O protocol GUID. Protocol now versioned, so GUID updated from previous when non-versioned.
Definition at line 34 of file AudioIo.h.
◆ EFI_AUDIO_IO_PROTOCOL_MAX_CHANNELS
| #define EFI_AUDIO_IO_PROTOCOL_MAX_CHANNELS 16 |
Maximum number of channels.
Definition at line 132 of file AudioIo.h.
◆ EFI_AUDIO_IO_PROTOCOL_MAX_VOLUME
| #define EFI_AUDIO_IO_PROTOCOL_MAX_VOLUME 100 |
◆ EFI_AUDIO_IO_PROTOCOL_REVISION
| #define EFI_AUDIO_IO_PROTOCOL_REVISION 4 |
◆ EFI_AUDIO_IO_CALLBACK
Callback function.
Definition at line 139 of file AudioIo.h.
◆ EFI_AUDIO_IO_GET_OUTPUTS
Gets the collection of output ports.
- Parameters
-
| [in] | This | A pointer to the EFI_AUDIO_IO_PROTOCOL instance. |
| [out] | OutputPorts | A pointer to a buffer where the output ports will be placed. |
| [out] | OutputPortsCount | The number of ports in OutputPorts. |
- Return values
-
| EFI_SUCCESS | The audio data was played successfully. |
| EFI_INVALID_PARAMETER | One or more parameters are invalid. |
Definition at line 156 of file AudioIo.h.
◆ EFI_AUDIO_IO_PROTOCOL
◆ EFI_AUDIO_IO_RAW_GAIN_TO_DECIBELS
| typedef EFI_STATUS(EFIAPI * EFI_AUDIO_IO_RAW_GAIN_TO_DECIBELS) (IN EFI_AUDIO_IO_PROTOCOL *This, IN UINT64 OutputIndexMask, IN UINT8 GainParam, OUT INT8 *Gain) |
Convert raw amplifier gain setting to decibel gain value; converts using the parameters of the first channel specified in OutputIndexMask which has non-zero amp capabilities. Note: It seems very typical - though it is certainly not required by the spec - that all amps on a codec which have non-zero amp capabilities all have the same params as each other.
- Parameters
-
| [in] | This | A pointer to the EFI_AUDIO_IO_PROTOCOL instance. |
| [in] | OutputIndexMask | A mask indicating the desired outputs. |
| [in] | GainParam | The raw gain parameter for the amplifier. |
| [out] | Gain | The amplifier gain (or attentuation if negative) in dB to use, relative to 0 dB level (0 dB is usually at at or near max available volume, but is not required to be so in the spec). |
- Return values
-
| EFI_SUCCESS | The gain value was calculated successfully. |
| EFI_INVALID_PARAMETER | One or more parameters are invalid. |
Definition at line 179 of file AudioIo.h.
◆ EFI_AUDIO_IO_SETUP_PLAYBACK
Sets up the device to play audio data. Basic caching is implemented: no actions are taken the second and subsequent times that set up is called again with exactly the same paremeters.
- Parameters
-
| [in] | This | A pointer to the EFI_AUDIO_IO_PROTOCOL instance. |
| [in] | OutputIndexMask | A mask indicating the desired outputs. |
| [in] | Gain | The amplifier gain (or attentuation if negative) in dB to use, relative to 0 dB level (0 dB is usually at at or near max available volume, but is not required to be so in the spec). |
| [in] | Bits | The width in bits of the source data. |
| [in] | Freq | The frequency of the source data. |
| [in] | Channels | The number of channels the source data contains. |
| [in] | PlaybackDelay | The required delay before playback after a change in setup in milliseconds. |
- Return values
-
| EFI_SUCCESS | The audio data was played successfully. |
| EFI_INVALID_PARAMETER | One or more parameters are invalid. |
Definition at line 204 of file AudioIo.h.
◆ EFI_AUDIO_IO_START_PLAYBACK
| typedef EFI_STATUS(EFIAPI * EFI_AUDIO_IO_START_PLAYBACK) (IN EFI_AUDIO_IO_PROTOCOL *This, IN VOID *Data, IN UINTN DataLength, IN UINTN Position OPTIONAL) |
Begins playback on the device and waits for playback to complete.
- Parameters
-
| [in] | This | A pointer to the EFI_AUDIO_IO_PROTOCOL instance. |
| [in] | Data | A pointer to the buffer containing the audio data to play. |
| [in] | DataLength | The size, in bytes, of the data buffer specified by Data. |
| [in] | Position | The position in the buffer to start at. |
- Return values
-
| EFI_SUCCESS | The audio data was played successfully. |
| EFI_INVALID_PARAMETER | One or more parameters are invalid. |
Definition at line 227 of file AudioIo.h.
◆ EFI_AUDIO_IO_START_PLAYBACK_ASYNC
| typedef EFI_STATUS(EFIAPI * EFI_AUDIO_IO_START_PLAYBACK_ASYNC) (IN EFI_AUDIO_IO_PROTOCOL *This, IN VOID *Data, IN UINTN DataLength, IN UINTN Position OPTIONAL, IN EFI_AUDIO_IO_CALLBACK Callback OPTIONAL, IN VOID *Context OPTIONAL) |
Begins playback on the device asynchronously. The callback if specified will be executed with TPL_NOTIFY.
- Parameters
-
| [in] | This | A pointer to the EFI_AUDIO_IO_PROTOCOL instance. |
| [in] | Data | A pointer to the buffer containing the audio data to play. |
| [in] | DataLength | The size, in bytes, of the data buffer specified by Data. |
| [in] | Position | The position in the buffer to start at. |
| [in] | Callback | A pointer to an optional callback to be invoked when playback is complete. |
| [in] | Context | A pointer to data to be passed to the callback function. |
- Return values
-
| EFI_SUCCESS | The audio data was played successfully. |
| EFI_INVALID_PARAMETER | One or more parameters are invalid. |
Definition at line 250 of file AudioIo.h.
◆ EFI_AUDIO_IO_STOP_PLAYBACK
Stops playback on the device. Note, this will not call registered callbacks for stop audio.
- Parameters
-
| [in] | This | A pointer to the EFI_AUDIO_IO_PROTOCOL instance. |
- Return values
-
| EFI_SUCCESS | The audio data was played successfully. |
| EFI_INVALID_PARAMETER | One or more parameters are invalid. |
Definition at line 270 of file AudioIo.h.
◆ EFI_AUDIO_IO_PROTOCOL_BITS
Size in bits of each sample.
| Enumerator |
|---|
| EfiAudioIoBits8 | |
| EfiAudioIoBits16 | |
| EfiAudioIoBits20 | |
| EfiAudioIoBits24 | |
| EfiAudioIoBits32 | |
Definition at line 93 of file AudioIo.h.
◆ EFI_AUDIO_IO_PROTOCOL_DEVICE
Device type.
| Enumerator |
|---|
| EfiAudioIoDeviceLine | |
| EfiAudioIoDeviceSpeaker | |
| EfiAudioIoDeviceHeadphones | |
| EfiAudioIoDeviceSpdif | |
| EfiAudioIoDeviceMic | |
| EfiAudioIoDeviceHdmi | |
| EfiAudioIoDeviceOther | |
| EfiAudioIoDeviceMaximum | |
Definition at line 54 of file AudioIo.h.
◆ EFI_AUDIO_IO_PROTOCOL_FREQ
Frequency of each sample.
| Enumerator |
|---|
| EfiAudioIoFreq8kHz | |
| EfiAudioIoFreq11kHz | |
| EfiAudioIoFreq16kHz | |
| EfiAudioIoFreq22kHz | |
| EfiAudioIoFreq32kHz | |
| EfiAudioIoFreq44kHz | |
| EfiAudioIoFreq48kHz | |
| EfiAudioIoFreq88kHz | |
| EfiAudioIoFreq96kHz | |
| EfiAudioIoFreq192kHz | |
Definition at line 104 of file AudioIo.h.
◆ EFI_AUDIO_IO_PROTOCOL_LOCATION
Port location.
| Enumerator |
|---|
| EfiAudioIoLocationNone | |
| EfiAudioIoLocationRear | |
| EfiAudioIoLocationFront | |
| EfiAudioIoLocationLeft | |
| EfiAudioIoLocationRight | |
| EfiAudioIoLocationTop | |
| EfiAudioIoLocationBottom | |
| EfiAudioIoLocationOther | |
| EfiAudioIoLocationMaximum | |
Definition at line 68 of file AudioIo.h.
◆ EFI_AUDIO_IO_PROTOCOL_SURFACE
Port surface.
| Enumerator |
|---|
| EfiAudioIoSurfaceExternal | |
| EfiAudioIoSurfaceInternal | |
| EfiAudioIoSurfaceOther | |
| EfiAudioIoSurfaceMaximum | |
Definition at line 83 of file AudioIo.h.
◆ EFI_AUDIO_IO_PROTOCOL_TYPE
Port type.
| Enumerator |
|---|
| EfiAudioIoTypeOutput | |
| EfiAudioIoTypeInput | |
| EfiAudioIoTypeMaximum | |
Definition at line 45 of file AudioIo.h.
◆ gEfiAudioIoProtocolGuid
| EFI_GUID gEfiAudioIoProtocolGuid |
|
extern |