-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix Headphones buzzing noise
- Loading branch information
Showing
14 changed files
with
786 additions
and
8 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?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>good.win.ALCPlugFix</string> | ||
<key>ProgramArguments</key> | ||
<array> | ||
<string>/usr/local/bin/ALCPlugFix</string> | ||
</array> | ||
<key>RunAtLoad</key> | ||
<true/> | ||
<key>ServiceIPC</key> | ||
<false/> | ||
<!--Shuold be directory that hda-verb at--> | ||
<key>WorkingDirectory</key> | ||
<string>/usr/local/bin/</string> | ||
</dict> | ||
</plist> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
DAEMON_PATH=/Library/LaunchDaemons/ | ||
BIN_PATH=/usr/local/bin/ | ||
DAEMON_FILE=good.win.ALCPlugFix.plist | ||
VERB_FILE=hda-verb | ||
FIX_FILE=ALCPlugFix | ||
|
||
echo "Installing ALCPlugFix v1.7" | ||
|
||
# check if the directory "usr/local/bin" exist, if not then create the directory | ||
|
||
if [ ! -d "$BIN_PATH" ] ; then | ||
mkdir "$BIN_PATH" ; | ||
fi | ||
|
||
# stop the daemon if it's already running | ||
if sudo launchctl list | grep --quiet ALCPlugFix; then | ||
echo "Stopping existing ALCPlugFix daemon." | ||
sudo launchctl unload $DAEMON_PATH$DAEMON_FILE | ||
fi | ||
|
||
# copy over the files to their respective locations (overwrite automatically if files exist) | ||
|
||
sudo cp -f ALCPlugFix $BIN_PATH | ||
sudo cp -f hda-verb $BIN_PATH | ||
sudo cp -f good.win.ALCPlugFix.plist $DAEMON_PATH | ||
|
||
# set permissions and ownership | ||
sudo chmod 755 $BIN_PATH$FIX_FILE | ||
sudo chown $USER:admin $BIN_PATH$FIX_FILE | ||
sudo chmod 755 $BIN_PATH$VERB_FILE | ||
sudo chown $USER:admin $BIN_PATH$VERB_FILE | ||
sudo chmod 644 $DAEMON_PATH$DAEMON_FILE | ||
sudo chown root:wheel $DAEMON_PATH$DAEMON_FILE | ||
|
||
# load and start the daemon | ||
sudo launchctl load -w $DAEMON_PATH$DAEMON_FILE | ||
|
||
echo "Done!" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.