mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
ocvalidate: AudioSupport = YES should require non-empty AudioDevice (and valid device path)
This commit is contained in:
parent
9e9c2c5234
commit
17c0c3df2f
@ -84,6 +84,8 @@ Utility to validate whether a `config.plist` matches requirements and convention
|
||||
### UEFI
|
||||
#### APFS
|
||||
- When `EnableJumpstart` is enabled, `ScanPolicy` in `Misc->Security` should have `OC_SCAN_ALLOW_FS_APFS` (bit 8) set, together with `OC_SCAN_FILE_SYSTEM_LOCK` (bit 0) set. Or `ScanPolicy` should be `0` (failsafe value).
|
||||
#### Audio
|
||||
- When `AudioSupport` is enabled, AudioDevice cannot be empty and must be a valid path.
|
||||
#### Quirks
|
||||
- When `RequestBootVarRouting` is enabled, `OpenRuntime.efi` should be loaded in `UEFI->Drivers`.
|
||||
#### Drivers
|
||||
|
||||
@ -150,15 +150,22 @@ CheckUEFIAudio (
|
||||
{
|
||||
UINT32 ErrorCount;
|
||||
OC_UEFI_CONFIG *UserUefi;
|
||||
BOOLEAN IsAudioSupportEnabled;
|
||||
CONST CHAR8 *AsciiAudioDevicePath;
|
||||
|
||||
ErrorCount = 0;
|
||||
UserUefi = &Config->Uefi;
|
||||
AsciiAudioDevicePath = OC_BLOB_GET (&UserUefi->Audio.AudioDevice);
|
||||
|
||||
if (AsciiAudioDevicePath[0] != '\0' && !AsciiDevicePathIsLegal (AsciiAudioDevicePath)) {
|
||||
DEBUG ((DEBUG_WARN, "UEFI->Audio->AudioDevice is borked! Please check the information above!\n"));
|
||||
++ErrorCount;
|
||||
IsAudioSupportEnabled = UserUefi->Audio.AudioSupport;
|
||||
AsciiAudioDevicePath = OC_BLOB_GET (&UserUefi->Audio.AudioDevice);
|
||||
if (IsAudioSupportEnabled) {
|
||||
if (AsciiAudioDevicePath[0] == '\0') {
|
||||
DEBUG ((DEBUG_WARN, "UEFI->Audio->AudioDevicePath cannot be empty when AudioSupport is enabled!\n"));
|
||||
++ErrorCount;
|
||||
} else if (!AsciiDevicePathIsLegal (AsciiAudioDevicePath)) {
|
||||
DEBUG ((DEBUG_WARN, "UEFI->Audio->AudioDevice is borked! Please check the information above!\n"));
|
||||
++ErrorCount;
|
||||
}
|
||||
}
|
||||
|
||||
return ErrorCount;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user