36 if ((This == NULL) || (Address == NULL)) {
37 return EFI_INVALID_PARAMETER;
58 OUT CONST CHAR16 **CodecName
67 if ((This == NULL) || (CodecName == NULL)) {
68 return EFI_INVALID_PARAMETER;
99 if ((This == NULL) || (VendorId == NULL)) {
100 return EFI_INVALID_PARAMETER;
122 OUT UINT32 *RevisionId
131 if ((This == NULL) || (RevisionId == NULL)) {
132 return EFI_INVALID_PARAMETER;
154 OUT UINT8 *AudioFuncId,
155 OUT BOOLEAN *UnsolCapable
164 if ((This == NULL) || (AudioFuncId == NULL) || (UnsolCapable == NULL)) {
165 return EFI_INVALID_PARAMETER;
199 if ((This == NULL) || (Rates == NULL) || (Formats == NULL)) {
200 return EFI_INVALID_PARAMETER;
224 OUT UINT32 *AmpInCaps,
225 OUT UINT32 *AmpOutCaps
234 if ((This == NULL) || (AmpInCaps == NULL) || (AmpOutCaps == NULL)) {
235 return EFI_INVALID_PARAMETER;
261 OUT UINTN *WidgetCount
271 UINTN HdaWidgetsCount;
274 if ((This == NULL) || (Widgets == NULL) || (WidgetCount == NULL)) {
275 return EFI_INVALID_PARAMETER;
281 HdaWidgets = AllocateZeroPool (
sizeof (
HDA_WIDGET) * HdaWidgetsCount);
282 if (HdaWidgets == NULL) {
283 return EFI_OUT_OF_RESOURCES;
287 for (UINTN w = 0; w < HdaWidgetsCount; w++) {
300 if (HdaWidgets[w].Connections == NULL) {
315 if (AmpInCount < 1) {
322 if ((HdaWidgets[w].AmpInLeftDefaultGainMute == NULL) ||
323 (HdaWidgets[w].AmpInRightDefaultGainMute == NULL))
330 HdaWidgets[w].AmpInLeftDefaultGainMute,
332 sizeof (UINT8) * AmpInCount
335 HdaWidgets[w].AmpInRightDefaultGainMute,
337 sizeof (UINT8) * AmpInCount
364 *WidgetCount = HdaWidgetsCount;
365 *Widgets = HdaWidgets;
370 return EFI_OUT_OF_RESOURCES;
392 if (Widgets == NULL) {
393 return EFI_INVALID_PARAMETER;
397 for (UINTN w = 0; w < WidgetCount; w++) {
398 if (Widgets[w].Connections != NULL) {
399 FreePool (Widgets[w].Connections);
402 if (Widgets[w].AmpInLeftDefaultGainMute != NULL) {
403 FreePool (Widgets[w].AmpInLeftDefaultGainMute);
406 if (Widgets[w].AmpInRightDefaultGainMute != NULL) {
407 FreePool (Widgets[w].AmpInRightDefaultGainMute);
#define HDA_CODEC_INFO_PRIVATE_DATA_FROM_THIS(This)
EFI_STATUS EFIAPI HdaCodecInfoGetCodecName(IN EFI_HDA_CODEC_INFO_PROTOCOL *This, OUT CONST CHAR16 **CodecName)
EFI_STATUS EFIAPI HdaCodecInfoGetWidgets(IN EFI_HDA_CODEC_INFO_PROTOCOL *This, OUT HDA_WIDGET **Widgets, OUT UINTN *WidgetCount)
EFI_STATUS EFIAPI HdaCodecInfoGetAudioFuncId(IN EFI_HDA_CODEC_INFO_PROTOCOL *This, OUT UINT8 *AudioFuncId, OUT BOOLEAN *UnsolCapable)
EFI_STATUS EFIAPI HdaCodecInfoGetRevisionId(IN EFI_HDA_CODEC_INFO_PROTOCOL *This, OUT UINT32 *RevisionId)
EFI_STATUS EFIAPI HdaCodecInfoFreeWidgetsBuffer(IN HDA_WIDGET *Widgets, IN UINTN WidgetCount)
EFI_STATUS EFIAPI HdaCodecInfoGetVendorId(IN EFI_HDA_CODEC_INFO_PROTOCOL *This, OUT UINT32 *VendorId)
EFI_STATUS EFIAPI HdaCodecInfoGetAddress(IN EFI_HDA_CODEC_INFO_PROTOCOL *This, OUT UINT8 *Address)
EFI_STATUS EFIAPI HdaCodecInfoGetDefaultRatesFormats(IN EFI_HDA_CODEC_INFO_PROTOCOL *This, OUT UINT32 *Rates, OUT UINT32 *Formats)
EFI_STATUS EFIAPI HdaCodecInfoGetDefaultAmpCaps(IN EFI_HDA_CODEC_INFO_PROTOCOL *This, OUT UINT32 *AmpInCaps, OUT UINT32 *AmpOutCaps)
#define HDA_PARAMETER_WIDGET_CAPS_IN_AMP
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
EFI_HDA_IO_PROTOCOL * HdaIo
HDA_FUNC_GROUP * AudioFuncGroup
HDA_CODEC_DEV * HdaCodecDev
UINT32 AmpOutCapabilities
UINT8 DefaultConvChannelCount
UINT8 * AmpInRightDefaultGainMute
UINT32 AmpOutCapabilities
UINT8 AmpOutLeftDefaultGainMute
UINT8 DefaultConvStreamChannel
UINT32 DefaultConfiguration
UINT8 AmpOutRightDefaultGainMute
UINT32 VolumeCapabilities
UINT8 * AmpInLeftDefaultGainMute
UINT32 SupportedPowerStates
EFI_HDA_IO_GET_ADDRESS GetAddress
UINT32 DefaultConfiguration
UINT8 DefaultConvChannelCount
UINT8 AmpOutRightDefaultGainMute
UINT32 SupportedPowerStates
UINT32 VolumeCapabilities
UINT8 * AmpInLeftDefaultGainMute
UINT8 DefaultConvStreamChannel
UINT8 AmpOutLeftDefaultGainMute
UINT8 * AmpInRightDefaultGainMute
UINT32 AmpOutCapabilities