/
5s1-hdmi_audio_ami_5_series_amd-nvidia-1.txt
84 lines (82 loc) · 3.15 KB
/
5s1-hdmi_audio_ami_5_series_amd-nvidia-1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Maintained by: toleda for: github.com/toleda_hdmi_5series
# File: 5s1-hdmi_audio_ami_5_series_amd-nvidia-1.txt_v3.0
# Adds Desktop AMD/Nvidia HDMI audio dsdt edits (Audio ID: 1)
#
# Important, If no HDEF, check:
# 1. If Device (AZAL) is present in your dsdt,
# Find: AZAL
# Replace All: HDEF
# 2. If Device (HDEF) is not present in your dsdt,
# see http://www.github.com/toleda/audio_ALCInjection
#
# 1. Remove PEGP device - if present
# 2. Rename GFX0 devices to IGPU - Verify IOReg/GFXO@2 - if present
# 3. Rename device P0P1 to device PEGP - Verify IOReg/P0P1@1, if different, edit patch
# 3a. Verify P0P1@1/_ADR, 0x00010000), if different, edit patch
# 4. Insert device GFX0 and device HDAU into device PEGP (AMD/Nvidia HDMI audio)
# 5. Insert layout-id=1 into device HDEF
#
# 1. Remove PEGP device - if present
# 2. Rename GFX0 devices to IGPU
into device label GFX0 set_label begin IGPU end;
into_all all code_regex GFX0 replaceall_matched begin IGPU end;
into scope label _SB.PCI0.GFX0 set_label begin _SB.PCI0.IGPU end;
into scope label \_SB.PCI0.GFX0 set_label begin \_SB.PCI0.IGPU end;
# 3. Rename device P0P1 to device PEGP
into device label P0P1 set_label begin PEGP end;
into_all all code_regex P0P1 replaceall_matched begin PEGP end;
into scope label _SB.PCI0.P0P1 set_label begin _SB.PCI0.PEGP end;
into scope label \_SB.PCI0.P0P1 set_label begin \_SB.PCI0.PEGP end;
# 4. Insert device GFX0 and device HDAU (Nvidia/AMD HDMI audio)
into method label _DSM parent_adr 0x00010000 remove_entry;
into device name_adr 0x00010000 insert
begin
Device (GFX0)\n
{\n
Name (_ADR, Zero)\n
Name (_SUN, One)\n
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"@0,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
"@1,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
"@2,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
"@3,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
"@4,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
"@5,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
"hda-gfx", Buffer() { "onboard-2" },\n
})\n
}\n
}\n
Device (HDAU)\n
{\n
Name (_ADR, One)\n
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"layout-id", Buffer() { 0x01, 0x00, 0x00, 0x00 },\n
"hda-gfx", Buffer() { "onboard-2" },\n
})\n
}\n
}\n
end;
# 5. Insert layout-id=1 into device HDEF
into method label _DSM parent_adr 0x001B0000 remove_entry;
into device name_adr 0x001B0000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"layout-id", Buffer() { 0x01, 0x00, 0x00, 0x00 },\n
"PinConfigurations", Buffer(Zero) {},\n
})\n
}\n
end;
into definitionblock code_regex . insert
begin Store ("5s1-hdmi_audio_ami_5_series_amd-nvidia-1.txt_v3.0 dsdt edits, github.com/toleda", Debug) end