Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
79f08291
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,发现更多精彩内容 >>
提交
79f08291
编写于
7月 08, 2022
作者:
M
MikeBeaton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
AudioDxe: Add --force-device option
上级
7bfa8ae6
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
125 addition
and
23 deletion
+125
-23
Changelog.md
Changelog.md
+2
-1
Docs/Configuration.md5
Docs/Configuration.md5
+1
-1
Docs/Configuration.pdf
Docs/Configuration.pdf
+0
-0
Docs/Configuration.tex
Docs/Configuration.tex
+22
-4
Docs/Differences/Differences.pdf
Docs/Differences/Differences.pdf
+0
-0
Docs/Differences/Differences.tex
Docs/Differences/Differences.tex
+32
-6
Docs/Errata/Errata.pdf
Docs/Errata/Errata.pdf
+0
-0
Platform/OpenLinuxBoot/OpenLinuxBoot.c
Platform/OpenLinuxBoot/OpenLinuxBoot.c
+1
-1
Staging/AudioDxe/AudioDxe.c
Staging/AudioDxe/AudioDxe.c
+19
-3
Staging/AudioDxe/AudioDxe.h
Staging/AudioDxe/AudioDxe.h
+25
-4
Staging/AudioDxe/AudioDxe.inf
Staging/AudioDxe/AudioDxe.inf
+1
-0
Staging/AudioDxe/HdaController/HdaController.c
Staging/AudioDxe/HdaController/HdaController.c
+22
-3
未找到文件。
Changelog.md
浏览文件 @
79f08291
...
@@ -2,7 +2,8 @@ OpenCore Changelog
...
@@ -2,7 +2,8 @@ OpenCore Changelog
==================
==================
#### v0.8.3
#### v0.8.3
-
Added ext4 file system driver
-
Added ext4 file system driver
-
Added support macOS 13 DP3 Kernel Collection
-
Added support for macOS 13 DP3 Kernel Collection
-
Added
`--force-device`
option to AudioDxe, allowing UEFI audio on HDA contollers which misreport themselves as non-HDA audio devices
#### v0.8.2
#### v0.8.2
-
Fixed
`AppleCpuPmCfgLock`
on macOS 13
-
Fixed
`AppleCpuPmCfgLock`
on macOS 13
...
...
Docs/Configuration.md5
浏览文件 @
79f08291
5c72b1716d2046e9e507ea1ae35d860c
c35488bf631b9f319ae8c4059e1415f9
Docs/Configuration.pdf
浏览文件 @
79f08291
无法预览此类型文件
Docs/Configuration.tex
浏览文件 @
79f08291
...
@@ -6886,7 +6886,7 @@ will report that SIP has a non-standard value, however protection will be functi
...
@@ -6886,7 +6886,7 @@ will report that SIP has a non-standard value, however protection will be functi
\subsection
{
AudioDxe
}
\label
{
uefiaudio
}
\subsection
{
AudioDxe
}
\label
{
uefiaudio
}
High Definition Audio support driver in UEFI firmware for most Intel and some other analog audio controllers.
High Definition Audio
(
HDA
)
support driver in UEFI firmware for most Intel and some other analog audio controllers.
\emph
{
Note
}
: AudioDxe is a staging driver, refer to
\href
{
https:
//
github.com
/
acidanthera
/
bugtracker
/
issues
/
740
}{
acidanthera
/
bugtracker
\#
740
}
\emph
{
Note
}
: AudioDxe is a staging driver, refer to
\href
{
https:
//
github.com
/
acidanthera
/
bugtracker
/
issues
/
740
}{
acidanthera
/
bugtracker
\#
740
}
for known issues.
for known issues.
...
@@ -6894,12 +6894,30 @@ for known issues.
...
@@ -6894,12 +6894,30 @@ for known issues.
\subsubsection
{
Configuration
}
\subsubsection
{
Configuration
}
Most UEFI audio configuration is handled via the
\hyperref
[
uefiaudioprops
]
{
\texttt
{
UEFI Audio Properties
}}
Most UEFI audio configuration is handled via the
\hyperref
[
uefiaudioprops
]
{
\texttt
{
UEFI Audio Properties
}}
section, but if required the following additonal configuration options
(
which are needed to produce sound
section, but in addition some of the following configuration options may be required in order
on most Apple hardware, and possibly some others
)
may be specified in
\texttt
{
UEFI
/
Drivers
/
Arguments
}
:
to allow AudioDxe to correctly drive certain devices. All options are specified as text strings,
separated by space if more than one option is required, in the
\texttt
{
Arguments
}
property for
the driver within the
\texttt
{
UEFI
/
Drivers
}
section:
\begin
{
itemize
}
\begin
{
itemize
}
\tightlist
\tightlist
\item
\texttt
{
-
{}
-
gpio
-
setup
}
-
Default value is
\texttt
{
0
}
(
GPIO setup disabled
)
if argument is not provided,
\item
\texttt
{
-
{}
-
force
-
device
}
-
String value, no default.
\medskip
When this option is present and has a value
(
e.g.
\texttt
{
-
{}
-
force
-
device
=
PciRoot
(
0
x
0
)/
Pci
(
0
x
1
f,
0
x
3
)
}
)
, it
forces AudioDxe to connect to the specified PCI device, even if the device does not report itself as
an HDA audio controller.
During driver connection, AudioDxe automatically provides audio services on all supported codecs of
all available HDA controllers. However, if the relevant controller is misreporting its identity
(
typically, it will be reporting itself as a legacy audio device instead of an HDA controller
)
then this argument may be required.
Applies if the audio device can be made to work in macOS, but shows no sign of being detected by AudioDxe
(
e.g. when including
\texttt
{
DEBUG
\_
INFO
}
in
\texttt
{
DisplayLevel
}
and using a DEBUG build of AudioDxe,
no controller and codec layout information is displayed during the
\texttt
{
Connecting drivers...
}
phase of OpenCore log
)
.
\medskip
\item
\texttt
{
-
{}
-
gpio
-
setup
}
-
Default value is
\texttt
{
0
}
(
GPIO setup disabled
)
if argument is not provided,
or
\texttt
{
7
}
(
all GPIO setup stages stages enabled
)
if the argument is provided with no value.
\medskip
or
\texttt
{
7
}
(
all GPIO setup stages stages enabled
)
if the argument is provided with no value.
\medskip
Available values, which may be combined by adding, are:
\medskip
Available values, which may be combined by adding, are:
\medskip
...
...
Docs/Differences/Differences.pdf
浏览文件 @
79f08291
无法预览此类型文件
Docs/Differences/Differences.tex
浏览文件 @
79f08291
\documentclass
[]
{
article
}
\documentclass
[]
{
article
}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL PreviousConfiguration.tex T
ue Jul 5 17:33:51
2022
%DIF DEL PreviousConfiguration.tex T
hu Jul 7 13:40:40
2022
%DIF ADD ../Configuration.tex
Fri Jul 8 20:34:17
2022
%DIF ADD ../Configuration.tex
Sat Jul 9 09:49:03
2022
\usepackage
{
lmodern
}
\usepackage
{
lmodern
}
\usepackage
{
amssymb,amsmath
}
\usepackage
{
amssymb,amsmath
}
...
@@ -6946,7 +6946,7 @@ will report that SIP has a non-standard value, however protection will be functi
...
@@ -6946,7 +6946,7 @@ will report that SIP has a non-standard value, however protection will be functi
\subsection
{
AudioDxe
}
\label
{
uefiaudio
}
\subsection
{
AudioDxe
}
\label
{
uefiaudio
}
High Definition Audio support driver in UEFI firmware for most Intel and some other analog audio controllers.
High Definition Audio
\DIFaddbegin
\DIFadd
{
(
HDA
)
}
\DIFaddend
support driver in UEFI firmware for most Intel and some other analog audio controllers.
\emph
{
Note
}
: AudioDxe is a staging driver, refer to
\href
{
https:
//
github.com
/
acidanthera
/
bugtracker
/
issues
/
740
}{
acidanthera
/
bugtracker
\#
740
}
\emph
{
Note
}
: AudioDxe is a staging driver, refer to
\href
{
https:
//
github.com
/
acidanthera
/
bugtracker
/
issues
/
740
}{
acidanthera
/
bugtracker
\#
740
}
for known issues.
for known issues.
...
@@ -6954,12 +6954,38 @@ for known issues.
...
@@ -6954,12 +6954,38 @@ for known issues.
\subsubsection
{
Configuration
}
\subsubsection
{
Configuration
}
Most UEFI audio configuration is handled via the
\hyperref
[
uefiaudioprops
]
{
\texttt
{
UEFI Audio Properties
}}
Most UEFI audio configuration is handled via the
\hyperref
[
uefiaudioprops
]
{
\texttt
{
UEFI Audio Properties
}}
section, but if required the following additonal configuration options
(
which are needed to produce sound
section, but
\DIFdelbegin
\DIFdel
{
if required the following additonal configuration options
(
which are needed to produce sound
on most Apple hardware, and possibly some others
)
may be specified in
\texttt
{
UEFI
/
Drivers
/
Arguments
}
:
on most Apple hardware, and possibly some others
)
may be specified in
}
%DIFDELCMD < \texttt{%%%
\DIFdel
{
UEFI
/
Drivers
/
Arguments
}
%DIFDELCMD < \MBLOCKRIGHTBRACE%%%
\DIFdel
{
:
}
\DIFdelend
\DIFaddbegin
\DIFadd
{
in addition some of the following configuration options may be required in order
to allow AudioDxe to correctly drive certain devices. All options are specified as text strings,
separated by space if more than one option is required, in the
}
\texttt
{
\DIFadd
{
Arguments
}}
\DIFadd
{
property for
the driver within the
}
\texttt
{
\DIFadd
{
UEFI
/
Drivers
}}
\DIFadd
{
section:
}
\DIFaddend
\begin
{
itemize
}
\begin
{
itemize
}
\tightlist
\tightlist
\item
\texttt
{
-
{}
-
gpio
-
setup
}
-
Default value is
\texttt
{
0
}
(
GPIO setup disabled
)
if argument is not provided,
\item
\DIFaddbegin
\texttt
{
\DIFadd
{
-
}{}
\DIFadd
{
-
force
-
device
}}
\DIFadd
{
-
String value, no default.
}
\medskip
\DIFadd
{
When this option is present and has a value
(
e.g.
}
\texttt
{
\DIFadd
{
-
}{}
\DIFadd
{
-
force
-
device
=
PciRoot
(
0
x
0
)/
Pci
(
0
x
1
f,
0
x
3
)
}}
\DIFadd
{
)
, it
forces AudioDxe to connect to the specified PCI device, even if the device does not report itself as
an HDA audio controller.
}
\DIFadd
{
During driver connection, AudioDxe automatically provides audio services on all supported codecs of
all available HDA controllers. However, if the relevant controller is misreporting its identity
(
typically, it will be reporting itself as a legacy audio device instead of an HDA controller
)
then this argument may be required.
}
\DIFadd
{
Applies if the audio device can be made to work in macOS, but shows no sign of being detected by AudioDxe
(
e.g. when including
}
\texttt
{
\DIFadd
{
DEBUG
\_
INFO
}}
\DIFadd
{
in
}
\texttt
{
\DIFadd
{
DisplayLevel
}}
\DIFadd
{
and using a DEBUG build of AudioDxe,
no controller and codec layout information is displayed during the
}
\texttt
{
\DIFadd
{
Connecting drivers...
}}
\DIFadd
{
phase of OpenCore log
)
.
}
\medskip
\item
\DIFaddend
\texttt
{
-
{}
-
gpio
-
setup
}
-
Default value is
\texttt
{
0
}
(
GPIO setup disabled
)
if argument is not provided,
or
\texttt
{
7
}
(
all GPIO setup stages stages enabled
)
if the argument is provided with no value.
\medskip
or
\texttt
{
7
}
(
all GPIO setup stages stages enabled
)
if the argument is provided with no value.
\medskip
Available values, which may be combined by adding, are:
\medskip
Available values, which may be combined by adding, are:
\medskip
...
...
Docs/Errata/Errata.pdf
浏览文件 @
79f08291
无法预览此类型文件
Platform/OpenLinuxBoot/OpenLinuxBoot.c
浏览文件 @
79f08291
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
UINTN
gLinuxBootFlags
=
LINUX_BOOT_ALL
&
~
(
LINUX_BOOT_ADD_DEBUG_INFO
|
LINUX_BOOT_LOG_VERBOSE
|
LINUX_BOOT_ADD_RW
);
UINTN
gLinuxBootFlags
=
LINUX_BOOT_ALL
&
~
(
LINUX_BOOT_ADD_DEBUG_INFO
|
LINUX_BOOT_LOG_VERBOSE
|
LINUX_BOOT_ADD_RW
);
OC_FLEX_ARRAY
*
mParsedLoadOptions
;
STATIC
OC_FLEX_ARRAY
*
mParsedLoadOptions
;
OC_PICKER_CONTEXT
*
gPickerContext
;
OC_PICKER_CONTEXT
*
gPickerContext
;
OC_FLEX_ARRAY
*
gLoaderEntries
;
OC_FLEX_ARRAY
*
gLoaderEntries
;
...
...
Staging/AudioDxe/AudioDxe.c
浏览文件 @
79f08291
...
@@ -32,9 +32,17 @@
...
@@ -32,9 +32,17 @@
#include <Library/OcBootManagementLib.h>
#include <Library/OcBootManagementLib.h>
#include <Library/OcFlexArrayLib.h>
#include <Library/OcFlexArrayLib.h>
UINTN
gGpioSetupStageMask
=
GPIO_SETUP_STAGE_NONE
;
UINTN
UINTN
gGpioPinMask
=
GPIO_PIN_MASK_AUTO
;
gGpioSetupStageMask
=
GPIO_SETUP_STAGE_NONE
;
BOOLEAN
gRestoreNoSnoop
=
FALSE
;
UINTN
gGpioPinMask
=
GPIO_PIN_MASK_AUTO
;
BOOLEAN
gRestoreNoSnoop
=
FALSE
;
EFI_DEVICE_PATH_PROTOCOL
*
gForcedControllerDevicePath
=
NULL
;
/**
/**
HdaController Driver Binding.
HdaController Driver Binding.
...
@@ -71,6 +79,7 @@ AudioDxeInit (
...
@@ -71,6 +79,7 @@ AudioDxeInit (
{
{
EFI_STATUS
Status
;
EFI_STATUS
Status
;
EFI_LOADED_IMAGE_PROTOCOL
*
LoadedImage
;
EFI_LOADED_IMAGE_PROTOCOL
*
LoadedImage
;
CHAR16
*
DevicePathName
;
OC_FLEX_ARRAY
*
ParsedLoadOptions
;
OC_FLEX_ARRAY
*
ParsedLoadOptions
;
//
//
...
@@ -107,6 +116,13 @@ AudioDxeInit (
...
@@ -107,6 +116,13 @@ AudioDxeInit (
));
));
}
}
DevicePathName
=
NULL
;
OcParsedVarsGetUnicodeStr
(
ParsedLoadOptions
,
L"--force-device"
,
&
DevicePathName
);
if
(
DevicePathName
!=
NULL
)
{
DEBUG
((
DEBUG_INFO
,
"HDA: Force binding to %s
\n
"
,
DevicePathName
));
gForcedControllerDevicePath
=
ConvertTextToDevicePath
(
DevicePathName
);
}
OcFlexArrayFree
(
&
ParsedLoadOptions
);
OcFlexArrayFree
(
&
ParsedLoadOptions
);
}
else
if
(
Status
!=
EFI_NOT_FOUND
)
{
}
else
if
(
Status
!=
EFI_NOT_FOUND
)
{
return
Status
;
return
Status
;
...
...
Staging/AudioDxe/AudioDxe.h
浏览文件 @
79f08291
...
@@ -85,10 +85,31 @@ extern EFI_AUDIO_DECODE_PROTOCOL gEfiAudioDecodeProtocol;
...
@@ -85,10 +85,31 @@ extern EFI_AUDIO_DECODE_PROTOCOL gEfiAudioDecodeProtocol;
#define GPIO_PIN_MASK_AUTO 0 ///< Auto: use all reported available pins.
#define GPIO_PIN_MASK_AUTO 0 ///< Auto: use all reported available pins.
//
//
// S
tored parsed config
.
// S
etup stage mask
.
//
//
extern
UINTN
gGpioSetupStageMask
;
extern
extern
UINTN
gGpioPinMask
;
UINTN
extern
BOOLEAN
gRestoreNoSnoop
;
gGpioSetupStageMask
;
//
// GPIO pin mask.
//
extern
UINTN
gGpioPinMask
;
//
// Whether to restore NOSNOOPEN at exit.
//
extern
BOOLEAN
gRestoreNoSnoop
;
//
// Forced device path for HDA controller (ignore advertised class/subclass).
//
extern
EFI_DEVICE_PATH_PROTOCOL
*
gForcedControllerDevicePath
;
#endif // EFI_AUDIODXE_H
#endif // EFI_AUDIODXE_H
Staging/AudioDxe/AudioDxe.inf
浏览文件 @
79f08291
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
MemoryAllocationLib
MemoryAllocationLib
OcBootManagementLib
OcBootManagementLib
OcDeviceMiscLib
OcDeviceMiscLib
OcDevicePathLib
OcFlexArrayLib
OcFlexArrayLib
OcHdaDevicesLib
OcHdaDevicesLib
OcMp3Lib
OcMp3Lib
...
...
Staging/AudioDxe/HdaController/HdaController.c
浏览文件 @
79f08291
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <Library/OcGuardLib.h>
#include <Library/OcGuardLib.h>
#include <Library/OcDeviceMiscLib.h>
#include <Library/OcDeviceMiscLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/OcDevicePathLib.h>
#include <Library/OcHdaDevicesLib.h>
#include <Library/OcHdaDevicesLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcStringLib.h>
#include <Library/OcStringLib.h>
...
@@ -991,9 +992,10 @@ HdaControllerDriverBindingSupported (
...
@@ -991,9 +992,10 @@ HdaControllerDriverBindingSupported (
IN
EFI_DEVICE_PATH_PROTOCOL
*
RemainingDevicePath
OPTIONAL
IN
EFI_DEVICE_PATH_PROTOCOL
*
RemainingDevicePath
OPTIONAL
)
)
{
{
EFI_STATUS
Status
;
EFI_STATUS
Status
;
EFI_PCI_IO_PROTOCOL
*
PciIo
;
EFI_PCI_IO_PROTOCOL
*
PciIo
;
PCI_CLASSCODE
HdaClassReg
;
PCI_CLASSCODE
HdaClassReg
;
EFI_DEVICE_PATH_PROTOCOL
*
DevicePath
;
//
//
// Open PCI I/O protocol. If this fails, it's not a PCI device.
// Open PCI I/O protocol. If this fails, it's not a PCI device.
...
@@ -1011,6 +1013,23 @@ HdaControllerDriverBindingSupported (
...
@@ -1011,6 +1013,23 @@ HdaControllerDriverBindingSupported (
return
Status
;
return
Status
;
}
}
//
// For use when the device is misreporting its class or subclass, so ignore these.
//
if
(
gForcedControllerDevicePath
!=
NULL
)
{
Status
=
EFI_UNSUPPORTED
;
DevicePath
=
DevicePathFromHandle
(
ControllerHandle
);
if
(
(
DevicePath
!=
NULL
)
&&
IsDevicePathEqual
(
DevicePath
,
gForcedControllerDevicePath
))
{
Status
=
EFI_SUCCESS
;
}
return
Status
;
}
//
//
// Read class code from PCI.
// Read class code from PCI.
//
//
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录