Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
e2275533
O
OpenCorePKG_MOD
项目概览
btwise
/
OpenCorePKG_MOD
通知
26
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OpenCorePKG_MOD
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e2275533
编写于
1月 23, 2021
作者:
G
Goldfish64
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Application: Remove HdaCodecDump
上级
462f5e58
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
1 addition
and
659 deletion
+1
-659
Application/HdaCodecDump/HdaCodecDump.c
Application/HdaCodecDump/HdaCodecDump.c
+0
-575
Application/HdaCodecDump/HdaCodecDump.h
Application/HdaCodecDump/HdaCodecDump.h
+0
-38
Application/HdaCodecDump/HdaCodecDump.inf
Application/HdaCodecDump/HdaCodecDump.inf
+0
-42
Changelog.md
Changelog.md
+1
-0
Docs/Configuration.tex
Docs/Configuration.tex
+0
-2
OpenCorePkg.dsc
OpenCorePkg.dsc
+0
-1
build_oc.tool
build_oc.tool
+0
-1
未找到文件。
Application/HdaCodecDump/HdaCodecDump.c
已删除
100755 → 0
浏览文件 @
462f5e58
/*
* File: HdaCodecDump.c
*
* Copyright (c) 2018 John Davis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include "HdaCodecDump.h"
STATIC
CONST
CHAR16
*
mWidgetNames
[
HDA_WIDGET_TYPE_VENDOR
+
1
]
=
{
L"Audio Output"
,
L"Audio Input"
,
L"Audio Mixer"
,
L"Audio Selector"
,
L"Pin Complex"
,
L"Power Widget"
,
L"Volume Knob Widget"
,
L"Beep Generator Widget"
,
L"Reserved"
,
L"Reserved"
,
L"Reserved"
,
L"Reserved"
,
L"Reserved"
,
L"Reserved"
,
L"Reserved"
,
L"Vendor Defined Widget"
};
STATIC
CONST
CHAR16
*
mPortConnectivities
[
4
]
=
{
L"Jack"
,
L"None"
,
L"Fixed"
,
L"Int Jack"
};
STATIC
CONST
CHAR16
*
mDefaultDevices
[
HDA_CONFIG_DEFAULT_DEVICE_OTHER
+
1
]
=
{
L"Line Out"
,
L"Speaker"
,
L"HP Out"
,
L"CD"
,
L"SPDIF Out"
,
L"Digital Out"
,
L"Modem Line"
,
L"Modem Handset"
,
L"Line In"
,
L"Aux"
,
L"Mic"
,
L"Telephone"
,
L"SPDIF In"
,
L"Digital In"
,
L"Reserved"
,
L"Other"
};
STATIC
CONST
CHAR16
*
mSurfaces
[
4
]
=
{
L"Ext"
,
L"Int"
,
L"Ext"
,
L"Other"
};
STATIC
CONST
CHAR16
*
mLocations
[
16
]
=
{
L"N/A"
,
L"Rear"
,
L"Front"
,
L"Left"
,
L"Right"
,
L"Top"
,
L"Bottom"
,
L"Special"
,
L"Special"
,
L"Special"
,
L"Reserved"
,
L"Reserved"
,
L"Reserved"
,
L"Reserved"
};
STATIC
CONST
CHAR16
*
mConnTypes
[
HDA_CONFIG_DEFAULT_CONN_OTHER
+
1
]
=
{
L"Unknown"
,
L"1/8"
,
L"1/4"
,
L"ATAPI"
,
L"RCA"
,
L"Optical"
,
L"Digital"
,
L"Analog"
,
L"Multi"
,
L"XLR"
,
L"RJ11"
,
L"Combo"
,
L"Other"
,
L"Other"
,
L"Other"
,
L"Other"
};
STATIC
CONST
CHAR16
*
mColors
[
HDA_CONFIG_DEFAULT_COLOR_OTHER
+
1
]
=
{
L"Unknown"
,
L"Black"
,
L"Grey"
,
L"Blue"
,
L"Green"
,
L"Red"
,
L"Orange"
,
L"Yellow"
,
L"Purple"
,
L"Pink"
,
L"Reserved"
,
L"Reserved"
,
L"Reserved"
,
L"Reserved"
,
L"White"
,
L"Other"
};
STATIC
VOID
HdaCodecDumpPrintRatesFormats
(
IN
UINT32
Rates
,
IN
UINT32
Formats
)
{
//
// Print sample rates.
//
Print
(
L" rates [0x%X]:"
,
(
UINT16
)
Rates
);
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_8KHZ
)
!=
0
)
{
Print
(
L" 8000"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_11KHZ
)
!=
0
)
{
Print
(
L" 11025"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_16KHZ
)
!=
0
)
{
Print
(
L" 16000"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_22KHZ
)
!=
0
)
{
Print
(
L" 22050"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_32KHZ
)
!=
0
)
{
Print
(
L" 32000"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_44KHZ
)
!=
0
)
{
Print
(
L" 44100"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_48KHZ
)
!=
0
)
{
Print
(
L" 48000"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_88KHZ
)
!=
0
)
{
Print
(
L" 88200"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_96KHZ
)
!=
0
)
{
Print
(
L" 96000"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_176KHZ
)
!=
0
)
{
Print
(
L" 176400"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_192KHZ
)
!=
0
)
{
Print
(
L" 192000"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_384KHZ
)
!=
0
)
{
Print
(
L" 384000"
);
}
Print
(
L"
\n
"
);
//
// Print bits.
//
Print
(
L" bits [0x%X]:"
,
(
UINT16
)
(
Rates
>>
16U
));
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_8BIT
)
!=
0
)
{
Print
(
L" 8"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_16BIT
)
!=
0
)
{
Print
(
L" 16"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_20BIT
)
!=
0
)
{
Print
(
L" 20"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_24BIT
)
!=
0
)
{
Print
(
L" 24"
);
}
if
((
Rates
&
HDA_PARAMETER_SUPPORTED_PCM_SIZE_RATES_32BIT
)
!=
0
)
{
Print
(
L" 32"
);
}
Print
(
L"
\n
"
);
//
// Print formats.
//
Print
(
L" formats [0x%X]:"
,
Formats
);
if
((
Formats
&
HDA_PARAMETER_SUPPORTED_STREAM_FORMATS_PCM
)
!=
0
)
{
Print
(
L" PCM"
);
}
if
((
Formats
&
HDA_PARAMETER_SUPPORTED_STREAM_FORMATS_FLOAT32
)
!=
0
)
{
Print
(
L" FLOAT32"
);
}
if
((
Formats
&
HDA_PARAMETER_SUPPORTED_STREAM_FORMATS_AC3
)
!=
0
)
{
Print
(
L" AC3"
);
}
Print
(
L"
\n
"
);
}
STATIC
VOID
HdaCodecDumpPrintAmpCaps
(
IN
UINT32
AmpCaps
)
{
if
(
AmpCaps
)
{
Print
(
L"ofs=0x%2X, nsteps=0x%2X, stepsize=0x%2X, mute=%u
\n
"
,
HDA_PARAMETER_AMP_CAPS_OFFSET
(
AmpCaps
),
HDA_PARAMETER_AMP_CAPS_NUM_STEPS
(
AmpCaps
),
HDA_PARAMETER_AMP_CAPS_STEP_SIZE
(
AmpCaps
),
(
AmpCaps
&
HDA_PARAMETER_AMP_CAPS_MUTE
)
!=
0
);
}
else
{
Print
(
L"N/A
\n
"
);
}
}
STATIC
VOID
HdaCodecDumpPrintWidgets
(
IN
HDA_WIDGET
*
Widgets
,
IN
UINTN
WidgetCount
)
{
UINTN
Index
;
UINTN
Index2
;
for
(
Index
=
0
;
Index
<
WidgetCount
;
++
Index
)
{
//
// Print each widget.
//
//
// Print header and capabilities.
//
Print
(
L"Node %2u [%s] wcaps 0x%X:"
,
Widgets
[
Index
].
NodeId
,
mWidgetNames
[
HDA_PARAMETER_WIDGET_CAPS_TYPE
(
Widgets
[
Index
].
Capabilities
)],
Widgets
[
Index
].
Capabilities
);
if
((
Widgets
[
Index
].
Capabilities
&
HDA_PARAMETER_WIDGET_CAPS_STEREO
)
!=
0
)
{
Print
(
L" Stereo"
);
}
else
{
Print
(
L" Mono"
);
}
if
((
Widgets
[
Index
].
Capabilities
&
HDA_PARAMETER_WIDGET_CAPS_DIGITAL
)
!=
0
)
{
Print
(
L" Digital"
);
}
if
((
Widgets
[
Index
].
Capabilities
&
HDA_PARAMETER_WIDGET_CAPS_IN_AMP
)
!=
0
)
{
Print
(
L" Amp-In"
);
}
if
((
Widgets
[
Index
].
Capabilities
&
HDA_PARAMETER_WIDGET_CAPS_OUT_AMP
)
!=
0
)
{
Print
(
L" Amp-Out"
);
}
if
((
Widgets
[
Index
].
Capabilities
&
HDA_PARAMETER_WIDGET_CAPS_L_R_SWAP
)
!=
0
)
{
Print
(
L" R/L"
);
}
Print
(
L"
\n
"
);
//
// Print input amp info.
//
if
((
Widgets
[
Index
].
Capabilities
&
HDA_PARAMETER_WIDGET_CAPS_IN_AMP
)
!=
0
)
{
//
// Print caps.
//
Print
(
L" Amp-in caps: "
);
HdaCodecDumpPrintAmpCaps
(
Widgets
[
Index
].
AmpInCapabilities
);
//
// Print default values.
//
Print
(
L" Amp-In vals:"
);
for
(
Index2
=
0
;
Index2
<
HDA_PARAMETER_CONN_LIST_LENGTH_LEN
(
Widgets
[
Index
].
ConnectionListLength
);
++
Index2
)
{
if
((
Widgets
[
Index
].
Capabilities
&
HDA_PARAMETER_WIDGET_CAPS_STEREO
)
!=
0
)
{
Print
(
L" [0x%2X 0x%2X]"
,
Widgets
[
Index
].
AmpInLeftDefaultGainMute
[
Index2
],
Widgets
[
Index
].
AmpInRightDefaultGainMute
[
Index2
]
);
}
else
{
Print
(
L" [0x%2X]"
,
Widgets
[
Index
].
AmpInLeftDefaultGainMute
[
Index2
]);
}
}
Print
(
L"
\n
"
);
}
//
// Print output amp info.
//
if
((
Widgets
[
Index
].
Capabilities
&
HDA_PARAMETER_WIDGET_CAPS_OUT_AMP
)
!=
0
)
{
//
// Print caps.
//
Print
(
L" Amp-Out caps: "
);
HdaCodecDumpPrintAmpCaps
(
Widgets
[
Index
].
AmpOutCapabilities
);
//
// Print default values.
//
Print
(
L" Amp-Out vals:"
);
if
((
Widgets
[
Index
].
Capabilities
&
HDA_PARAMETER_WIDGET_CAPS_STEREO
)
!=
0
)
{
Print
(
L" [0x%2X 0x%2X]
\n
"
,
Widgets
[
Index
].
AmpOutLeftDefaultGainMute
,
Widgets
[
Index
].
AmpOutRightDefaultGainMute
);
}
else
{
Print
(
L" [0x%2X]
\n
"
,
Widgets
[
Index
].
AmpOutLeftDefaultGainMute
);
}
}
//
// Print pin complexe info.
//
if
(
HDA_PARAMETER_WIDGET_CAPS_TYPE
(
Widgets
[
Index
].
Capabilities
)
==
HDA_WIDGET_TYPE_PIN_COMPLEX
)
{
//
// Print pin capabilities.
//
Print
(
L" Pincap 0x%8X:"
,
Widgets
[
Index
].
PinCapabilities
);
if
((
Widgets
[
Index
].
PinCapabilities
&
HDA_PARAMETER_PIN_CAPS_INPUT
)
!=
0
)
{
Print
(
L" IN"
);
}
if
((
Widgets
[
Index
].
PinCapabilities
&
HDA_PARAMETER_PIN_CAPS_OUTPUT
)
!=
0
)
{
Print
(
L" OUT"
);
}
if
((
Widgets
[
Index
].
PinCapabilities
&
HDA_PARAMETER_PIN_CAPS_HEADPHONE
)
!=
0
)
{
Print
(
L" HP"
);
}
if
((
Widgets
[
Index
].
PinCapabilities
&
HDA_PARAMETER_PIN_CAPS_EAPD
)
!=
0
)
{
Print
(
L" EAPD"
);
}
if
((
Widgets
[
Index
].
PinCapabilities
&
HDA_PARAMETER_PIN_CAPS_TRIGGER
)
!=
0
)
{
Print
(
L" Trigger"
);
}
if
((
Widgets
[
Index
].
PinCapabilities
&
HDA_PARAMETER_PIN_CAPS_PRESENCE
)
!=
0
)
{
Print
(
L" Detect"
);
}
if
((
Widgets
[
Index
].
PinCapabilities
&
HDA_PARAMETER_PIN_CAPS_HBR
)
!=
0
)
{
Print
(
L" HBR"
);
}
if
((
Widgets
[
Index
].
PinCapabilities
&
HDA_PARAMETER_PIN_CAPS_HDMI
)
!=
0
)
{
Print
(
L" HDMI"
);
}
if
((
Widgets
[
Index
].
PinCapabilities
&
HDA_PARAMETER_PIN_CAPS_DISPLAYPORT
)
!=
0
)
{
Print
(
L" DP"
);
}
Print
(
L"
\n
"
);
//
// Print EAPD info.
//
if
((
Widgets
[
Index
].
PinCapabilities
&
HDA_PARAMETER_PIN_CAPS_EAPD
)
!=
0
)
{
Print
(
L" EAPD 0x%X:"
,
Widgets
[
Index
].
DefaultEapd
);
if
((
Widgets
[
Index
].
DefaultEapd
&
HDA_EAPD_BTL_ENABLE_BTL
)
!=
0
)
{
Print
(
L" BTL"
);
}
if
((
Widgets
[
Index
].
DefaultEapd
&
HDA_EAPD_BTL_ENABLE_EAPD
)
!=
0
)
{
Print
(
L" EAPD"
);
}
if
((
Widgets
[
Index
].
DefaultEapd
&
HDA_EAPD_BTL_ENABLE_L_R_SWAP
)
!=
0
)
{
Print
(
L" R/L"
);
}
Print
(
L"
\n
"
);
}
//
// Create pin default names.
//
//
// Print pin default header.
//
Print
(
L" Pin Default 0x%8X: [%s] %s at %s %s
\n
"
,
Widgets
[
Index
].
DefaultConfiguration
,
mPortConnectivities
[
HDA_VERB_GET_CONFIGURATION_DEFAULT_PORT_CONN
(
Widgets
[
Index
].
DefaultConfiguration
)],
mDefaultDevices
[
HDA_VERB_GET_CONFIGURATION_DEFAULT_DEVICE
(
Widgets
[
Index
].
DefaultConfiguration
)],
mSurfaces
[
HDA_VERB_GET_CONFIGURATION_DEFAULT_SURF
(
Widgets
[
Index
].
DefaultConfiguration
)],
mLocations
[
HDA_VERB_GET_CONFIGURATION_DEFAULT_LOC
(
Widgets
[
Index
].
DefaultConfiguration
)]);
//
// Print connection type and color.
//
Print
(
L" Conn = %s, Color = %s
\n
"
,
mConnTypes
[
HDA_VERB_GET_CONFIGURATION_DEFAULT_CONN_TYPE
(
Widgets
[
Index
].
DefaultConfiguration
)],
mColors
[
HDA_VERB_GET_CONFIGURATION_DEFAULT_COLOR
(
Widgets
[
Index
].
DefaultConfiguration
)]
);
//
// Print default association and sequence.
//
Print
(
L" DefAssociation = 0x%X, Sequence = 0x%X
\n
"
,
HDA_VERB_GET_CONFIGURATION_DEFAULT_ASSOCIATION
(
Widgets
[
Index
].
DefaultConfiguration
),
HDA_VERB_GET_CONFIGURATION_DEFAULT_SEQUENCE
(
Widgets
[
Index
].
DefaultConfiguration
)
);
//
// Print default pin control.
//
Print
(
L"Pin-ctls: 0x%2X:"
,
Widgets
[
Index
].
DefaultPinControl
);
if
((
Widgets
[
Index
].
DefaultPinControl
&
HDA_PIN_WIDGET_CONTROL_VREF_EN
)
!=
0
)
{
Print
(
L" VREF"
);
}
if
((
Widgets
[
Index
].
DefaultPinControl
&
HDA_PIN_WIDGET_CONTROL_IN_EN
)
!=
0
)
{
Print
(
L" IN"
);
}
if
((
Widgets
[
Index
].
DefaultPinControl
&
HDA_PIN_WIDGET_CONTROL_OUT_EN
)
!=
0
)
{
Print
(
L" OUT"
);
}
if
((
Widgets
[
Index
].
DefaultPinControl
&
HDA_PIN_WIDGET_CONTROL_HP_EN
)
!=
0
)
{
Print
(
L" HP"
);
}
Print
(
L"
\n
"
);
}
//
// Print connections.
//
if
((
Widgets
[
Index
].
Capabilities
&
HDA_PARAMETER_WIDGET_CAPS_CONN_LIST
)
!=
0
)
{
Print
(
L" Connection: %u
\n
"
,
HDA_PARAMETER_CONN_LIST_LENGTH_LEN
(
Widgets
[
Index
].
ConnectionListLength
)
);
for
(
Index2
=
0
;
Index2
<
HDA_PARAMETER_CONN_LIST_LENGTH_LEN
(
Widgets
[
Index
].
ConnectionListLength
);
++
Index2
)
{
Print
(
L" %2u"
,
Widgets
[
Index
].
Connections
[
Index2
]);
}
Print
(
L"
\n
"
);
}
}
}
EFI_STATUS
EFIAPI
HdaCodecDumpMain
(
IN
EFI_HANDLE
ImageHandle
,
IN
EFI_SYSTEM_TABLE
*
SystemTable
)
{
EFI_STATUS
Status
;
EFI_HANDLE
*
HdaCodecHandles
;
UINTN
HdaCodecHandleCount
;
EFI_HDA_CODEC_INFO_PROTOCOL
*
HdaCodecInfo
;
UINTN
Index
;
CONST
CHAR16
*
Name
;
UINT32
VendorId
;
UINT32
RevisionId
;
UINT32
Rates
;
UINT32
Formats
;
UINT32
AmpInCaps
;
UINT32
AmpOutCaps
;
HDA_WIDGET
*
Widgets
;
UINTN
WidgetCount
;
UINT8
AudioFuncId
;
BOOLEAN
Unsol
;
Print
(
L"HdaCodecDump start
\n
"
);
Status
=
gBS
->
LocateHandleBuffer
(
ByProtocol
,
&
gEfiHdaCodecInfoProtocolGuid
,
NULL
,
&
HdaCodecHandleCount
,
&
HdaCodecHandles
);
if
(
EFI_ERROR
(
Status
))
{
Print
(
L"No audio devices were found (%r). Ensure AudioDxe is loaded.
\n
"
,
Status
);
return
Status
;
}
//
// Print each codec found.
//
for
(
Index
=
0
;
Index
<
HdaCodecHandleCount
;
++
Index
)
{
Status
=
gBS
->
HandleProtocol
(
HdaCodecHandles
[
Index
],
&
gEfiHdaCodecInfoProtocolGuid
,
(
VOID
**
)
&
HdaCodecInfo
);
if
(
EFI_ERROR
(
Status
))
{
Print
(
L"Cannot open audio protocol for %p handle - %r.
\n
"
,
HdaCodecHandles
[
Index
],
Status
);
continue
;
}
//
// Get name.
//
Status
=
HdaCodecInfo
->
GetName
(
HdaCodecInfo
,
&
Name
);
if
(
!
EFI_ERROR
(
Status
))
{
Print
(
L"Codec: %s
\n
"
,
Name
);
}
//
// Get AFG ID.
//
Status
=
HdaCodecInfo
->
GetAudioFuncId
(
HdaCodecInfo
,
&
AudioFuncId
,
&
Unsol
);
if
(
!
EFI_ERROR
(
Status
))
{
Print
(
L"AFG Function Id: 0x%X (unsol %d)
\n
"
,
AudioFuncId
,
Unsol
);
}
//
// Get vendor.
//
Status
=
HdaCodecInfo
->
GetVendorId
(
HdaCodecInfo
,
&
VendorId
);
if
(
!
EFI_ERROR
(
Status
))
{
Print
(
L"Vendor ID: 0x%X
\n
"
,
VendorId
);
}
//
// Get revision.
//
Status
=
HdaCodecInfo
->
GetRevisionId
(
HdaCodecInfo
,
&
RevisionId
);
if
(
!
EFI_ERROR
(
Status
))
{
Print
(
L"Revision ID: 0x%X
\n
"
,
RevisionId
);
}
//
// Get supported rates/formats.
//
Status
=
HdaCodecInfo
->
GetDefaultRatesFormats
(
HdaCodecInfo
,
&
Rates
,
&
Formats
);
if
(
!
EFI_ERROR
(
Status
)
&&
(
Rates
!=
0
||
Formats
!=
0
))
{
Print
(
L"Default PCM:
\n
"
);
HdaCodecDumpPrintRatesFormats
(
Rates
,
Formats
);
}
else
{
Print
(
L"Default PCM: N/A
\n
"
);
}
//
// Get default amp caps.
//
Status
=
HdaCodecInfo
->
GetDefaultAmpCaps
(
HdaCodecInfo
,
&
AmpInCaps
,
&
AmpOutCaps
);
if
(
!
EFI_ERROR
(
Status
))
{
Print
(
L"Default Amp-In caps: "
);
HdaCodecDumpPrintAmpCaps
(
AmpInCaps
);
Print
(
L"Default Amp-Out caps: "
);
HdaCodecDumpPrintAmpCaps
(
AmpOutCaps
);
}
//
// Get widgets.
//
Status
=
HdaCodecInfo
->
GetWidgets
(
HdaCodecInfo
,
&
Widgets
,
&
WidgetCount
);
if
(
!
EFI_ERROR
(
Status
))
{
HdaCodecDumpPrintWidgets
(
Widgets
,
WidgetCount
);
HdaCodecInfo
->
FreeWidgetsBuffer
(
Widgets
,
WidgetCount
);
}
}
return
EFI_SUCCESS
;
}
Application/HdaCodecDump/HdaCodecDump.h
已删除
100644 → 0
浏览文件 @
462f5e58
/*
* File: HdaCodecDump.h
*
* Copyright (c) 2018 John Davis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef EFI_HDA_CODEC_DUMP_H
#define EFI_HDA_CODEC_DUMP_H
#include <Uefi.h>
#include <IndustryStandard/HdaVerbs.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Protocol/HdaCodecInfo.h>
#endif // EFI_HDA_CODEC_DUMP_H
Application/HdaCodecDump/HdaCodecDump.inf
已删除
100644 → 0
浏览文件 @
462f5e58
## @file
# Test graphics output protocol.
#
# Copyright (c) 2018, John Davis. All rights reserved.<BR>
#
# 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.
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = HdaCodecDump
ENTRY_POINT = HdaCodecDumpMain
FILE_GUID = 73271011-9220-40C5-8A77-537BB247B616
MODULE_TYPE = UEFI_APPLICATION
VERSION_STRING = 1.0
[Packages]
MdePkg/MdePkg.dec
OpenCorePkg/OpenCorePkg.dec
[LibraryClasses]
BaseMemoryLib
DebugLib
MemoryAllocationLib
OcConsoleControlEntryModeGenericLib
PcdLib
UefiApplicationEntryPoint
UefiBootServicesTableLib
UefiLib
[Protocols]
gEfiHdaCodecInfoProtocolGuid # CONSUMES
[Sources]
HdaCodecDump.h
HdaCodecDump.c
Changelog.md
浏览文件 @
e2275533
...
...
@@ -11,6 +11,7 @@ OpenCore Changelog
-
Added audio codec dumping to
`SysReport`
-
Fixed compatibility with page protection for all binaries
-
Fixed crashes in OpenUsbKbDxe when handling unsupported devices
-
Removed
`HdaCodecDump`
application in favor of
`SysReport`
#### v0.6.5
-
Fixed installing OpenDuet on protected volumes
...
...
Docs/Configuration.tex
浏览文件 @
e2275533
...
...
@@ -5542,8 +5542,6 @@ Some of the known tools are listed below (builtin tools are marked with \textbf{
\href
{
https:
//
github.com
/
acidanthera
/
OpenCorePkg
}{
\texttt
{
GopStop
}}
\textbf
{
*
}
&
Test GraphicsOutput protocol with a
\href
{
https:
//
github.com
/
acidanthera
/
OpenCorePkg
/
tree
/
master
/
Application
/
GopStop
}{
simple scenario
}
.
\\
\href
{
https:
//
github.com
/
acidanthera
/
OpenCorePkg
}{
\texttt
{
HdaCodecDump
}}
\textbf
{
*
}
&
Parse and dump High Definition Audio codec information
(
requires
\texttt
{
AudioDxe
}
)
.
\\
\href
{
https:
//
github.com
/
acidanthera
/
OpenCorePkg
}{
\texttt
{
KeyTester
}}
\textbf
{
*
}
&
Test keyboard input in
\texttt
{
SimpleText
}
mode.
\\
\href
{
https:
//
www.memtest
86
.com
}{
\texttt
{
MemTest
86
}}
...
...
OpenCorePkg.dsc
浏览文件 @
e2275533
...
...
@@ -157,7 +157,6 @@
OpenCorePkg/Application/ChipTune/ChipTune.inf
OpenCorePkg/Application/CleanNvram/CleanNvram.inf
OpenCorePkg/Application/GopStop/GopStop.inf
OpenCorePkg/Application/HdaCodecDump/HdaCodecDump.inf
OpenCorePkg/Application/KeyTester/KeyTester.inf
OpenCorePkg/Application/MmapDump/MmapDump.inf
OpenCorePkg/Application/OpenControl/OpenControl.inf
...
...
build_oc.tool
浏览文件 @
e2275533
...
...
@@ -125,7 +125,6 @@ package() {
"ChipTune.efi"
"CleanNvram.efi"
"GopStop.efi"
"HdaCodecDump.efi"
"KeyTester.efi"
"MmapDump.efi"
"ResetSystem.efi"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录