Skip to content

Commit

Permalink
update to OC 0.6.6, multiple acpi table files, combojac v1 with popup…
Browse files Browse the repository at this point in the history
…, combojack v2 no popup
  • Loading branch information
Juan-VC committed Feb 15, 2021
1 parent f846703 commit 857cd66
Show file tree
Hide file tree
Showing 169 changed files with 7,304 additions and 1,224 deletions.
Binary file modified BOOT/BOOTx64.efi
Binary file not shown.
4 changes: 4 additions & 0 deletions ComboJack/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ComboJack_Source/build/
VerbStub_Source/build/
.DS_Store
*.tmproj
Binary file added ComboJack/ComboJack_Installer_v1/ComboJack
Binary file not shown.
Binary file added ComboJack/ComboJack_Installer_v1/Headphone.icns
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/bin/bash

# Clean legacy stuff
if [[ $EUID -ne 0 ]];
then
exec sudo /bin/bash "$0" "$@"
fi

cd "$( dirname "${BASH_SOURCE[0]}" )"

# Clean legacy stuff
#
sudo launchctl unload /Library/LaunchDaemons/com.XPS.ComboJack.plist 2>/dev/null
sudo rm -rf /Library/Extensions/CodecCommander.kext
sudo rm -f /usr/local/bin/ALCPlugFix
Expand All @@ -11,14 +18,14 @@ sudo rm -f /usr/local/sbin/hda-verb
sudo rm -f /usr/local/share/ComboJack/Headphone.icns
sudo rm -f /usr/local/share/ComboJack/l10n.json

# install
echo -e "Fixing 3.5mm crackling noise"

# install
sudo mkdir -p /usr/local/sbin
sudo cp ComboJack /usr/local/sbin
sudo chmod 755 /usr/local/sbin/ComboJack
sudo chown root:wheel /usr/local/sbin/ComboJack
sudo cp hda-verb /usr/local/sbin
#sudo chmod 755 /usr/local/sbin/hda-verb
#sudo chown root:wheel /usr/local/sbin/hda-verb
sudo mkdir -p /usr/local/share/ComboJack/
sudo cp Headphone.icns /usr/local/share/ComboJack/
sudo chmod 644 /usr/local/share/ComboJack/Headphone.icns
Expand All @@ -28,6 +35,16 @@ sudo cp com.XPS.ComboJack.plist /Library/LaunchDaemons/
sudo chmod 644 /Library/LaunchDaemons/com.XPS.ComboJack.plist
sudo chown root:wheel /Library/LaunchDaemons/com.XPS.ComboJack.plist
sudo launchctl load /Library/LaunchDaemons/com.XPS.ComboJack.plist

echo "Done!"
echo
echo "Install successfully!"
echo "Please reboot! Also, it may be a good idea to turn off \"Use"
echo "ambient noise reduction\" when using an input method other than"
echo "the internal mic (meaning line-in, headset mic). As always: YMMV."
echo
echo "You can check to see if the watcher is working in the IORegistry:"
echo "there should be a device named \"VerbStubUserClient\" attached to"
echo "\"com_XPS_SetVerb\" somewhere within the \"HDEF\" entry's hierarchy."
echo
echo "Enjoy!"
echo
exit 0
26 changes: 26 additions & 0 deletions ComboJack/ComboJack_Installer_v1/l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"zh_CN": {
"dialogTitle" : "耳机接入通知",
"dialogMsg" : "请选择接入的设备类型(按ESC键取消)",
"btnHeadphone" : "耳机",
"btnLinein" : "线路输入",
"btnHeadset" : "耳麦",
"btnCancel" : "取消"
},
"en_US": {
"dialogTitle" : "Combo Jack Selection",
"dialogMsg" : "Select your device type (Press ESC to cancel)",
"btnHeadphone" : "Headphones",
"btnLinein" : "Line-In",
"btnHeadset" : "Headset",
"btnCancel" : "Cancel"
},
"vi_VN": {
"dialogTitle" : "Thông báo cắm tai nghe",
"dialogMsg" : "Lựa chọn loại thiết bị được cắm vào? (Bấm ESC để huỷ)",
"btnHeadphone" : "Tai nghe thường",
"btnLinein" : "Microphone",
"btnHeadset" : "Tai nghe có mic",
"btnCancel" : "Huỷ"
}
}
Binary file added ComboJack/ComboJack_Installer_v2/ComboJack
Binary file not shown.
Binary file added ComboJack/ComboJack_Installer_v2/Headphone.icns
Binary file not shown.
20 changes: 20 additions & 0 deletions ComboJack/ComboJack_Installer_v2/Information.rtf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Verdana;}
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red255\green255\blue255;\red17\green90\blue209;
}
{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;\cssrgb\c100000\c100000\c100000;\cssrgb\c5882\c44706\c85490;
}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0

\f0\fs24 \cf0 Modified ComboJack binary for ALC295 Dell Inspiron 7590/7591 by SaintNo\
\
Based on the idea of
\f1 \cf2 \cb3 \expnd0\expndtw0\kerning0
\'a0{\field{\*\fldinst{HYPERLINK "https://github.com/goodwin/ALCPlugFix"}}{\fldrslt \cf4 \ul \ulc4 https://github.com/goodwin/ALCPlugFix}}\
Implemented by way of porting hda-verb from alsa-tools:\
{\field{\*\fldinst{HYPERLINK "https://www.alsa-project.org/main/index.php/Main_Page"}}{\fldrslt https://www.alsa-project.org/main/index.php/Main_Page}}\
\
Portions of code adapted from CodecCommander ({\field{\*\fldinst{HYPERLINK "https://github.com/RehabMan/EAPD-Codec-Commander"}}{\fldrslt https://github.com/RehabMan/EAPD-Codec-Commander}}) and the Linux kernel ({\field{\*\fldinst{HYPERLINK "https://github.com/torvalds/linux"}}{\fldrslt https://github.com/torvalds/linux}}). All copyrights belong to their respective owners.\
\
Uses layout-id 77. VerbStub.kext goes into EFI/Clover/kexts/Other.}
339 changes: 339 additions & 0 deletions ComboJack/ComboJack_Installer_v2/LICENSE

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions ComboJack/ComboJack_Installer_v2/VerbStub.kext/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>20D64</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>VerbStub</string>
<key>CFBundleIdentifier</key>
<string>com.XPS.VerbStub</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>VerbStub</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.0.3</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.0.3</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12D4e</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>11.1</string>
<key>DTSDKBuild</key>
<string>20C63</string>
<key>DTSDKName</key>
<string>macosx11.1</string>
<key>DTXcode</key>
<string>1240</string>
<key>DTXcodeBuild</key>
<string>12D4e</string>
<key>IOKitPersonalities</key>
<dict>
<key>VerbStub</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.XPS.VerbStub</string>
<key>IOClass</key>
<string>com_XPS_VerbStub</string>
<key>IOMatchCategory</key>
<string>com_XPS_VerbStub</string>
<key>IOProviderClass</key>
<string>IOHDACodecFunction</string>
<key>IOUserClientClass</key>
<string>VerbStubUserClient</string>
</dict>
<key>VerbStubResidency</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.XPS.VerbStub</string>
<key>IOClass</key>
<string>VerbStubResidency</string>
<key>IOMatchCategory</key>
<string>VerbStubResidency</string>
<key>IOProviderClass</key>
<string>IOResources</string>
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017 VerbStub. All rights reserved.</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOPCIFamily</key>
<string>2.9</string>
<key>com.apple.kpi.iokit</key>
<string>16.6</string>
<key>com.apple.kpi.libkern</key>
<string>16.6</string>
</dict>
</dict>
</plist>
Binary file not shown.
File renamed without changes.
18 changes: 18 additions & 0 deletions ComboJack/ComboJack_Installer_v2/com.XPS.ComboJack.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.XPS.ComboJack</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/sbin/ComboJack</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>
Binary file not shown.
50 changes: 50 additions & 0 deletions ComboJack/ComboJack_Installer_v2/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

if [[ $EUID -ne 0 ]];
then
exec sudo /bin/bash "$0" "$@"
fi

cd "$( dirname "${BASH_SOURCE[0]}" )"

# Clean legacy stuff
#
sudo launchctl unload /Library/LaunchDaemons/com.XPS.ComboJack.plist 2>/dev/null
sudo rm -rf /Library/Extensions/CodecCommander.kext
sudo rm -f /usr/local/bin/ALCPlugFix
sudo rm -f /Library/LaunchAgents/good.win.ALCPlugFix
sudo rm -f /Library/LaunchDaemons/good.win.ALCPlugFix
sudo rm -f /usr/local/sbin/hda-verb
sudo rm -f /usr/local/share/ComboJack/Headphone.icns
sudo rm -f /usr/local/share/ComboJack/l10n.json

# install
sudo mkdir -p /usr/local/sbin
sudo cp ComboJack /usr/local/sbin
sudo chmod 755 /usr/local/sbin/ComboJack
sudo chown root:wheel /usr/local/sbin/ComboJack
sudo cp hda-verb /usr/local/sbin
#sudo chmod 755 /usr/local/sbin/hda-verb
#sudo chown root:wheel /usr/local/sbin/hda-verb
sudo mkdir -p /usr/local/share/ComboJack/
sudo cp Headphone.icns /usr/local/share/ComboJack/
sudo chmod 644 /usr/local/share/ComboJack/Headphone.icns
sudo cp l10n.json /usr/local/share/ComboJack/
sudo chmod 644 /usr/local/share/ComboJack/l10n.json
sudo cp com.XPS.ComboJack.plist /Library/LaunchDaemons/
sudo chmod 644 /Library/LaunchDaemons/com.XPS.ComboJack.plist
sudo chown root:wheel /Library/LaunchDaemons/com.XPS.ComboJack.plist
sudo launchctl load /Library/LaunchDaemons/com.XPS.ComboJack.plist
echo
echo "Install successfully!"
echo "Please reboot! Also, it may be a good idea to turn off \"Use"
echo "ambient noise reduction\" when using an input method other than"
echo "the internal mic (meaning line-in, headset mic). As always: YMMV."
echo
echo "You can check to see if the watcher is working in the IORegistry:"
echo "there should be a device named \"VerbStubUserClient\" attached to"
echo "\"com_XPS_SetVerb\" somewhere within the \"HDEF\" entry's hierarchy."
echo
echo "Enjoy!"
echo
exit 0
26 changes: 26 additions & 0 deletions ComboJack/ComboJack_Installer_v2/l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"zh_CN": {
"dialogTitle" : "耳机接入通知",
"dialogMsg" : "请选择接入的设备类型(按ESC键取消)",
"btnHeadphone" : "耳机",
"btnLinein" : "线路输入",
"btnHeadset" : "耳麦",
"btnCancel" : "取消"
},
"en_US": {
"dialogTitle" : "Combo Jack Selection",
"dialogMsg" : "Select your device type (Press ESC to cancel)",
"btnHeadphone" : "Headphones",
"btnLinein" : "Line-In",
"btnHeadset" : "Headset",
"btnCancel" : "Cancel"
},
"vi_VN": {
"dialogTitle" : "Thông báo cắm tai nghe",
"dialogMsg" : "Lựa chọn loại thiết bị được cắm vào? (Bấm ESC để huỷ)",
"btnHeadphone" : "Tai nghe thường",
"btnLinein" : "Microphone",
"btnHeadset" : "Tai nghe có mic",
"btnCancel" : "Huỷ"
}
}
71 changes: 71 additions & 0 deletions ComboJack/ComboJack_Source/Combo Jack/PCI.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
//
// pci.h
// DPCIManager
//
// Created by PHPdev32 on 10/8/12.
// Licensed under GPLv3, full text at http://www.gnu.org/licenses/gpl-3.0.txt
//

#import <stdint.h>
#import <Foundation/Foundation.h>

@interface pciDevice : NSObject

@property uint64_t entryID;
@property NSNumber *shadowVendor;
@property NSNumber *shadowDevice;
@property NSNumber *revision;
@property NSArray *bus;
@property NSNumber *vendor;
@property NSNumber *device;
@property NSNumber *subVendor;
@property NSNumber *subDevice;
@property NSNumber *pciClassCode;
@property NSNumber *pciClass;
@property NSNumber *pciSubClass;
@property NSString *vendorString;
@property NSString *deviceString;
@property NSString *classString;
@property NSString *subClassString;
@property (readonly) NSString *fullClassString;
@property (readonly) NSString *lspciString;
@property (readonly) NSDictionary *lspciDictionary;
@property (readonly) long fullID;
@property (readonly) long fullSubID;
@property (readonly) short bdf;

+(long)nameToLong:(NSString *)name;
+(bool)isPCI:(io_service_t)service;
+(NSNumber *)grabNumber:(CFStringRef)entry forService:(io_service_t)service;
+(NSString *)grabString:(CFStringRef)entry forService:(io_service_t)service;
+(NSDictionary *)match:(pciDevice *)pci;
+(pciDevice *)create:(io_service_t)service classes:(NSMutableDictionary *)classes vendors:(NSMutableDictionary *)vendors;
+(pciDevice *)create:(io_service_t)service;
+(NSArray *)readIDs;

@end

@interface pciVendor : NSObject
@property NSString *name;
@property NSMutableDictionary *devices;
+(pciVendor *)create:(NSString *)name;
@end

@interface pciClass : NSObject
@property NSString *name;
@property NSMutableDictionary *subClasses;
+(pciClass *)create:(NSString *)name;
@end

@interface efiObject : NSObject
@property NSDictionary *properties;
@property pciDevice *device;
+(efiObject *)create:(pciDevice *)device injecting:(NSDictionary *)properties;
+(NSString *)stringWithArray:(NSArray *)array;
@end

@interface hexFormatter : NSValueTransformer
+(BOOL)allowsReverseTransformation;
+(Class)transformedValueClass;
-(id)transformedValue:(id)value;
@end
Loading

0 comments on commit 857cd66

Please sign in to comment.