From f0beda6a767b6e255eb1db5fc06bf04dd947f006 Mon Sep 17 00:00:00 2001 From: WingLim <643089849@qq.com> Date: Mon, 17 May 2021 13:41:18 +0800 Subject: [PATCH 1/4] chore: custom sort order --- .chglog/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.chglog/config.yml b/.chglog/config.yml index b9173b0..7367f8e 100755 --- a/.chglog/config.yml +++ b/.chglog/config.yml @@ -12,6 +12,8 @@ options: - perf - refactor commit_groups: + sort_by: "Custom" + title_order: [feat, fix, perf, refactor] title_maps: feat: Features fix: Bug Fixes From 3846c4499b36c60e6eed601ad88edc83bbdb828f Mon Sep 17 00:00:00 2001 From: WingLim <643089849@qq.com> Date: Mon, 17 May 2021 13:41:27 +0800 Subject: [PATCH 2/4] docs: add CHANGELOG.md --- CHANGELOG.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a3f2907 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,48 @@ + + +## [v1.1.0](https://github.com/WingLim/MicFix/compare/v1.0.2...v1.1.0) (2021-05-17) + +### Features + +* Support ALC236 +* Support ALC256 +* Support ALC286 +* Support ALC288 +* Support ALC298 +* Reuseable coef config + +### Code Refactoring + +* Ommit HDAVerb argument label +* Simplify read/write/update coef + + + +## [v1.0.2](https://github.com/WingLim/MicFix/compare/v1.0.1...v1.0.2) (2021-05-16) + +### Features + +* Add uninstall action + + + +## [v1.0.1](https://github.com/WingLim/MicFix/compare/v1.0.0...v1.0.1) (2021-05-16) + +### Bug Fixes + +* Fix `install.sh` missing the `fi` + + + +## v1.0.0 (2021-05-15) + +### Features + +* Support ALC255 CTIA and OMTP Micphone +* Make some function private +* Add install script + +### Code Refactoring + +* Rename to MicFix + From fda7eb5b1e702d388f5be9336d54aedc93fa5013 Mon Sep 17 00:00:00 2001 From: WingLim <643089849@qq.com> Date: Mon, 17 May 2021 17:26:05 +0800 Subject: [PATCH 3/4] docs: add README_CN.md --- README.md | 2 ++ README_CN.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 README_CN.md diff --git a/README.md b/README.md index c131a26..a4c53df 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Fix Headset/Headphone Micphone in Hackintosh with AppleALC. +English | [中文](https://github.com/WingLim/MicFix/blob/main/README_CN.md) + ## Features - Supports headset plug/unplug. diff --git a/README_CN.md b/README_CN.md new file mode 100644 index 0000000..4af09ee --- /dev/null +++ b/README_CN.md @@ -0,0 +1,50 @@ +# MicFix + +![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/WingLim/MicFix?include_prereleases) + +使用 AppleALC 修复黑苹果上头戴耳机/耳塞的麦克风。 + +[English](https://github.com/WingLim/MicFix/blob/main/README.md) | 中文 + +## 特性 + +- 支持耳机热拔插。 +- 不需要 `CodecCommander`, `hda-verb` 或者 `alc-verb` 来驱动。 + +## 使用方法 + +注意: 需要 AppleALC 1.5.4+ 或者应用了这个 commit [61e2bbf](https://github.com/acidanthera/AppleALC/commit/61e2bbfe74bf1c12ebf770ed4a9776a04a7758f2)。 + +1. OpenCore 中启用 AppleALC。 +2. 添加 `alcverbs=1` 到 NVRAM->`7C436110-AB2A-4BBB-A880-FE41995C9F82`->`boot-args` 来启用 `alcverbs`。 +3. 下载最新的发布版,并解压。 + +### 安装 + +```bash +bash install.sh +``` + +### 卸载 + +```bash +bash install.sh uninstall +``` + +## 支持的设备 + +修复麦克风的 hda-verb 命令来自 [patch_realtek.c](https://github.com/torvalds/linux/blob/master/sound/pci/hda/patch_realtek.c),但因为缺少设备,只有一部分在 MacOS 上测试过。 + +如果有人能帮忙测试这些设备,我们将会十分感谢。 + +- ALC236 +- ALC255[已测试] +- ALC256 +- ALC286 +- ALC288 +- ALC298 + +## 感谢 + +- [patch_realtek.c](https://github.com/torvalds/linux/blob/master/sound/pci/hda/patch_realtek.c) 提供了绝大多数的 hda-verb 命令。 +- [ComboJack](https://github.com/hackintosh-stuff/ComboJack) 为本项目提供了灵感。 From a8231f148b676b98fb8077def1eba56d65fdf57c Mon Sep 17 00:00:00 2001 From: WingLim <643089849@qq.com> Date: Mon, 17 May 2021 20:20:12 +0800 Subject: [PATCH 4/4] refactor: remove extra 0 --- MicFix/MicFix.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MicFix/MicFix.swift b/MicFix/MicFix.swift index 51c2cbf..a132f47 100644 --- a/MicFix/MicFix.swift +++ b/MicFix/MicFix.swift @@ -301,7 +301,7 @@ class MicFix { var val: Int32 = 0 let coef0255: [coef] = [ - writeCoef(0x45, 0x0d089), + writeCoef(0x45, 0xd089), writeCoef(0x49, 0x0149) ] @@ -387,7 +387,7 @@ class MicFix { let coef0255: [coef] = [ writeCoef(0x1b, 0x0c0b), - writeCoef(0x45, 0x0d089), + writeCoef(0x45, 0xd089), updateCoefEX(0x57, 0x05, 1<<14, 0), writeCoef(0x06, 0x06104), writeCoefEX(0x57, 0x03, 0x8aa6)