Add updated files

This commit is contained in:
racka98
2021-06-13 15:01:57 +03:00
parent e3c5a79375
commit f246461a74
13 changed files with 148 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
<?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">
<array>
<dict>
<key>Comment</key>
<string>Enable combo jack mic detection</string>
<key>Enabled</key>
<true/>
<key>Node ID</key>
<string>0x1A</string>
<key>On Boot</key>
<true/>
<key>On Connect</key>
<true/>
<key>On Disconnect</key>
<false/>
<key>On Mute</key>
<false/>
<key>On Sleep</key>
<false/>
<key>On Unmute</key>
<false/>
<key>On Wake</key>
<true/>
<key>Param</key>
<string>0x24</string>
<key>Verb</key>
<string>SET_PIN_WIDGET_CONTROL</string>
</dict>
</array>
</plist>
Binary file not shown.
+28
View File
@@ -0,0 +1,28 @@
### Audio
ALCPlugFIx is required to fix static noise on headphones, however Black-Dragon74 released a Swift version that doesn't require `hda-verb`, `alc-verb` or `CodecCommander` kext.
**Note: If you are using the old non-swift alc_fix please uninstall it first;**
```bash
sh uninstall_old.sh
```
**Installation**:
- Open terminal and type following commands one by one on the listed order:
```bash
sudo spctl --master-disable`
sudo mkdir /usr/local/bin/`
cd to the ALCPlugFix dictionary`
sudo cp -R ALC3232.plist /usr/local/bin/`
./install.sh
```
- Now the installer will ask you to drop the `ALC3232.plist` into the terminal window.
- Open a new finder window and press `Shift + Cmd(Alt) + G` to open a new `go to folder:` window
- Now type: `/usr/local/bin/`
- Drag the `ALC3232.plist` from the `/usr/local/bin` folder into the terminal window and press enter.
- Done
```text
Note: Please disable the kext CodecCommander.kext from config if you're using this version of alc_fix
```
@@ -0,0 +1,19 @@
<?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.black-dragon74.ALCPlugFix</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/ALCPlugFix</string>
<string>/usr/local/bin/ALC3232.plist</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>
+77
View File
@@ -0,0 +1,77 @@
#!/bin/bash
# install.sh
# ALCPlugFix-Swift
#
# Created by Nick on 10/14/20.
#
# Get hold of actual directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
pledit=/usr/libexec/PlistBuddy
# Clean up old installs
function cleanUpOldInstall() {
# Remove codec commander based ALCPlugFix
sudo launchctl unload /Library/LaunchAgents/good.win.ALCPlugFix.plist
sudo rm -rf /Library/LaunchAgents/good.win.ALCPlugFix.plist
# Remove any existing alc-verb install
sudo launchctl unload /Library/LaunchAgents/com.black-dragon74.ALCPlugFix.plist
sudo rm -rf /Library/LaunchAgents/com.black-dragon74.ALCPlugFix.plist
}
# Function that exits with an error code and message
function abort() {
echo $1
exit 1
}
echo "** **"
echo "** Installing ALCPlugFix (AppleALC variant) **"
echo "** **"
echo ""
read -p "Please drag your config file to the terminal: " inputFile
# Verify the input file
if [[ ! -z $inputFile && -f $inputFile ]]; # If input exists and is of type 'file'
then
# Verify if it is a correct PLIST file
if /usr/bin/plutil "$inputFile" | grep -q "OK";
then
# Plist is valid, write the inputfile path to it
$pledit -c "Set ProgramArguments:1 $inputFile" ./com.black-dragon74.ALCPlugFix.plist || abort "Failed to write to launchd plist"
else
abort "The provided file is not a valid plist"
fi
else
abort "Invalid input."
fi
# Set the logs to be ~/Library/Logs
#$pledit -c "Set StandardOutPath ${HOME}/Library/Logs/alcplugfix_stdout.log" ./com.black-dragon74.ALCPlugFix.plist || abort "Failed to write STDOUT logpath to plist"
#$pledit -c "Set StandardErrorPath ${HOME}/Library/Logs/alcplugfix_stderr.log" ./com.black-dragon74.ALCPlugFix.plist || abort "Failed to write STDERR logpath to plist"
echo ""
echo "** Removing old installs **"
cleanUpOldInstall 2>/dev/null
echo "** Copying new files **"
sudo cp "$DIR/ALCPlugFix-Swift" /usr/local/bin/ALCPlugFix || abort "Failed to copy ALCPlugFix"
sudo cp "$DIR/com.black-dragon74.ALCPlugFix.plist" /Library/LaunchAgents || abort "Failed to copy launchd plist file"
echo "** Setting permissions **"
sudo chmod 755 /usr/local/bin/ALCPlugFix
sudo chmod 644 /Library/LaunchAgents/com.black-dragon74.ALCPlugFix.plist
sudo chown root:wheel /usr/local/bin/ALCPlugFix
sudo chown root:wheel /Library/LaunchAgents/com.black-dragon74.ALCPlugFix.plist
echo "** Loading launch daemon **"
sudo launchctl load /Library/LaunchAgents/com.black-dragon74.ALCPlugFix.plist
echo "** **"
echo "** All done. Enjoy! **"
echo "** **"
+12
View File
@@ -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