diff --git a/ALCPlugFix.xcodeproj/project.pbxproj b/ALCPlugFix.xcodeproj/project.pbxproj index 0caa94b..4064b50 100644 --- a/ALCPlugFix.xcodeproj/project.pbxproj +++ b/ALCPlugFix.xcodeproj/project.pbxproj @@ -29,7 +29,10 @@ 4CE328351DCA9A59002A53ED /* ALCPlugFix */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ALCPlugFix; sourceTree = BUILT_PRODUCTS_DIR; }; 4CE328381DCA9A59002A53ED /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; D96BFF009CB392050D064A88 /* README.MD */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.MD; sourceTree = ""; }; - DFD18AC8239F002300E9DD63 /* alc_fix */ = {isa = PBXFileReference; lastKnownFileType = folder; path = alc_fix; sourceTree = ""; }; + DF72946424AA7A4B005B9AA5 /* good.win.ALCPlugFix.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = good.win.ALCPlugFix.plist; sourceTree = ""; }; + DF72946524AA7A50005B9AA5 /* hda-verb */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = "hda-verb"; sourceTree = ""; }; + DF72946624AA7A53005B9AA5 /* install.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = install.sh; sourceTree = ""; }; + DF72946724AA7A56005B9AA5 /* uninstall.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = uninstall.sh; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -55,11 +58,14 @@ 4CE3282C1DCA9A59002A53ED = { isa = PBXGroup; children = ( - DFD18AC8239F002300E9DD63 /* alc_fix */, 4CE328371DCA9A59002A53ED /* ALCPlugFix */, 4CE328361DCA9A59002A53ED /* Products */, 4C761DB222710250004042C9 /* Frameworks */, D96BFF009CB392050D064A88 /* README.MD */, + DF72946424AA7A4B005B9AA5 /* good.win.ALCPlugFix.plist */, + DF72946524AA7A50005B9AA5 /* hda-verb */, + DF72946624AA7A53005B9AA5 /* install.sh */, + DF72946724AA7A56005B9AA5 /* uninstall.sh */, ); sourceTree = ""; }; diff --git a/ALCPlugFix/main.m b/ALCPlugFix/main.m index 0f909b6..32dbee5 100644 --- a/ALCPlugFix/main.m +++ b/ALCPlugFix/main.m @@ -134,7 +134,6 @@ void sigHandler(int signo) void fixAudio(){ NSLog(@"Fixing..."); NSString *output1 = [[binPrefix stringByAppendingString:@"hda-verb 0x1a SET_PIN_WIDGET_CONTROL 0x24"] runAsCommand]; - NSString *output2 = [[binPrefix stringByAppendingString:@"hda-verb 0x15 SET_UNSOLICITED_ENABLE 0x83"] runAsCommand]; } @@ -144,7 +143,7 @@ void fixAudio(){ int main(int argc, const char * argv[]) { @autoreleasepool { - NSLog(@"ALCPlugFix v1.6"); + NSLog(@"ALCPlugFix v1.7"); keepRunning = false; binPrefix = @""; diff --git a/alc_fix/ALCPlugFix b/alc_fix/ALCPlugFix deleted file mode 100755 index 9ce8079..0000000 Binary files a/alc_fix/ALCPlugFix and /dev/null differ diff --git a/alc_fix/uninstall.sh b/alc_fix/uninstall.sh deleted file mode 100755 index 456d0c0..0000000 --- a/alc_fix/uninstall.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -echo "Uninstalling ALCPlugFix. Root user is required." - -# check if the root filesystem is writeable (starting with macOS 10.15 Catalina, the root filesystem is read-only by default) -if sudo test ! -w "/"; then - echo "Root filesystem is not writeable. Remounting as read-write and restarting Finder." - sudo mount -uw / - sudo killall Finder -fi - -sudo rm /usr/bin/ALCPlugFix -sudo rm /usr/bin/hda-verb -sudo launchctl unload -w /Library/LaunchDaemons/good.win.ALCPlugFix.plist -sudo launchctl remove good.win.ALCPlugFix -sudo rm /Library/LaunchDaemons/good.win.ALCPlugFix.plist -sudo rm /usr/local/bin/ALCPlugFix -sudo rm /usr/local/bin/hda-verb - -echo "Done!" -exit 0 diff --git a/alc_fix/good.win.ALCPlugFix.plist b/good.win.ALCPlugFix.plist similarity index 100% rename from alc_fix/good.win.ALCPlugFix.plist rename to good.win.ALCPlugFix.plist diff --git a/alc_fix/hda-verb b/hda-verb similarity index 100% rename from alc_fix/hda-verb rename to hda-verb diff --git a/alc_fix/install.sh b/install.sh similarity index 96% rename from alc_fix/install.sh rename to install.sh index 6bfee81..41a72eb 100755 --- a/alc_fix/install.sh +++ b/install.sh @@ -6,7 +6,7 @@ DAEMON_FILE=good.win.ALCPlugFix.plist VERB_FILE=hda-verb FIX_FILE=ALCPlugFix -echo "Installing ALCPlugFix v1.6" +echo "Installing ALCPlugFix v1.7" # check if the directory "usr/local/bin" exist, if not then create the directory diff --git a/uninstall.sh b/uninstall.sh new file mode 100755 index 0000000..1150069 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +echo "Uninstalling ALCPlugFix. Root user is required." + +sudo rm /usr/local/bin/ALCPlugFix +sudo rm /usr/local/bin/hda-verb +sudo launchctl unload -w /Library/LaunchDaemons/good.win.ALCPlugFix.plist +sudo launchctl remove good.win.ALCPlugFix +sudo rm /Library/LaunchDaemons/good.win.ALCPlugFix.plist + +echo "Done!" +exit 0