OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcAudio.c File Reference
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcAudioLib.h>
#include <Library/OcDevicePathLib.h>
#include <Library/OcMiscLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/AppleHda.h>
#include <Protocol/AppleBeepGen.h>
#include <Protocol/AppleVoiceOver.h>
#include <Protocol/HdaIo.h>
#include "OcAudioInternal.h"

Go to the source code of this file.

Functions

STATIC EFI_DEVICE_PATH_PROTOCOL * OcAudioGetCodecDevicePath (IN EFI_DEVICE_PATH_PROTOCOL *ControllerDevicePath, IN UINT8 CodecAddress)
 
STATIC EFI_STATUS AudioIoProtocolConfirmRevision (IN CONST EFI_AUDIO_IO_PROTOCOL *AudioIo)
 
STATIC EFI_STATUS InternalMatchCodecDevicePath (IN OUT OC_AUDIO_PROTOCOL_PRIVATE *Private, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN EFI_HANDLE *AudioIoHandles, IN UINTN AudioIoHandleCount)
 
EFI_STATUS EFIAPI InternalOcAudioSetDefaultGain (IN OUT OC_AUDIO_PROTOCOL *This, IN INT8 Gain)
 
EFI_STATUS EFIAPI InternalOcAudioConnect (IN OUT OC_AUDIO_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN UINT8 CodecAddress OPTIONAL, IN UINT64 OutputIndexMask)
 
EFI_STATUS EFIAPI InternalOcAudioSetProvider (IN OUT OC_AUDIO_PROTOCOL *This, IN OC_AUDIO_PROVIDER_ACQUIRE Acquire, IN OC_AUDIO_PROVIDER_RELEASE Release OPTIONAL, IN VOID *Context)
 
STATIC VOID EFIAPI InernalOcAudioPlayFileDone (IN EFI_AUDIO_IO_PROTOCOL *AudioIo, IN VOID *Context)
 
EFI_STATUS EFIAPI InternalOcAudioRawGainToDecibels (IN OUT OC_AUDIO_PROTOCOL *This, IN UINT8 GainParam, OUT INT8 *Gain)
 
EFI_STATUS EFIAPI InternalOcAudioPlayFile (IN OUT OC_AUDIO_PROTOCOL *This, IN CONST CHAR8 *BasePath, IN CONST CHAR8 *BaseType, IN BOOLEAN Localised, IN INT8 Gain OPTIONAL, IN BOOLEAN UseGain, IN BOOLEAN Wait)
 
EFI_STATUS EFIAPI InternalOcAudioStopPlayback (IN OUT OC_AUDIO_PROTOCOL *This, IN BOOLEAN Wait)
 
UINTN EFIAPI InternalOcAudioSetDelay (IN OUT OC_AUDIO_PROTOCOL *This, IN UINTN Delay)
 

Detailed Description

Copyright (C) 2020, vit9696. All rights reserved.

All rights reserved.

This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file OcAudio.c.

Function Documentation

◆ AudioIoProtocolConfirmRevision()

STATIC EFI_STATUS AudioIoProtocolConfirmRevision ( IN CONST EFI_AUDIO_IO_PROTOCOL * AudioIo)

Definition at line 54 of file OcAudio.c.

◆ InernalOcAudioPlayFileDone()

STATIC VOID EFIAPI InernalOcAudioPlayFileDone ( IN EFI_AUDIO_IO_PROTOCOL * AudioIo,
IN VOID * Context )

Definition at line 294 of file OcAudio.c.

◆ InternalMatchCodecDevicePath()

STATIC EFI_STATUS InternalMatchCodecDevicePath ( IN OUT OC_AUDIO_PROTOCOL_PRIVATE * Private,
IN EFI_DEVICE_PATH_PROTOCOL * DevicePath,
IN EFI_HANDLE * AudioIoHandles,
IN UINTN AudioIoHandleCount )

Definition at line 74 of file OcAudio.c.

◆ InternalOcAudioConnect()

EFI_STATUS EFIAPI InternalOcAudioConnect ( IN OUT OC_AUDIO_PROTOCOL * This,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL,
IN UINT8 CodecAddress OPTIONAL,
IN UINT64 OutputIndexMask )

Definition at line 186 of file OcAudio.c.

◆ InternalOcAudioPlayFile()

EFI_STATUS EFIAPI InternalOcAudioPlayFile ( IN OUT OC_AUDIO_PROTOCOL * This,
IN CONST CHAR8 * BasePath,
IN CONST CHAR8 * BaseType,
IN BOOLEAN Localised,
IN INT8 Gain OPTIONAL,
IN BOOLEAN UseGain,
IN BOOLEAN Wait )

Definition at line 354 of file OcAudio.c.

◆ InternalOcAudioRawGainToDecibels()

EFI_STATUS EFIAPI InternalOcAudioRawGainToDecibels ( IN OUT OC_AUDIO_PROTOCOL * This,
IN UINT8 GainParam,
OUT INT8 * Gain )

Definition at line 322 of file OcAudio.c.

◆ InternalOcAudioSetDefaultGain()

EFI_STATUS EFIAPI InternalOcAudioSetDefaultGain ( IN OUT OC_AUDIO_PROTOCOL * This,
IN INT8 Gain )

Definition at line 170 of file OcAudio.c.

◆ InternalOcAudioSetDelay()

UINTN EFIAPI InternalOcAudioSetDelay ( IN OUT OC_AUDIO_PROTOCOL * This,
IN UINTN Delay )

Definition at line 554 of file OcAudio.c.

◆ InternalOcAudioSetProvider()

EFI_STATUS EFIAPI InternalOcAudioSetProvider ( IN OUT OC_AUDIO_PROTOCOL * This,
IN OC_AUDIO_PROVIDER_ACQUIRE Acquire,
IN OC_AUDIO_PROVIDER_RELEASE Release OPTIONAL,
IN VOID * Context )

Definition at line 269 of file OcAudio.c.

◆ InternalOcAudioStopPlayback()

EFI_STATUS EFIAPI InternalOcAudioStopPlayback ( IN OUT OC_AUDIO_PROTOCOL * This,
IN BOOLEAN Wait )

Definition at line 464 of file OcAudio.c.

◆ OcAudioGetCodecDevicePath()

STATIC EFI_DEVICE_PATH_PROTOCOL * OcAudioGetCodecDevicePath ( IN EFI_DEVICE_PATH_PROTOCOL * ControllerDevicePath,
IN UINT8 CodecAddress )

Definition at line 33 of file OcAudio.c.