Skip to content

Commit 2cd5a74

Browse files
vandroiy2013vandroiy2013
authored andcommitted
Added Atom Z36xxx/Z37xxx Audio Controller support
1 parent 4ae49e0 commit 2cd5a74

File tree

3 files changed

+67
-37
lines changed

3 files changed

+67
-37
lines changed

AppleALC/kern_resources.cpp

Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -24831,61 +24831,67 @@ const size_t vendorModSize {10};
2483124831

2483224832
// ControllerMod section
2483324833

24834-
static const uint8_t patchBuf840[] { 0x20, 0x8C, };
24835-
static const uint8_t patchBuf841[] { 0xA0, 0x8C, };
24834+
static const uint8_t patchBuf840[] { 0x56, 0x3B, };
24835+
static const uint8_t patchBuf841[] { 0x04, 0x0F, };
2483624836
static const KextPatch patches64[] {
2483724837
{ { &kextList[0], patchBuf840, patchBuf841, 2, 4 }, 13, KernelPatcher::KernelAny },
2483824838
};
24839-
static const uint8_t patchBuf842[] { 0x0C, 0x0A, 0x00, 0x00, };
24840-
static const uint8_t patchBuf843[] { 0x0C, 0x0C, 0x00, 0x00, };
24841-
static const uint8_t patchBuf844[] { 0x0B, 0x0C, 0x00, 0x00, };
24839+
static const uint8_t patchBuf842[] { 0x20, 0x8C, };
24840+
static const uint8_t patchBuf843[] { 0xA0, 0x8C, };
24841+
static const KextPatch patches65[] {
24842+
{ { &kextList[0], patchBuf842, patchBuf843, 2, 4 }, 13, KernelPatcher::KernelAny },
24843+
};
24844+
static const uint8_t patchBuf844[] { 0x0C, 0x0A, 0x00, 0x00, };
2484224845
static const uint8_t patchBuf845[] { 0x0C, 0x0C, 0x00, 0x00, };
24843-
static const uint8_t patchBuf846[] { 0x3D, 0x0C, 0x0A, 0x00, 0x00, };
24844-
static const uint8_t patchBuf847[] { 0x3D, 0x0C, 0x0C, 0x00, 0x00, };
24845-
static const uint8_t patchBuf848[] { 0x3D, 0x0B, 0x0C, 0x00, 0x00, };
24846+
static const uint8_t patchBuf846[] { 0x0B, 0x0C, 0x00, 0x00, };
24847+
static const uint8_t patchBuf847[] { 0x0C, 0x0C, 0x00, 0x00, };
24848+
static const uint8_t patchBuf848[] { 0x3D, 0x0C, 0x0A, 0x00, 0x00, };
2484624849
static const uint8_t patchBuf849[] { 0x3D, 0x0C, 0x0C, 0x00, 0x00, };
24847-
static const uint8_t patchBuf850[] { 0x3D, 0x0C, 0x0A, 0x00, 0x00, };
24850+
static const uint8_t patchBuf850[] { 0x3D, 0x0B, 0x0C, 0x00, 0x00, };
2484824851
static const uint8_t patchBuf851[] { 0x3D, 0x0C, 0x0C, 0x00, 0x00, };
24849-
static const KextPatch patches65[] {
24850-
{ { &kextList[0], patchBuf842, patchBuf843, 4, 4 }, 13, 13 },
24851-
{ { &kextList[0], patchBuf844, patchBuf845, 4, 2 }, 13, 13 },
24852-
{ { &kextList[0], patchBuf846, patchBuf847, 5, 3 }, 14, 14 },
24853-
{ { &kextList[0], patchBuf848, patchBuf849, 5, 1 }, 14, 14 },
24854-
{ { &kextList[0], patchBuf850, patchBuf851, 5, 5 }, 15, KernelPatcher::KernelAny },
24855-
};
24856-
static const uint8_t patchBuf852[] { 0x20, 0x8C, };
24857-
static const uint8_t patchBuf853[] { 0x20, 0x8D, };
24852+
static const uint8_t patchBuf852[] { 0x3D, 0x0C, 0x0A, 0x00, 0x00, };
24853+
static const uint8_t patchBuf853[] { 0x3D, 0x0C, 0x0C, 0x00, 0x00, };
2485824854
static const KextPatch patches66[] {
24859-
{ { &kextList[0], patchBuf852, patchBuf853, 2, 4 }, 13, KernelPatcher::KernelAny },
24860-
};
24861-
static const uint8_t patchBuf854[] { 0x01, 0x05, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x02, 0x04, 0x0A, 0x00, 0x00, 0x04, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x03, 0x06, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, };
24862-
static const uint8_t patchBuf855[] { 0x01, 0x05, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x02, 0x04, 0x0A, 0x00, 0x00, 0x08, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x03, 0x06, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, };
24855+
{ { &kextList[0], patchBuf844, patchBuf845, 4, 4 }, 13, 13 },
24856+
{ { &kextList[0], patchBuf846, patchBuf847, 4, 2 }, 13, 13 },
24857+
{ { &kextList[0], patchBuf848, patchBuf849, 5, 3 }, 14, 14 },
24858+
{ { &kextList[0], patchBuf850, patchBuf851, 5, 1 }, 14, 14 },
24859+
{ { &kextList[0], patchBuf852, patchBuf853, 5, 5 }, 15, KernelPatcher::KernelAny },
24860+
};
24861+
static const uint8_t patchBuf854[] { 0x20, 0x8C, };
24862+
static const uint8_t patchBuf855[] { 0x20, 0x8D, };
2486324863
static const KextPatch patches67[] {
24864-
{ { &kextList[1], patchBuf854, patchBuf855, 36, 1 }, 14, KernelPatcher::KernelAny },
24864+
{ { &kextList[0], patchBuf854, patchBuf855, 2, 4 }, 13, KernelPatcher::KernelAny },
2486524865
};
24866-
static const uint8_t patchBuf856[] { 0x02, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x04, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, };
24867-
static const uint8_t patchBuf857[] { 0x02, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x04, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, };
24866+
static const uint8_t patchBuf856[] { 0x01, 0x05, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x02, 0x04, 0x0A, 0x00, 0x00, 0x04, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x03, 0x06, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, };
24867+
static const uint8_t patchBuf857[] { 0x01, 0x05, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x02, 0x04, 0x0A, 0x00, 0x00, 0x08, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x03, 0x06, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, };
2486824868
static const KextPatch patches68[] {
24869-
{ { &kextList[3], patchBuf856, patchBuf857, 36, 1 }, 13, KernelPatcher::KernelAny },
24869+
{ { &kextList[1], patchBuf856, patchBuf857, 36, 1 }, 14, KernelPatcher::KernelAny },
2487024870
};
24871-
static const uint8_t patchBuf858[] { 0x02, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, };
24872-
static const uint8_t patchBuf859[] { 0x02, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, };
24871+
static const uint8_t patchBuf858[] { 0x02, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x04, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, };
24872+
static const uint8_t patchBuf859[] { 0x02, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x04, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, };
2487324873
static const KextPatch patches69[] {
24874-
{ { &kextList[3], patchBuf858, patchBuf859, 24, 4 }, 13, KernelPatcher::KernelAny },
24874+
{ { &kextList[3], patchBuf858, patchBuf859, 36, 1 }, 13, KernelPatcher::KernelAny },
2487524875
};
2487624876
static const uint8_t patchBuf860[] { 0x02, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, };
2487724877
static const uint8_t patchBuf861[] { 0x02, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, };
2487824878
static const KextPatch patches70[] {
2487924879
{ { &kextList[3], patchBuf860, patchBuf861, 24, 4 }, 13, KernelPatcher::KernelAny },
2488024880
};
24881+
static const uint8_t patchBuf862[] { 0x02, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, };
24882+
static const uint8_t patchBuf863[] { 0x02, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, };
24883+
static const KextPatch patches71[] {
24884+
{ { &kextList[3], patchBuf862, patchBuf863, 24, 4 }, 13, KernelPatcher::KernelAny },
24885+
};
2488124886
ControllerModInfo controllerMod[] {
24882-
{ "Z97 HDEF controller", 0x8086, 0x8CA0, nullptr, 0, ControllerModInfo::PlatformAny, IOUtil::ComputerModel::ComputerAny, patches64, 1 },
24883-
{ "HD4600 controller", 0x8086, 0xC0C, nullptr, 0, ControllerModInfo::PlatformAny, IOUtil::ComputerModel::ComputerAny, patches65, 5 },
24884-
{ "X99 HDEF controller", 0x8086, 0x8D20, nullptr, 0, ControllerModInfo::PlatformAny, IOUtil::ComputerModel::ComputerAny, patches66, 1 },
24885-
{ "Intel HD4600 HDMI (ig-platform-id 0x0d220003)", 0x8086, 0x412, nullptr, 0, 220332035, IOUtil::ComputerModel::ComputerDesktop, patches67, 1 },
24886-
{ "Intel HD4000 HDMI (ig-platform-id 0x01660003)", 0x8086, 0x166, nullptr, 0, 23461891, IOUtil::ComputerModel::ComputerLaptop, patches68, 1 },
24887-
{ "Intel HD4000 HDMI (ig-platform-id 0x01660009)", 0x8086, 0x166, nullptr, 0, 23461897, IOUtil::ComputerModel::ComputerLaptop, patches69, 1 },
24888-
{ "Intel HD4000 HDMI (ig-platform-id 0x0166000A) Desktop only", 0x8086, 0x166, nullptr, 0, 23461898, IOUtil::ComputerModel::ComputerDesktop, patches70, 1 },
24887+
{ "Atom Z36xxx/Z37xxx Audio Controller", 0x8086, 0xF04, nullptr, 0, ControllerModInfo::PlatformAny, IOUtil::ComputerModel::ComputerAny, patches64, 1 },
24888+
{ "Z97 HDEF controller", 0x8086, 0x8CA0, nullptr, 0, ControllerModInfo::PlatformAny, IOUtil::ComputerModel::ComputerAny, patches65, 1 },
24889+
{ "HD4600 controller", 0x8086, 0xC0C, nullptr, 0, ControllerModInfo::PlatformAny, IOUtil::ComputerModel::ComputerAny, patches66, 5 },
24890+
{ "X99 HDEF controller", 0x8086, 0x8D20, nullptr, 0, ControllerModInfo::PlatformAny, IOUtil::ComputerModel::ComputerAny, patches67, 1 },
24891+
{ "Intel HD4600 HDMI (ig-platform-id 0x0d220003)", 0x8086, 0x412, nullptr, 0, 220332035, IOUtil::ComputerModel::ComputerDesktop, patches68, 1 },
24892+
{ "Intel HD4000 HDMI (ig-platform-id 0x01660003)", 0x8086, 0x166, nullptr, 0, 23461891, IOUtil::ComputerModel::ComputerLaptop, patches69, 1 },
24893+
{ "Intel HD4000 HDMI (ig-platform-id 0x01660009)", 0x8086, 0x166, nullptr, 0, 23461897, IOUtil::ComputerModel::ComputerLaptop, patches70, 1 },
24894+
{ "Intel HD4000 HDMI (ig-platform-id 0x0166000A) Desktop only", 0x8086, 0x166, nullptr, 0, 23461898, IOUtil::ComputerModel::ComputerDesktop, patches71, 1 },
2488924895
};
2489024896

24891-
const size_t controllerModSize {7};
24897+
const size_t controllerModSize {8};

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ AppleALC Changelog
1313
- Changed ALC898 layout-id 12 to 28 due to compatibility issue
1414
- Fixed ALC275 macOS 10.12 compatibility issue
1515
- Added ALC255 layout-id 28 for Lenovo B470 by vusun123
16+
- Added Atom Z36xxx/Z37xxx Audio Controller support
1617

1718
#### v1.0.15
1819
- Added macOS 10.12 to the list of supported systems

Resources/Controllers.plist

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<array>
5+
<dict>
6+
<key>Device</key>
7+
<integer>3844</integer>
8+
<key>Name</key>
9+
<string>Atom Z36xxx/Z37xxx Audio Controller</string>
10+
<key>Patches</key>
11+
<array>
12+
<dict>
13+
<key>Count</key>
14+
<integer>4</integer>
15+
<key>Find</key>
16+
<data>Vjs=</data>
17+
<key>MinKernel</key>
18+
<integer>13</integer>
19+
<key>Name</key>
20+
<string>AppleHDAController</string>
21+
<key>Replace</key>
22+
<data>BA8=</data>
23+
</dict>
24+
</array>
25+
<key>Vendor</key>
26+
<string>Intel</string>
27+
</dict>
528
<dict>
629
<key>Device</key>
730
<integer>36000</integer>

0 commit comments

Comments
 (0)