Menchen / ALCPlugFix

An updated version of ALCPlugFix for daliansky/XiaoMi-Pro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ALCPlugFix

This is a improved version of ALCPlugFix from goodwin.

The original and this fork trie to fix headphone audio power state issue in non Apple sound card in macOS.

The improvement include:

  • Refactor
  • Add listener when sleep/wake
  • Fix on sleep wake
  • Let you choose hda-verb so it don't need be in $PATH
  • Enable launching as LauchDaemon
  • Bug fix

Install

By default it's code command is for Mi notebook pro, you may need to change that in fixAudio function.

Running sh ./install.sh will install to /user/local/bin.

By default it search hda-verb in current work directory, if not found it will search in $PATH (May not work when it is running from LaunchDaemon because it is using as root).

Build

xcodebuild -target ALCPlugFix

Debug

Add following to launchDaemon file to log to /tmp/ALCPlugFix.log, (or use log stream)

	<key>StandardOutPath</key>
	<string>/tmp/ALCPlugFix.log</string>
	<key>StandardErrorPath</key>
	<string>/tmp/ALCPlugFix.log</string>

About

An updated version of ALCPlugFix for daliansky/XiaoMi-Pro


Languages

Language:Objective-C 91.1%Language:Shell 8.9%