Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
ced62ddf
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,发现更多精彩内容 >>
提交
ced62ddf
编写于
2月 27, 2021
作者:
V
vit9696
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OcMainLib: Added `ResetTrafficClass` to reset TCSEL to T0 on legacy HDA
上级
6a69e346
变更
12
展开全部
隐藏空白更改
内联
并排
Showing
12 changed file
with
871 addition
and
582 deletion
+871
-582
Changelog.md
Changelog.md
+1
-0
Docs/Configuration.pdf
Docs/Configuration.pdf
+0
-0
Docs/Configuration.tex
Docs/Configuration.tex
+13
-0
Docs/Differences/Differences.pdf
Docs/Differences/Differences.pdf
+0
-0
Docs/Differences/Differences.tex
Docs/Differences/Differences.tex
+765
-581
Docs/Errata/Errata.pdf
Docs/Errata/Errata.pdf
+0
-0
Docs/Sample.plist
Docs/Sample.plist
+2
-0
Docs/SampleCustom.plist
Docs/SampleCustom.plist
+2
-0
Include/Acidanthera/Library/OcConfigurationLib.h
Include/Acidanthera/Library/OcConfigurationLib.h
+2
-1
Library/OcConfigurationLib/OcConfigurationLib.c
Library/OcConfigurationLib/OcConfigurationLib.c
+1
-0
Library/OcMainLib/OcMainLib.inf
Library/OcMainLib/OcMainLib.inf
+1
-0
Library/OcMainLib/OpenCoreUefiAudio.c
Library/OcMainLib/OpenCoreUefiAudio.c
+84
-0
未找到文件。
Changelog.md
浏览文件 @
ced62ddf
...
...
@@ -19,6 +19,7 @@ OpenCore Changelog
-
Added
`acdtinfo`
utility to lookup certain products
-
Fixed
`FSBFrequency`
calculation with fractional multiplier
-
Fixed showing core count for some AMD CPUs
-
Added
`ResetTrafficClass`
to reset TCSEL to T0 on legacy HDA
#### v0.6.6
-
Added keyboard and pointer entry scroll support in OpenCanopy
...
...
Docs/Configuration.pdf
浏览文件 @
ced62ddf
无法预览此类型文件
Docs/Configuration.tex
浏览文件 @
ced62ddf
...
...
@@ -6142,6 +6142,19 @@ functioning. Feature highlights:
\emph
{
Note
}
:
\texttt
{
Enabled
}
can be used in separate from
\texttt
{
StartupMute
}
NVRAM variable to avoid conflicts when the firmware is able to play boot chime.
\item
\texttt
{
ResetTrafficClass
}
\\
\textbf
{
Type
}
:
\texttt
{
plist
\
boolean
}
\\
\textbf
{
Failsafe
}
:
\texttt
{
false
}
\\
\textbf
{
Description
}
: Set HDA Traffic Class Select Register to
\texttt
{
TC
0
}
.
AppleHDA kext will function correctly only if
\texttt
{
TCSEL
}
register is configured
to use
\texttt
{
TC
0
}
traffic class. Refer to Intel I
/
O Controller Hub
9
(
ICH
9
)
Family
Datasheet
(
or any other ICH datasheet
)
for more details about this register.
\emph
{
Note
}
: This option is independent from
\texttt
{
AudioSupport
}
. If AppleALC is used
it is preferred to use AppleALC
\texttt
{
alctsel
}
property instead.
\item
\texttt
{
SetupDelay
}
\\
\textbf
{
Type
}
:
\texttt
{
plist
\
integer
}
\\
...
...
Docs/Differences/Differences.pdf
浏览文件 @
ced62ddf
无法预览此类型文件
Docs/Differences/Differences.tex
浏览文件 @
ced62ddf
此差异已折叠。
点击以展开。
Docs/Errata/Errata.pdf
浏览文件 @
ced62ddf
无法预览此类型文件
Docs/Sample.plist
浏览文件 @
ced62ddf
...
...
@@ -1086,6 +1086,8 @@
<integer>
20
</integer>
<key>
PlayChime
</key>
<string>
Auto
</string>
<key>
ResetTrafficClass
</key>
<false/>
<key>
SetupDelay
</key>
<integer>
0
</integer>
<key>
VolumeAmplifier
</key>
...
...
Docs/SampleCustom.plist
浏览文件 @
ced62ddf
...
...
@@ -1283,6 +1283,8 @@
<integer>
20
</integer>
<key>
PlayChime
</key>
<string>
Auto
</string>
<key>
ResetTrafficClass
</key>
<false/>
<key>
SetupDelay
</key>
<integer>
0
</integer>
<key>
VolumeAmplifier
</key>
...
...
Include/Acidanthera/Library/OcConfigurationLib.h
浏览文件 @
ced62ddf
...
...
@@ -590,7 +590,8 @@ typedef enum {
_(BOOLEAN , AudioSupport , , FALSE , ()) \
_(UINT8 , AudioCodec , , 0 , ()) \
_(UINT8 , AudioOut , , 0 , ()) \
_(UINT8 , MinimumVolume , , 0 , ())
_(UINT8 , MinimumVolume , , 0 , ()) \
_(BOOLEAN , ResetTrafficClass , , FALSE , ())
OC_DECLARE
(
OC_UEFI_AUDIO
)
///
...
...
Library/OcConfigurationLib/OcConfigurationLib.c
浏览文件 @
ced62ddf
...
...
@@ -714,6 +714,7 @@ mUefiAudioSchema[] = {
OC_SCHEMA_BOOLEAN_IN
(
"AudioSupport"
,
OC_GLOBAL_CONFIG
,
Uefi
.
Audio
.
AudioSupport
),
OC_SCHEMA_INTEGER_IN
(
"MinimumVolume"
,
OC_GLOBAL_CONFIG
,
Uefi
.
Audio
.
MinimumVolume
),
OC_SCHEMA_STRING_IN
(
"PlayChime"
,
OC_GLOBAL_CONFIG
,
Uefi
.
Audio
.
PlayChime
),
OC_SCHEMA_BOOLEAN_IN
(
"ResetTrafficClass"
,
OC_GLOBAL_CONFIG
,
Uefi
.
Audio
.
ResetTrafficClass
),
OC_SCHEMA_INTEGER_IN
(
"SetupDelay"
,
OC_GLOBAL_CONFIG
,
Uefi
.
Audio
.
SetupDelay
),
OC_SCHEMA_INTEGER_IN
(
"VolumeAmplifier"
,
OC_GLOBAL_CONFIG
,
Uefi
.
Audio
.
VolumeAmplifier
),
};
...
...
Library/OcMainLib/OcMainLib.inf
浏览文件 @
ced62ddf
...
...
@@ -51,6 +51,7 @@
gOcInterfaceProtocolGuid ## SOMETIMES_CONSUMES
gEfiSecurityArchProtocolGuid ## SOMETIMES_CONSUMES
gEfiSecurity2ArchProtocolGuid ## SOMETIMES_CONSUMES
gEfiPciIoProtocolGuid ## SOMETIMES_CONSUMES
[LibraryClasses]
DevicePathLib
...
...
Library/OcMainLib/OpenCoreUefiAudio.c
浏览文件 @
ced62ddf
...
...
@@ -17,7 +17,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Guid/AppleVariable.h>
#include <Guid/OcVariable.h>
#include <Guid/GlobalVariable.h>
#include <IndustryStandard/Pci30.h>
#include <Protocol/AudioDecode.h>
#include <Protocol/PciIo.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
...
...
@@ -469,6 +471,84 @@ OcAudioExitBootServices (
OcAudio
->
StopPlayback
(
OcAudio
,
TRUE
);
}
STATIC
VOID
ResetAudioTrafficClass
(
VOID
)
{
EFI_STATUS
Status
;
UINTN
HandleCount
;
EFI_HANDLE
*
HandleBuffer
;
UINTN
Index
;
EFI_PCI_IO_PROTOCOL
*
PciIo
;
UINT32
ClassCode
;
UINT8
TrafficClass
;
Status
=
gBS
->
LocateHandleBuffer
(
ByProtocol
,
&
gEfiPciIoProtocolGuid
,
NULL
,
&
HandleCount
,
&
HandleBuffer
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_INFO
,
"OC: No PCI devices for TCSEL reset - %r
\n
"
,
Status
));
return
;
}
for
(
Index
=
0
;
Index
<
HandleCount
;
++
Index
)
{
Status
=
gBS
->
HandleProtocol
(
HandleBuffer
[
Index
],
&
gEfiPciIoProtocolGuid
,
(
VOID
**
)
&
PciIo
);
if
(
EFI_ERROR
(
Status
))
{
continue
;
}
Status
=
PciIo
->
Pci
.
Read
(
PciIo
,
EfiPciIoWidthUint32
,
OFFSET_OF
(
PCI_DEVICE_INDEPENDENT_REGION
,
RevisionID
),
1
,
&
ClassCode
);
if
(
EFI_ERROR
(
Status
))
{
continue
;
}
ClassCode
>>=
16U
;
///< Drop revision and minor codes.
if
(
ClassCode
==
(
PCI_CLASS_MEDIA
<<
8
|
PCI_CLASS_MEDIA_AUDIO
)
||
ClassCode
==
(
PCI_CLASS_MEDIA
<<
8
|
0x3
/* PCI_CLASS_MEDIA_HDA */
))
{
Status
=
PciIo
->
Pci
.
Read
(
PciIo
,
EfiPciIoWidthUint8
,
0x44
/* TCSEL */
,
1
,
&
TrafficClass
);
if
(
EFI_ERROR
(
Status
))
{
continue
;
}
DEBUG
((
DEBUG_INFO
,
"OC: Discovered audio device at %u/%u with TCSEL %X
\n
"
,
(
UINT32
)
(
Index
+
1
),
(
UINT32
)
HandleCount
,
TrafficClass
));
//
// Update Traffic Class Select Register to TC0.
// This is required for AppleHDA to output audio on some machines.
// See Intel I/O Controller Hub 9 (ICH9) Family Datasheet for more details.
//
if
((
TrafficClass
&
0x7U
)
!=
0
)
{
TrafficClass
&=
~
0x7U
;
PciIo
->
Pci
.
Write
(
PciIo
,
EfiPciIoWidthUint8
,
0x44
/* TCSEL */
,
1
,
&
TrafficClass
);
}
}
}
}
VOID
OcLoadUefiAudioSupport
(
IN
OC_STORAGE_CONTEXT
*
Storage
,
...
...
@@ -483,6 +563,10 @@ OcLoadUefiAudioSupport (
UINT8
VolumeLevel
;
BOOLEAN
Muted
;
if
(
Config
->
Uefi
.
Audio
.
ResetTrafficClass
)
{
ResetAudioTrafficClass
();
}
if
(
!
Config
->
Uefi
.
Audio
.
AudioSupport
)
{
DEBUG
((
DEBUG_INFO
,
"OC: Requested not to use audio
\n
"
));
return
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录