diff --git a/AGDPfix-2.app/Contents/Info.plist b/AGDPfix-2.app/Contents/Info.plist new file mode 100755 index 0000000..dfa9711 --- /dev/null +++ b/AGDPfix-2.app/Contents/Info.plist @@ -0,0 +1,52 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + English + CFBundleExecutable + applet + CFBundleIconFile + applet + CFBundleIdentifier + com.apple.ScriptEditor.id.SafeSleep + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + AGDPfix + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.1 + CFBundleSignature + aplt + LSMinimumSystemVersionByArchitecture + + x86_64 + 10.6 + + LSRequiresCarbon + + WindowState + + bundleDividerCollapsed + + bundlePositionOfDivider + 0.0 + dividerCollapsed + + eventLogLevel + 2 + name + ScriptWindowState + positionOfDivider + 726 + savedFrame + 630 202 1256 935 0 0 1920 1177 + selectedTab + description + + + diff --git a/AGDPfix-2.app/Contents/MacOS/applet b/AGDPfix-2.app/Contents/MacOS/applet new file mode 100755 index 0000000..694474c Binary files /dev/null and b/AGDPfix-2.app/Contents/MacOS/applet differ diff --git a/AGDPfix-2.app/Contents/PkgInfo b/AGDPfix-2.app/Contents/PkgInfo new file mode 100755 index 0000000..3253614 --- /dev/null +++ b/AGDPfix-2.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPLaplt \ No newline at end of file diff --git a/AGDPfix-2.app/Contents/Resources/Scripts/main.scpt b/AGDPfix-2.app/Contents/Resources/Scripts/main.scpt new file mode 100755 index 0000000..6959f7b Binary files /dev/null and b/AGDPfix-2.app/Contents/Resources/Scripts/main.scpt differ diff --git a/AGDPfix-2.app/Contents/Resources/applet.icns b/AGDPfix-2.app/Contents/Resources/applet.icns new file mode 100644 index 0000000..e7c254c Binary files /dev/null and b/AGDPfix-2.app/Contents/Resources/applet.icns differ diff --git a/AGDPfix-2.app/Contents/Resources/applet.rsrc b/AGDPfix-2.app/Contents/Resources/applet.rsrc new file mode 100755 index 0000000..a95cb38 Binary files /dev/null and b/AGDPfix-2.app/Contents/Resources/applet.rsrc differ diff --git a/AGDPfix-2.app/Contents/Resources/description.rtfd/TXT.rtf b/AGDPfix-2.app/Contents/Resources/description.rtfd/TXT.rtf new file mode 100755 index 0000000..75cdc4c --- /dev/null +++ b/AGDPfix-2.app/Contents/Resources/description.rtfd/TXT.rtf @@ -0,0 +1,4 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1347\cocoasubrtf570 +{\fonttbl} +{\colortbl;\red255\green255\blue255;} +} \ No newline at end of file diff --git a/EFI/BOOT/BOOTIA32.efi b/EFI/BOOT/BOOTIA32.efi index 59194aa..60c0f9b 100755 Binary files a/EFI/BOOT/BOOTIA32.efi and b/EFI/BOOT/BOOTIA32.efi differ diff --git a/EFI/BOOT/BOOTX64.efi b/EFI/BOOT/BOOTX64.efi index 54d14ae..fd6da61 100755 Binary files a/EFI/BOOT/BOOTX64.efi and b/EFI/BOOT/BOOTX64.efi differ diff --git a/EFI/CLOVER/CLOVERIA32.efi b/EFI/CLOVER/CLOVERIA32.efi index 59194aa..60c0f9b 100755 Binary files a/EFI/CLOVER/CLOVERIA32.efi and b/EFI/CLOVER/CLOVERIA32.efi differ diff --git a/EFI/CLOVER/CLOVERX64.efi b/EFI/CLOVER/CLOVERX64.efi index 54d14ae..fd6da61 100755 Binary files a/EFI/CLOVER/CLOVERX64.efi and b/EFI/CLOVER/CLOVERX64.efi differ diff --git a/EFI/CLOVER/config-backup.plist b/EFI/CLOVER/config-backup.plist index 3117cc4..33ef92d 100755 --- a/EFI/CLOVER/config-backup.plist +++ b/EFI/CLOVER/config-backup.plist @@ -21,13 +21,13 @@ Signature SSDT TableId - CpuPm + Cpu0Ist Signature SSDT TableId - Cpu0Ist + CpuPm SSDT @@ -45,7 +45,7 @@ Debug DefaultVolume - LastBootedVolume + HD(3,GPT,D5816C35-5E70-402D-9ED9-551DBA6E5775,0x3A346008,0x40000) Legacy PBR Secure @@ -160,7 +160,7 @@ Comment - t1-10.9-10.11-AppleHDA/Realtek ALC892 + t1-10.9-10.12-AppleHDA/Realtek ALC892 Find ixnUEQ== @@ -172,6 +172,20 @@ kgjsEA== + + Comment + t1-AppleHDA/Resources/xml>zml + Find + + eG1sLnps + + Name + AppleHDA + Replace + + em1sLnps + + Comment change 15 port limit to 30 in AppleUSBXHCIPCI @@ -206,7 +220,7 @@ Comment - (c)Pike R. Alpha + AppleGraphicsDevicePolicy (board-id) Patch (c) Pike R. Alpha Disabled Find @@ -305,7 +319,7 @@ SystemParameters InjectKexts - Yes + YES InjectSystemID diff --git a/EFI/CLOVER/config.plist b/EFI/CLOVER/config.plist index 053885f..33ef92d 100755 --- a/EFI/CLOVER/config.plist +++ b/EFI/CLOVER/config.plist @@ -45,7 +45,7 @@ Debug DefaultVolume - LastBootedVolume + HD(3,GPT,D5816C35-5E70-402D-9ED9-551DBA6E5775,0x3A346008,0x40000) Legacy PBR Secure @@ -143,25 +143,24 @@ KernelPm KextsToPatch - - - Comment - AppleGraphicsDevicePolicy (board-id) Patch (c) Pike R. Alpha - Find - - Ym9hcmQtaWQ= - - Name - AppleGraphicsDevicePolicy - Replace - - Ym9hcmQtaXg= - - + + Comment - t1-10.9-10.11-AppleHDA/Realtek ALC892 - Disabled - + t1-10.11-AppleHDA/Realtek ALC... + Find + + gxnUEQ== + + Name + AppleHDA + Replace + + AAAAAA== + + + + Comment + t1-10.9-10.12-AppleHDA/Realtek ALC892 Find ixnUEQ== @@ -175,18 +174,16 @@ Comment - Skylake AppleAPIC Patch (c) Pike R. Alpha - Disabled - + t1-AppleHDA/Resources/xml>zml Find - wegQD7bw + eG1sLnps Name - AppleAPIC + AppleHDA Replace - vhcAAACQ + em1sLnps @@ -207,7 +204,23 @@ Comment - (c)Pike R. Alpha + 10.11-SKL530-Port_0-DP2HDMI + Disabled + + Find + + /wAAAAEAAABAAAAA + + Name + AppleIntelSKLGraphicsFramebuffer + Replace + + AAAIAAAIAACCAAAA + + + + Comment + AppleGraphicsDevicePolicy (board-id) Patch (c) Pike R. Alpha Disabled Find @@ -221,22 +234,6 @@ Ym9hcmQtaXg= - - Comment - t1-10.11-AppleHDA/Realtek ALC... - Disabled - - Find - - gxnUEQ== - - Name - AppleHDA - Replace - - AAAAAA== - - Comment External icons patch @@ -255,18 +252,18 @@ Comment - 10.11-SKL530-Port_0-DP2HDMI + Skylake AppleAPIC Patch (c) Pike R. Alpha Disabled Find - /wAAAAEAAABAAAAA + wegQD7bw Name - AppleIntelSKLGraphicsFramebuffer + AppleAPIC Replace - AAAIAAAIAACCAAAA + vhcAAACQ @@ -322,7 +319,7 @@ SystemParameters InjectKexts - Yes + YES InjectSystemID diff --git a/EFI/CLOVER/drivers64UEFI/DataHubDxe-64.efi b/EFI/CLOVER/drivers64UEFI/DataHubDxe-64.efi index 9f73eab..8df8742 100755 Binary files a/EFI/CLOVER/drivers64UEFI/DataHubDxe-64.efi and b/EFI/CLOVER/drivers64UEFI/DataHubDxe-64.efi differ diff --git a/EFI/CLOVER/drivers64UEFI/EmuVariableUefi-64.efi b/EFI/CLOVER/drivers64UEFI/EmuVariableUefi-64.efi index 47776c5..b7e06e5 100755 Binary files a/EFI/CLOVER/drivers64UEFI/EmuVariableUefi-64.efi and b/EFI/CLOVER/drivers64UEFI/EmuVariableUefi-64.efi differ diff --git a/EFI/CLOVER/drivers64UEFI/FSInject-64.efi b/EFI/CLOVER/drivers64UEFI/FSInject-64.efi index 53f40dd..6cd0ec4 100755 Binary files a/EFI/CLOVER/drivers64UEFI/FSInject-64.efi and b/EFI/CLOVER/drivers64UEFI/FSInject-64.efi differ diff --git a/EFI/CLOVER/drivers64UEFI/OsxAptioFix2Drv-64.efi b/EFI/CLOVER/drivers64UEFI/OsxAptioFix2Drv-64.efi index fdff505..7c7ecc9 100755 Binary files a/EFI/CLOVER/drivers64UEFI/OsxAptioFix2Drv-64.efi and b/EFI/CLOVER/drivers64UEFI/OsxAptioFix2Drv-64.efi differ diff --git a/EFI/CLOVER/drivers64UEFI/OsxFatBinaryDrv-64.efi b/EFI/CLOVER/drivers64UEFI/OsxFatBinaryDrv-64.efi index 7c51392..40e96f6 100755 Binary files a/EFI/CLOVER/drivers64UEFI/OsxFatBinaryDrv-64.efi and b/EFI/CLOVER/drivers64UEFI/OsxFatBinaryDrv-64.efi differ diff --git a/EFI/CLOVER/drivers64UEFI/OsxLowMemFixDrv-64.efi b/EFI/CLOVER/drivers64UEFI/OsxLowMemFixDrv-64.efi index 5f187a8..331d812 100755 Binary files a/EFI/CLOVER/drivers64UEFI/OsxLowMemFixDrv-64.efi and b/EFI/CLOVER/drivers64UEFI/OsxLowMemFixDrv-64.efi differ diff --git a/EFI/CLOVER/drivers64UEFI/PartitionDxe-64.efi b/EFI/CLOVER/drivers64UEFI/PartitionDxe-64.efi index fbf493e..a08aaf8 100755 Binary files a/EFI/CLOVER/drivers64UEFI/PartitionDxe-64.efi and b/EFI/CLOVER/drivers64UEFI/PartitionDxe-64.efi differ diff --git a/EFI/CLOVER/tools/Shell64U.efi b/EFI/CLOVER/tools/Shell64U.efi index eea6bbc..3bf6f27 100755 Binary files a/EFI/CLOVER/tools/Shell64U.efi and b/EFI/CLOVER/tools/Shell64U.efi differ diff --git a/EFI/CLOVER/tools/bdmesg-32.efi b/EFI/CLOVER/tools/bdmesg-32.efi index 5915a8f..0aaddc0 100755 Binary files a/EFI/CLOVER/tools/bdmesg-32.efi and b/EFI/CLOVER/tools/bdmesg-32.efi differ diff --git a/EFI/CLOVER/tools/bdmesg.efi b/EFI/CLOVER/tools/bdmesg.efi index fadcf07..d65df66 100755 Binary files a/EFI/CLOVER/tools/bdmesg.efi and b/EFI/CLOVER/tools/bdmesg.efi differ diff --git a/EFI/Microsoft/Boot/BCD b/EFI/Microsoft/Boot/BCD index f80d428..0670848 100755 Binary files a/EFI/Microsoft/Boot/BCD and b/EFI/Microsoft/Boot/BCD differ diff --git a/EFI/Microsoft/Boot/BCD.LOG b/EFI/Microsoft/Boot/BCD.LOG index 56a61c6..7407ed8 100755 Binary files a/EFI/Microsoft/Boot/BCD.LOG and b/EFI/Microsoft/Boot/BCD.LOG differ diff --git a/EFI/Microsoft/Boot/BOOTSTAT.DAT b/EFI/Microsoft/Boot/BOOTSTAT.DAT index e6c6b5d..2707779 100755 Binary files a/EFI/Microsoft/Boot/BOOTSTAT.DAT and b/EFI/Microsoft/Boot/BOOTSTAT.DAT differ diff --git a/EFI/Microsoft/Boot/bg-BG/bootmgfw.efi.mui b/EFI/Microsoft/Boot/bg-BG/bootmgfw.efi.mui index 1c28194..90c4922 100755 Binary files a/EFI/Microsoft/Boot/bg-BG/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/bg-BG/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/bg-BG/bootmgr.efi.mui b/EFI/Microsoft/Boot/bg-BG/bootmgr.efi.mui index ded9120..a08bd04 100755 Binary files a/EFI/Microsoft/Boot/bg-BG/bootmgr.efi.mui and b/EFI/Microsoft/Boot/bg-BG/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/cs-CZ/bootmgfw.efi.mui b/EFI/Microsoft/Boot/cs-CZ/bootmgfw.efi.mui index a809ed3..f90a139 100755 Binary files a/EFI/Microsoft/Boot/cs-CZ/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/cs-CZ/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/cs-CZ/bootmgr.efi.mui b/EFI/Microsoft/Boot/cs-CZ/bootmgr.efi.mui index e2a75e3..3f39d25 100755 Binary files a/EFI/Microsoft/Boot/cs-CZ/bootmgr.efi.mui and b/EFI/Microsoft/Boot/cs-CZ/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/da-DK/bootmgfw.efi.mui b/EFI/Microsoft/Boot/da-DK/bootmgfw.efi.mui index 36f1ecb..f36b11f 100755 Binary files a/EFI/Microsoft/Boot/da-DK/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/da-DK/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/da-DK/bootmgr.efi.mui b/EFI/Microsoft/Boot/da-DK/bootmgr.efi.mui index 3307da4..169607b 100755 Binary files a/EFI/Microsoft/Boot/da-DK/bootmgr.efi.mui and b/EFI/Microsoft/Boot/da-DK/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/de-DE/bootmgfw.efi.mui b/EFI/Microsoft/Boot/de-DE/bootmgfw.efi.mui index 457ef4e..0688fb2 100755 Binary files a/EFI/Microsoft/Boot/de-DE/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/de-DE/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/de-DE/bootmgr.efi.mui b/EFI/Microsoft/Boot/de-DE/bootmgr.efi.mui index 81d73f7..d8b77ed 100755 Binary files a/EFI/Microsoft/Boot/de-DE/bootmgr.efi.mui and b/EFI/Microsoft/Boot/de-DE/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/el-GR/bootmgfw.efi.mui b/EFI/Microsoft/Boot/el-GR/bootmgfw.efi.mui index 0f2ab84..649ac1c 100755 Binary files a/EFI/Microsoft/Boot/el-GR/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/el-GR/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/el-GR/bootmgr.efi.mui b/EFI/Microsoft/Boot/el-GR/bootmgr.efi.mui index 9f5675b..90205eb 100755 Binary files a/EFI/Microsoft/Boot/el-GR/bootmgr.efi.mui and b/EFI/Microsoft/Boot/el-GR/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/en-GB/bootmgfw.efi.mui b/EFI/Microsoft/Boot/en-GB/bootmgfw.efi.mui index e53892d..9d07ea6 100755 Binary files a/EFI/Microsoft/Boot/en-GB/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/en-GB/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/en-GB/bootmgr.efi.mui b/EFI/Microsoft/Boot/en-GB/bootmgr.efi.mui index 24c5292..23dc915 100755 Binary files a/EFI/Microsoft/Boot/en-GB/bootmgr.efi.mui and b/EFI/Microsoft/Boot/en-GB/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/en-US/bootmgfw.efi.mui b/EFI/Microsoft/Boot/en-US/bootmgfw.efi.mui index 8d5d6bf..05807fa 100755 Binary files a/EFI/Microsoft/Boot/en-US/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/en-US/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/en-US/bootmgr.efi.mui b/EFI/Microsoft/Boot/en-US/bootmgr.efi.mui index 4bb2e5a..c4e3da6 100755 Binary files a/EFI/Microsoft/Boot/en-US/bootmgr.efi.mui and b/EFI/Microsoft/Boot/en-US/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/es-ES/bootmgfw.efi.mui b/EFI/Microsoft/Boot/es-ES/bootmgfw.efi.mui index 56f17c6..2e91212 100755 Binary files a/EFI/Microsoft/Boot/es-ES/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/es-ES/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/es-ES/bootmgr.efi.mui b/EFI/Microsoft/Boot/es-ES/bootmgr.efi.mui index e080156..803abbf 100755 Binary files a/EFI/Microsoft/Boot/es-ES/bootmgr.efi.mui and b/EFI/Microsoft/Boot/es-ES/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/es-MX/bootmgfw.efi.mui b/EFI/Microsoft/Boot/es-MX/bootmgfw.efi.mui index df26d67..1a01c12 100755 Binary files a/EFI/Microsoft/Boot/es-MX/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/es-MX/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/es-MX/bootmgr.efi.mui b/EFI/Microsoft/Boot/es-MX/bootmgr.efi.mui index b29efe9..eb679f5 100755 Binary files a/EFI/Microsoft/Boot/es-MX/bootmgr.efi.mui and b/EFI/Microsoft/Boot/es-MX/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/et-EE/bootmgfw.efi.mui b/EFI/Microsoft/Boot/et-EE/bootmgfw.efi.mui index eb10633..347f428 100755 Binary files a/EFI/Microsoft/Boot/et-EE/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/et-EE/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/et-EE/bootmgr.efi.mui b/EFI/Microsoft/Boot/et-EE/bootmgr.efi.mui index 8f2ed82..31c9b96 100755 Binary files a/EFI/Microsoft/Boot/et-EE/bootmgr.efi.mui and b/EFI/Microsoft/Boot/et-EE/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/fi-FI/bootmgfw.efi.mui b/EFI/Microsoft/Boot/fi-FI/bootmgfw.efi.mui index f8ace8a..952b021 100755 Binary files a/EFI/Microsoft/Boot/fi-FI/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/fi-FI/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/fi-FI/bootmgr.efi.mui b/EFI/Microsoft/Boot/fi-FI/bootmgr.efi.mui index fb8c0f5..1aca573 100755 Binary files a/EFI/Microsoft/Boot/fi-FI/bootmgr.efi.mui and b/EFI/Microsoft/Boot/fi-FI/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/fr-CA/bootmgfw.efi.mui b/EFI/Microsoft/Boot/fr-CA/bootmgfw.efi.mui index 5c9cebc..54f887f 100755 Binary files a/EFI/Microsoft/Boot/fr-CA/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/fr-CA/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/fr-CA/bootmgr.efi.mui b/EFI/Microsoft/Boot/fr-CA/bootmgr.efi.mui index df41d84..80f16fa 100755 Binary files a/EFI/Microsoft/Boot/fr-CA/bootmgr.efi.mui and b/EFI/Microsoft/Boot/fr-CA/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/fr-FR/bootmgfw.efi.mui b/EFI/Microsoft/Boot/fr-FR/bootmgfw.efi.mui index 33370d9..c61e17f 100755 Binary files a/EFI/Microsoft/Boot/fr-FR/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/fr-FR/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/fr-FR/bootmgr.efi.mui b/EFI/Microsoft/Boot/fr-FR/bootmgr.efi.mui index ce327a7..2450038 100755 Binary files a/EFI/Microsoft/Boot/fr-FR/bootmgr.efi.mui and b/EFI/Microsoft/Boot/fr-FR/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/hr-HR/bootmgfw.efi.mui b/EFI/Microsoft/Boot/hr-HR/bootmgfw.efi.mui index 659a17c..1a1aa0e 100755 Binary files a/EFI/Microsoft/Boot/hr-HR/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/hr-HR/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/hr-HR/bootmgr.efi.mui b/EFI/Microsoft/Boot/hr-HR/bootmgr.efi.mui index fdd896e..fe35d98 100755 Binary files a/EFI/Microsoft/Boot/hr-HR/bootmgr.efi.mui and b/EFI/Microsoft/Boot/hr-HR/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/hu-HU/bootmgfw.efi.mui b/EFI/Microsoft/Boot/hu-HU/bootmgfw.efi.mui index a31736d..062e074 100755 Binary files a/EFI/Microsoft/Boot/hu-HU/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/hu-HU/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/hu-HU/bootmgr.efi.mui b/EFI/Microsoft/Boot/hu-HU/bootmgr.efi.mui index 4eab3dd..a909747 100755 Binary files a/EFI/Microsoft/Boot/hu-HU/bootmgr.efi.mui and b/EFI/Microsoft/Boot/hu-HU/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/it-IT/bootmgfw.efi.mui b/EFI/Microsoft/Boot/it-IT/bootmgfw.efi.mui index ad8345f..75d2c59 100755 Binary files a/EFI/Microsoft/Boot/it-IT/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/it-IT/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/it-IT/bootmgr.efi.mui b/EFI/Microsoft/Boot/it-IT/bootmgr.efi.mui index 1f80211..d5721f8 100755 Binary files a/EFI/Microsoft/Boot/it-IT/bootmgr.efi.mui and b/EFI/Microsoft/Boot/it-IT/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/ja-JP/bootmgfw.efi.mui b/EFI/Microsoft/Boot/ja-JP/bootmgfw.efi.mui index 174ccde..1bf2af3 100755 Binary files a/EFI/Microsoft/Boot/ja-JP/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/ja-JP/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/ja-JP/bootmgr.efi.mui b/EFI/Microsoft/Boot/ja-JP/bootmgr.efi.mui index 71ee136..a2b13af 100755 Binary files a/EFI/Microsoft/Boot/ja-JP/bootmgr.efi.mui and b/EFI/Microsoft/Boot/ja-JP/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/ko-KR/bootmgfw.efi.mui b/EFI/Microsoft/Boot/ko-KR/bootmgfw.efi.mui index 39af1c9..8719df8 100755 Binary files a/EFI/Microsoft/Boot/ko-KR/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/ko-KR/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/ko-KR/bootmgr.efi.mui b/EFI/Microsoft/Boot/ko-KR/bootmgr.efi.mui index bbb3088..b726679 100755 Binary files a/EFI/Microsoft/Boot/ko-KR/bootmgr.efi.mui and b/EFI/Microsoft/Boot/ko-KR/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/lt-LT/bootmgfw.efi.mui b/EFI/Microsoft/Boot/lt-LT/bootmgfw.efi.mui index 5a90754..b13e342 100755 Binary files a/EFI/Microsoft/Boot/lt-LT/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/lt-LT/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/lt-LT/bootmgr.efi.mui b/EFI/Microsoft/Boot/lt-LT/bootmgr.efi.mui index 523da2c..332c22e 100755 Binary files a/EFI/Microsoft/Boot/lt-LT/bootmgr.efi.mui and b/EFI/Microsoft/Boot/lt-LT/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/lv-LV/bootmgfw.efi.mui b/EFI/Microsoft/Boot/lv-LV/bootmgfw.efi.mui index 8cda6c6..cee223f 100755 Binary files a/EFI/Microsoft/Boot/lv-LV/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/lv-LV/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/lv-LV/bootmgr.efi.mui b/EFI/Microsoft/Boot/lv-LV/bootmgr.efi.mui index 20917c1..c336364 100755 Binary files a/EFI/Microsoft/Boot/lv-LV/bootmgr.efi.mui and b/EFI/Microsoft/Boot/lv-LV/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/nb-NO/bootmgfw.efi.mui b/EFI/Microsoft/Boot/nb-NO/bootmgfw.efi.mui index af3b862..d719cd4 100755 Binary files a/EFI/Microsoft/Boot/nb-NO/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/nb-NO/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/nb-NO/bootmgr.efi.mui b/EFI/Microsoft/Boot/nb-NO/bootmgr.efi.mui index e7f599f..a32bc96 100755 Binary files a/EFI/Microsoft/Boot/nb-NO/bootmgr.efi.mui and b/EFI/Microsoft/Boot/nb-NO/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/nl-NL/bootmgfw.efi.mui b/EFI/Microsoft/Boot/nl-NL/bootmgfw.efi.mui index abb9ce3..b8f9928 100755 Binary files a/EFI/Microsoft/Boot/nl-NL/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/nl-NL/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/nl-NL/bootmgr.efi.mui b/EFI/Microsoft/Boot/nl-NL/bootmgr.efi.mui index eeffa82..61a23b2 100755 Binary files a/EFI/Microsoft/Boot/nl-NL/bootmgr.efi.mui and b/EFI/Microsoft/Boot/nl-NL/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/pl-PL/bootmgfw.efi.mui b/EFI/Microsoft/Boot/pl-PL/bootmgfw.efi.mui index 0f13e9b..a3d3299 100755 Binary files a/EFI/Microsoft/Boot/pl-PL/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/pl-PL/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/pl-PL/bootmgr.efi.mui b/EFI/Microsoft/Boot/pl-PL/bootmgr.efi.mui index bd3e84e..692beb8 100755 Binary files a/EFI/Microsoft/Boot/pl-PL/bootmgr.efi.mui and b/EFI/Microsoft/Boot/pl-PL/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/pt-BR/bootmgfw.efi.mui b/EFI/Microsoft/Boot/pt-BR/bootmgfw.efi.mui index e81e308..fcdebbc 100755 Binary files a/EFI/Microsoft/Boot/pt-BR/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/pt-BR/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/pt-BR/bootmgr.efi.mui b/EFI/Microsoft/Boot/pt-BR/bootmgr.efi.mui index 09908f1..6f6b2c5 100755 Binary files a/EFI/Microsoft/Boot/pt-BR/bootmgr.efi.mui and b/EFI/Microsoft/Boot/pt-BR/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/pt-PT/bootmgfw.efi.mui b/EFI/Microsoft/Boot/pt-PT/bootmgfw.efi.mui index 76fbee6..2688a5f 100755 Binary files a/EFI/Microsoft/Boot/pt-PT/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/pt-PT/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/pt-PT/bootmgr.efi.mui b/EFI/Microsoft/Boot/pt-PT/bootmgr.efi.mui index 228fe9c..6d77b1f 100755 Binary files a/EFI/Microsoft/Boot/pt-PT/bootmgr.efi.mui and b/EFI/Microsoft/Boot/pt-PT/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/ro-RO/bootmgfw.efi.mui b/EFI/Microsoft/Boot/ro-RO/bootmgfw.efi.mui index ebf11c5..f1beac4 100755 Binary files a/EFI/Microsoft/Boot/ro-RO/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/ro-RO/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/ro-RO/bootmgr.efi.mui b/EFI/Microsoft/Boot/ro-RO/bootmgr.efi.mui index 960282e..5032c0e 100755 Binary files a/EFI/Microsoft/Boot/ro-RO/bootmgr.efi.mui and b/EFI/Microsoft/Boot/ro-RO/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/ru-RU/bootmgfw.efi.mui b/EFI/Microsoft/Boot/ru-RU/bootmgfw.efi.mui index 50d3337..a7e45c0 100755 Binary files a/EFI/Microsoft/Boot/ru-RU/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/ru-RU/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/ru-RU/bootmgr.efi.mui b/EFI/Microsoft/Boot/ru-RU/bootmgr.efi.mui index 69b7ec1..d8c17ae 100755 Binary files a/EFI/Microsoft/Boot/ru-RU/bootmgr.efi.mui and b/EFI/Microsoft/Boot/ru-RU/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/sk-SK/bootmgfw.efi.mui b/EFI/Microsoft/Boot/sk-SK/bootmgfw.efi.mui index 1429972..368f9a0 100755 Binary files a/EFI/Microsoft/Boot/sk-SK/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/sk-SK/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/sk-SK/bootmgr.efi.mui b/EFI/Microsoft/Boot/sk-SK/bootmgr.efi.mui index 77386e3..5afd903 100755 Binary files a/EFI/Microsoft/Boot/sk-SK/bootmgr.efi.mui and b/EFI/Microsoft/Boot/sk-SK/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/sl-SI/bootmgfw.efi.mui b/EFI/Microsoft/Boot/sl-SI/bootmgfw.efi.mui index e9c4297..a68d292 100755 Binary files a/EFI/Microsoft/Boot/sl-SI/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/sl-SI/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/sl-SI/bootmgr.efi.mui b/EFI/Microsoft/Boot/sl-SI/bootmgr.efi.mui index feac083..63d2ad8 100755 Binary files a/EFI/Microsoft/Boot/sl-SI/bootmgr.efi.mui and b/EFI/Microsoft/Boot/sl-SI/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/sr-Latn-RS/bootmgfw.efi.mui b/EFI/Microsoft/Boot/sr-Latn-RS/bootmgfw.efi.mui index dd9fee2..04e0c7c 100755 Binary files a/EFI/Microsoft/Boot/sr-Latn-RS/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/sr-Latn-RS/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/sr-Latn-RS/bootmgr.efi.mui b/EFI/Microsoft/Boot/sr-Latn-RS/bootmgr.efi.mui index 109b064..c30340a 100755 Binary files a/EFI/Microsoft/Boot/sr-Latn-RS/bootmgr.efi.mui and b/EFI/Microsoft/Boot/sr-Latn-RS/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/sv-SE/bootmgfw.efi.mui b/EFI/Microsoft/Boot/sv-SE/bootmgfw.efi.mui index 7ab7c61..f788710 100755 Binary files a/EFI/Microsoft/Boot/sv-SE/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/sv-SE/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/sv-SE/bootmgr.efi.mui b/EFI/Microsoft/Boot/sv-SE/bootmgr.efi.mui index 1cfe2f6..5a2b97d 100755 Binary files a/EFI/Microsoft/Boot/sv-SE/bootmgr.efi.mui and b/EFI/Microsoft/Boot/sv-SE/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/tr-TR/bootmgfw.efi.mui b/EFI/Microsoft/Boot/tr-TR/bootmgfw.efi.mui index 8ff3e16..bb24448 100755 Binary files a/EFI/Microsoft/Boot/tr-TR/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/tr-TR/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/tr-TR/bootmgr.efi.mui b/EFI/Microsoft/Boot/tr-TR/bootmgr.efi.mui index 051726e..9e81bad 100755 Binary files a/EFI/Microsoft/Boot/tr-TR/bootmgr.efi.mui and b/EFI/Microsoft/Boot/tr-TR/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/uk-UA/bootmgfw.efi.mui b/EFI/Microsoft/Boot/uk-UA/bootmgfw.efi.mui index fac5119..7c938be 100755 Binary files a/EFI/Microsoft/Boot/uk-UA/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/uk-UA/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/uk-UA/bootmgr.efi.mui b/EFI/Microsoft/Boot/uk-UA/bootmgr.efi.mui index 7979d85..f266bf6 100755 Binary files a/EFI/Microsoft/Boot/uk-UA/bootmgr.efi.mui and b/EFI/Microsoft/Boot/uk-UA/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/zh-CN/bootmgfw.efi.mui b/EFI/Microsoft/Boot/zh-CN/bootmgfw.efi.mui index ef810c3..aaa22ee 100755 Binary files a/EFI/Microsoft/Boot/zh-CN/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/zh-CN/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/zh-CN/bootmgr.efi.mui b/EFI/Microsoft/Boot/zh-CN/bootmgr.efi.mui index a1897c9..c60889e 100755 Binary files a/EFI/Microsoft/Boot/zh-CN/bootmgr.efi.mui and b/EFI/Microsoft/Boot/zh-CN/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/zh-HK/bootmgfw.efi.mui b/EFI/Microsoft/Boot/zh-HK/bootmgfw.efi.mui index 4d27f6b..7181630 100755 Binary files a/EFI/Microsoft/Boot/zh-HK/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/zh-HK/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/zh-HK/bootmgr.efi.mui b/EFI/Microsoft/Boot/zh-HK/bootmgr.efi.mui index 06f0052..ff12268 100755 Binary files a/EFI/Microsoft/Boot/zh-HK/bootmgr.efi.mui and b/EFI/Microsoft/Boot/zh-HK/bootmgr.efi.mui differ diff --git a/EFI/Microsoft/Boot/zh-TW/bootmgfw.efi.mui b/EFI/Microsoft/Boot/zh-TW/bootmgfw.efi.mui index 669f539..85372ce 100755 Binary files a/EFI/Microsoft/Boot/zh-TW/bootmgfw.efi.mui and b/EFI/Microsoft/Boot/zh-TW/bootmgfw.efi.mui differ diff --git a/EFI/Microsoft/Boot/zh-TW/bootmgr.efi.mui b/EFI/Microsoft/Boot/zh-TW/bootmgr.efi.mui index 41acc11..2025c83 100755 Binary files a/EFI/Microsoft/Boot/zh-TW/bootmgr.efi.mui and b/EFI/Microsoft/Boot/zh-TW/bootmgr.efi.mui differ diff --git a/WebDriver-346.03.10f01.pkg b/WebDriver-346.03.15f02.pkg similarity index 83% rename from WebDriver-346.03.10f01.pkg rename to WebDriver-346.03.15f02.pkg index 7498692..5f1b514 100644 Binary files a/WebDriver-346.03.10f01.pkg and b/WebDriver-346.03.15f02.pkg differ diff --git a/audio_cloverALC-110_v1.0s10.command b/audio_cloverALC-110_v1.0s10.command new file mode 100755 index 0000000..ba2332e --- /dev/null +++ b/audio_cloverALC-110_v1.0s10.command @@ -0,0 +1,1626 @@ +#!/bin/sh +# Maintained by: toleda for: github.com/toleda/audio_cloverALC +gFile="audio_cloverALC-110.command_v1.0s10" +# gFile="audio_pikeralphaALC-110.command_v1.0s11" +# Credit: bcc9, RevoGirl, PikeRAlpha, SJ_UnderWater, RehabMan, TimeWalker75a, lisai9093 +# +# OS X Clover Realtek ALC Onboard Audio +# +# Enables OS X Realtek ALC onboard audio in 10.11. 10.10, 10.9 and 10.8, all versions +# 1. Supports Realtek ALC885, 887, 888, 889, 892, 898 and 1150 +# 2. Clover patched native AppleHDA.kext installed in System/Library/Extensions +# +# Requirements +# 1. OS X: 10.11/10.10/10.9/10.8, all versions +# 2. Native AppleHDA.kext (If not installed, run 10.x installer) +# 3. Supported Realtek ALC on board audio codec (see above) +# 4. Audio ID: 1, 2 or 3 Injection, see https://github.com/toleda/audio_ALCinjection +# +# Installation +# 1. Double click audio_cloverALC-110.command +# 2. Enter password at prompt +# 3. For Clover/EFI, EFI partition must be mounted before running script +# 4. For Clover/Legacy, answer y to Confirm Clover Legacy Install (y/n) +# 5. Confirm Realtek ALCxxx (y/n): (885, 887, 888, 889, 892, 898, 1150) +# 6. Clover Audio ID Injection (y/n): +# If y: +# 7. Use Audio ID: x (y/n): +# If n: +# Audio IDs: +# 1 - 3/5/6 port Realtek ALCxxx audio +# 2 - 3 port (5.1) Realtek ALCxxx audio (n/a 885) +# 3 - HD3000/HD4000 HDMI audio w/Realtek ALCxxx audio (n/a 885/1150 & 887/888 Legacy) +# 8. Select Audio ID (1, 2 or 3) +# 9. Restart +# +# Change log: +# v1.0a - 6/15/15: 1. Initial 10.11 support +# v1.0b - 6/17/15: file name typo +# v1.0c - 6/21/15: added hd4600 hdmi audio patch option +# v1.0d - 7/31/15: add SID verification, fix copy extended attributes error +# v1.0e - 8/14/15: fix SID reporting esthetics +# v1.0f - 8/14/15: 269/283 binary edit update, kexts/Other check +# v1.0g - 10/5/15: Legacy fix +# v1.0h - 10/8/15: Legacy fix - 2 +# v1.0j - 10/15/15: add /Volume/ESP detection +# v1.0k - 11/5/15: add Skylake HDEF +# v1.0l - 11/13/15: add 1150/Audio ID: 3, add mb8 considerations +# v1.0m - 11/30/15: unsupported audio_id fix +# v1.0n - 12/20/15: detect HD4600 HDMI audio codec +# v1.0o10 - 12/20/16: add Osmosis, typo, credit: dabaer +# v1.0p10 - 2/18/16: add test drive, typos +# v1.0p20 - 2/20/16: typos +# v1.0q10 - 3/9/16: line 1/typo +# v1.0r10 - 3/9/16: x99 fix +# v1.0s10 - 8/11/16: config.plist: Does Not Exist fix +echo " " +echo "Agreement" +echo "The audio_cloverALC-110 script is for personal use only. Do not distribute" +echo "the patch, any or all of the files or the resulting patched AppleHDA.kext" +echo "for any reason without permission. The audio_cloverALC-110 script is" +echo "provided as is and without any kind of warranty." +echo " " + +# debug=0 - normal install, +# debug=1 - test drive: copy config.plist to Desktop, edited config.plist, realtekALC.kext, layout_.xml and Platforms files copied to Desktop/codec + +# set initial variables +gDebug=0 +gSysVer=`sw_vers -productVersion` +gSysName="Mavericks" +gStartupDisk=EFI +gCloverDirectory=/Volumes/$gStartupDisk/EFI/CLOVER +gDesktopDirectory=/Users/$(whoami)/Desktop/ +gLibraryDirectory=/Library/Extensions +gExtensionsDirectory=/System/Library/Extensions +gHDAContentsDirectory=$gExtensionsDirectory/AppleHDA.kext/Contents +gHDAHardwarConfigDirectory=$gHDAContentsDirectory/Plugins/AppleHDAHardwareConfigDriver.kext/Contents +gHDAControllerbinaryDirectory=$gHDAContentsDirectory/Plugins/AppleHDAController.kext/Contents/MacOS +gAudioid=1 +gLayoutid=1 +gPatch="-toledaALC" +gCodec=892 +gLegacy=n +gController=n +gMake=0 +gMB=0 +# gCodecsinstalled +# gCodecVendor +# gCodecDevice +# gCodecName +# gCodec +gCloverALC=1 +gPikerAlphaALC=0 +gRealtekALC=0 +gAudioidvalid=n +gCodecvalid=n +gtestALC=0 + +# debug +if [ $gDebug = 2 ]; then + echo "gDebug = $gDebug - ${gDebugMode[$gDebug]}" + echo "gMake = $gMake" + echo "gCloverALC = $gCloverALC" + echo "gPikerAlphaALC = $gPikerAlphaALC" + echo "gRealtekALC = $gRealtekALC" + echo "gtestALC = $gtestALC" + +# while true +# do +# read -p "OK (y/n): " choice3 +# case "$choice3" in +# [yY]* ) break;; +# [nN]* ) exit;; +# * ) echo "Try again...";; +# esac +# done +fi + +# verify system version +case ${gSysVer} in + +10.11* ) gSysName="El Capitan" +gSysFolder=kexts/10.11 +gSID=$(csrutil status) +;; +10.10* ) gSysName="Yosemite" +gSysFolder=kexts/10.10 +;; +10.9* ) gSysName="Mavericks" +gSysFolder=kexts/10.9 +;; +10.8* ) gSysName="Mountain Lion" +gSysFolder=kexts/10.8 +;; + +* ) +echo "OS X Version: $gSysVer is not supported" +echo "No system files were changed" +echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." +exit 1 +;; + +esac + +# debug +if [ $gDebug = 2 ]; then + # gSysVer=10.9 + echo "System version: supported" + echo "gSysVer = $gSysVer" +fi + +gDebugMode[0]=Release +gDebugMode[1]=TestDrive +gDebugMode[2]=Debug + +echo "File: $gFile" +echo "${gDebugMode[$gDebug]} Mode" + +# debug +if [ $gMake = 1 ]; then + if [ -d "$gDesktopDirectory/AppleHDA.kext" ]; then + sudo rm -R "$gExtensionsDirectory/AppleHDA.kext" + case $gSysName in + + "El Capitan" ) + sudo cp -X $gDesktopDirectory/AppleHDA.kext $gExtensionsDirectory/AppleHDA.kext + ;; + + "Yosemite"|"Mavericks"|"Mountain Lion" ) + sudo cp -R $gDesktopDirectory/AppleHDA.kext $gExtensionsDirectory/AppleHDA.kext + ;; + + esac + + else + echo "Error, no Desktop/AppleHDA.kext (native)" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + + sudo chown -R root:wheel $gExtensionsDirectory/AppleHDA.kext + sudo touch $gExtensionsDirectory + gHDAversioninstalled=$(sudo /usr/libexec/PlistBuddy -c "Print ':CFBundleShortVersionString'" $gHDAContentsDirectory/Info.plist) + echo "Desktop/AppleHDA.kext installed in $gExtensionsDirectory" +fi + +# credit: mfram, http://forums.macrumors.com/showpost.php?p=18302055&postcount=6 +# get startup disk name +gStartupDevice=$(mount | grep "on / " | cut -f1 -d' ') +gStartupDisk=$(mount | grep "on / " | cut -f1 -d' ' | xargs diskutil info | grep "Volume Name" | perl -an -F'/:\s+/' -e 'print "$F[1]"') + +# debug +if [ $gDebug = 2 ]; then + echo "Boot device: $gStartupDevice" + echo "Boot volume: $gStartupDisk" +fi + +# if [ $gCloverALC = 1 ]; then +# echo "Verify EFI partition mounted, Finder/Devices/EFI" +# echo "If not set, Terminal/Quit" +# fi + +if [ $gRealtekALC = 1 ]; then + gChameleonDirectory=/Volumes/"$gStartupDisk"/Extra + +# debug + if [ $gDebug = 2 ]; then + echo "gChameleonDirectory = $gChameleonDirectory" + echo "gSysName = $gSysName" + fi + + if [[ -d $gChameleonDirectory ]]; then + if [ -f "$gChameleonDirectory/org.chameleon.Boot.plist" ]; then + cp -p "$gChameleonDirectory/org.chameleon.Boot.plist" "/tmp/org.chameleon.Boot.txt" + +# debug + if [ $gDebug = 2 ]; then + echo "$gChameleonDirectory/org.chameleon.Boot.plist found" + fi + + else + echo "$$gChameleonDirectory/org.chameleon.Boot.plist not found" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + + case $gSysName in + + "El Capitan" ) + echo $gSID > /tmp/gsid.txt + if [[ $(cat /tmp/gsid.txt | grep -c "disabled") = 0 ]]; then + rm -R /tmp/gsid.txt + echo "$gSID" + echo "" + echo "NOK to patch" + echo "Add org.chameleon.Boot.plist/Kernel Flags = CsrActiveConfig=0x3 and restart" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + else + rm -R /tmp/gsid.txt + echo "$gSID" + echo "" + echo "OK to patch" + fi + ;; + + "Yosemite" ) + if [[ $(cat /tmp/org.chameleon.Boot.txt | grep -c "kext-dev-mode=1") = 0 ]]; then + rm -R /tmp/org.chameleon.Boot.txt + echo "Kernel Flags = kext-dev-mode=1 not found; patching not possible" + echo "Add org.chameleon.Boot.plist/Kernel Flags = kext-dev-mode=1 and restart" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + else + echo "Kernel Flags = kext-dev-mode=1 found" + fi + ;; + esac + rm -R /tmp/org.chameleon.Boot.txt + + else +# osmosis/other + + while true + do + read -p "No Clover/Chameleon files, confirm Osmosis/other install (y/n): " choice10 + case "$choice10" in + + [yY]* ) + case $gSysName in + "El Capitan" ) + + echo $gSID > /tmp/gsid.txt + if [[ $(cat /tmp/gsid.txt | grep -c "disabled") = 0 ]]; then + rm -R /tmp/gsid.txt + echo "$gSID" + echo "" + echo "NOK to patch" + echo "Set Kernel Flag = CsrActiveConfig=0x3 and restart" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + else + rm -R /tmp/gsid.txt + echo "$gSID" + echo "" + echo "OK to patch" + fi + break + ;; + + "Yosemite" ) + + while true + do + read -p "kext-dev-mode=1 set (y/n): " choice11 + case "$choice11" in + + [yY]* ) break + ;; + + [nN]* ) + echo "User terminated, set Boot Flag/kext-dev-mode=1 and restart" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + ;; + + * ) echo "Try again...";; + esac + done + ;; + + esac + break + ;; + + [nN]* ) + echo "User terminated, no Clover/Chameleon files" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + ;; + + * ) echo "Try again...";; + esac + done + + fi + +fi + +# get password +gHDAversioninstalled=$(sudo /usr/libexec/PlistBuddy -c "Print ':CFBundleShortVersionString'" $gHDAContentsDirectory/Info.plist) + +# exit if error +if [ "$?" != "0" ]; then + echo "Error occurred, AppleHDA.kext/Contents/Info.plist/BundleShortVersionString not found" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# set up clover (efi or legacy) +if [ $gCloverALC = 1 ]; then + +# initialize variable + choice8=n + +# check for debug (debug=1 does not touch CLOVER folder) +case $gDebug in +0 ) + +# verify EFI install +gEFI=0 +if [ -d $gCloverDirectory ]; then + gEFI=1 +fi + +if [ $gEFI = 0 ]; then + + if [ -d '/Volumes/ESP/EFI/CLOVER' ]; then + gCloverDirectory=/Volumes/ESP/EFI/CLOVER + gEFI=1 + fi + +fi + +if [ $gEFI = 1 ]; then + echo "EFI partition is mounted" + if [ -f "$gCloverDirectory/config.plist" ]; then + cp -p "$gCloverDirectory/config.plist" "/tmp/config.txt" + + case $gSysName in + + "El Capitan" ) + echo $gSID > /tmp/gsid.txt + if [[ $(cat /tmp/gsid.txt | grep -c "disabled") = 0 ]]; then + rm -R /tmp/gsid.txt + echo "$gSID" + echo "" + echo "NOK to patch" + echo "Add config.plist/RtVariables/CsrActiveConfig=0x3 and restart" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + else + rm -R /tmp/gsid.txt + echo "$gSID" + echo "" + echo "OK to patch" + fi + ;; + + "Yosemite" ) + if [[ $(cat /tmp/config.txt | grep -c "kext-dev-mode=1") = 0 ]]; then + rm -R /tmp/config.txt + echo "Boot/Arguments/kext-dev-mode=1 not found; patching not possible" + echo "Add config.plist/Boot/Arguments/kext-dev-mode=1 and restart" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + else + echo "Boot/Arguments = kext-dev-mode=1 found" + fi + ;; + + esac + + rm -R /tmp/config.txt + cp -p "$gCloverDirectory/config.plist" "/tmp/config.plist" + if [ -f "$gCloverDirectory/config-backup.plist" ]; then + rm -R "$gCloverDirectory/config-backup.plist" + fi + cp -p "$gCloverDirectory/config.plist" "$gCloverDirectory/config-backup.plist" + else + echo "$gCloverDirectory/config.plist is missing" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi +else + echo "EFI partition not mounted" + +# confirm Clover Legacy install + gCloverDirectory=/Volumes/"$gStartupDisk"/EFI/CLOVER + if [ -d "$gCloverDirectory" ]; then + echo "$gStartupDisk/EFI folder found" + else echo "$gStartupDisk/EFI not found" + echo "EFI/CLOVER folder not available to install audio" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + + while true + do + read -p "Confirm Clover Legacy Install (y/n): " choice8 + case "$choice8" in + + [yY]* ) +# gCloverDirectory=/Volumes/"$gStartupDisk"/EFI/CLOVER + if [ -d "$gCloverDirectory" ]; then + if [ -f "$gCloverDirectory/config.plist" ]; then + + cp -p "$gCloverDirectory/config.plist" "/tmp/config.txt" + case $gSysName in + + "El Capitan" ) + echo $gSID > /tmp/gsid.txt + if [[ $(cat /tmp/gsid.txt | grep -c "disabled") = 0 ]]; then + rm -R /tmp/gsid.txt + echo "$gSID" + echo "" + echo "NOK to patch" + echo "Add config.plist/RtVariables/CsrActiveConfig=0x3 and restart" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + else + rm -R /tmp/gsid.txt + echo "$gSID" + echo "" + echo "OK to patch" + fi + ;; + + "Yosemite" ) + if [[ $(cat /tmp/config.txt | grep -c "kext-dev-mode=1") = 0 ]]; then + rm -R /tmp/config.txt + echo "Boot/Arguments/kext-dev-mode=1 not found; patching not possible" + echo "Add config.plist/Boot/Arguments/kext-dev-mode=1 and restart" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + else + echo "Boot/Arguments = kext-dev-mode=1 found" + fi + ;; + + esac + + cp -p "$gCloverDirectory/config.plist" "/tmp/config.plist" + if [ -f "$gCloverDirectory/config-backup.plist" ]; then + rm -R "$gCloverDirectory/config-backup.plist" + fi + cp -p "$gCloverDirectory/config.plist" "$gCloverDirectory/config-backup.plist" + else + echo "$gCloverDirectory/config.plist is missing" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + + else + echo "$gCloverDirectory not found" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + + break + ;; + + [nN]* ) + echo "User terminated, EFI partition/folder not mounted" + echo “Mount EFI partition and Restart“ + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + ;; + + * ) echo "Try again...";; + esac + done + fi + ;; + +1 ) + if [ -d "$gDesktopDirectory/config-basic.plist" ]; then + echo "Desktop/config-basic.plist copied missing" + exit 1 + fi + + sudo cp -R "$gDesktopDirectory/config-basic.plist" /tmp/config.plist + echo "Desktop/config-basic.plist copied to /tmp/config.plist" + ;; + +2 ) + echo "gHDAversioninstalled = $gHDAversioninstalled" + if [ -d "$gDesktopDirectory/config-basic.plist" ]; then + echo "Desktop/config-basic.plist copied missing" + exit 1 + fi + + sudo cp -R "$gDesktopDirectory/config-basic.plist" /tmp/config.plist + echo "Desktop/config-basic.plist copied to /tmp/config.plist" + ;; + +* ) + echo "gDebug = $gDebug, fix" + exit 1 + ;; +esac + +fi + +# exit if error +if [ "$?" != "0" ]; then + if [ $choice8 != "y" ]; then + echo "Error, $gStartupDisk/EFI not found" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + echo "Error, EFI partition not mounted" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# debug +if [ $gDebug = 2 ]; then + echo "EFI: success" +fi + +# verify ioreg/HDEF +ioreg -rw 0 -p IODeviceTree -n HDEF > /tmp/HDEF.txt + +if [[ $(cat /tmp/HDEF.txt | grep -c "HDEF@1") != 0 ]]; then + gLayoutidioreg=$(cat /tmp/HDEF.txt | grep layout-id | sed -e 's/.*//') + gLayoutidhex="0x${gLayoutidioreg:6:2}${gLayoutidioreg:4:2}${gLayoutidioreg:2:2}${gLayoutidioreg:0:2}" + gAudioid=$((gLayoutidhex)) + sudo rm -R /tmp/HDEF.txt +else + echo "Error: no IOReg/HDEF; BIOS/audio/disabled or ACPI problem" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + sudo rm -R /tmp/HDEF.txt +exit 1 +fi + +# debug +if [ $gDebug = 2 ]; then + echo "gLayoutidioreg = $gLayoutidioreg" + echo "gLayoutidihex = $gLayoutidhex" + echo "gAudioid = $gAudioid" + echo "HDEF/Audio ID: success" +fi + +# verify native s/l/e/applehda.kext +if [ $gMake = 0 ]; then + + if [[ $(perl -le "print scalar grep /\x8b\x19\xd4\x11/, <>;" $gHDAContentsDirectory/MacOS/AppleHDA) = 0 ]]; then + echo "codec: 8b19d411 is missing" + echo "S/L/E/AppleHDA.kext is not native" + echo "Install native AppleHDA.kext" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + + if [[ $(perl -le "print scalar grep /\x84\x19\xd4\x11/, <>;" $gHDAContentsDirectory/MacOS/AppleHDA) = 0 ]]; then + echo "codec: 8419d411 is missing" + echo "S/L/E/AppleHDA.kext is not native" + echo "Install native AppleHDA.kext" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + + if [[ $(perl -le "print scalar grep /\x62\x02\xec\x10/, <>;" $gHDAContentsDirectory/MacOS/AppleHDA) = 0 ]]; then + echo "codec: 6202ec10 is missing" + echo "S/L/E/AppleHDA.kext is not native" + echo "Install native AppleHDA.kext" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + + case $gSysName in + + "Mountain Lion" ) + if [[ $(perl -le "print scalar grep /\xff\x87\xec\x1a/, <>;" $gHDAContentsDirectory/MacOS/AppleHDA) = 0 ]]; then + echo "codec: ff87ec10 is missing" + echo "S/L/E/AppleHDA.kext is not native" + echo "Install native AppleHDA.kext" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + ;; + + esac + +fi + +# debug +if [ $gDebug = 2 ]; then + echo "Native AppleHDA: success" +fi + +# get installed codec/revision +gCodecsInstalled=$(ioreg -rxn IOHDACodecDevice | grep VendorID | awk '{ print $4 }' | sed -e 's/ffffffff//') +gCodecsVersion=$(ioreg -rxn IOHDACodecDevice | grep RevisionID| awk '{ print $4 }') + +# debug +if [ $gDebug = 2 ]; then +# gCodecsInstalled=0x10ec0887 +# gCodecsVersion=0x100101 +# gCodecsVersion=0x100202 +# gCodecsVersion=0x100302 +# gCodecsInstalled=0x10ec0900 +# gCodecsVersion=0x100001 +# gCodecsInstalled=0x10134206 +# gCodecsVersion=0x100302 + echo "gCodecsInstalled = $gCodecsInstalled" + echo "gCodecsVersion = $gCodecsVersion" +fi + +# no codecs detected +if [ -z "${gCodecsInstalled}" ]; then + echo "" + echo "No audio codec detected" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# initialize variables +intel=n +amd=n +nvidia=n +realtek=n +unknown=n +alternate=n + +# find realtek codecs +index=0 +version=($gCodecsVersion) +for codec in $gCodecsInstalled +do + +# debug +if [ $gDebug = 2 ]; then + echo "Index = $index, Codec = $codec, Version = ${version[$index]}" +fi + +# sort vendors and devices +case ${codec:2:4} in + + 8086 ) Codecintelhdmi=$codec; intel=y + ;; + 1002 ) Codecamdhdmi=$codec; amd=y + ;; + 10de ) Codecnvidiahdmi=$codec; nvidia=y + ;; + 10ec ) Codecrealtekaudio=$codec; Versionrealtekaudio=${version[$index]}; realtek=y + ;; + *) Codecunknownaudio=$codec; unknown=y + ;; + +esac +index=$((index + 1)) +done + +# debug +if [ $gDebug = 2 ]; then + echo "HDMI audio codec(s)" + if [ $intel = y ]; then + echo "Intel: $Codecintelhdmi" + fi + if [ $amd = y ]; then + echo "AMD: $Codecamdhdmi" + fi + if [ $nvidia = y ]; then + echo "Nvidia: $Codecnvidiahdmi" + fi + echo "" + echo "Onboard audio codec" + if [ $realtek = y ]; then + echo "Realtek: $Codecrealtekaudio" + echo "Version: $Versionrealtekaudio" + fi + if [ $unknown = y ]; then + echo "Unknown: $Codecunknownaudio" + fi +fi + +if [ $unknown = y ]; then + +while true +do +read -p "Codec $Codecunknownaudio is not supported, continue (y/n): " choice7 + +case "$choice7" in + [yY]* ) break;; + [nN]* ) echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1;; + * ) echo "Try again..." +;; +esac + +done + +fi + +# special names +if [ $realtek = y ]; then + gCodecVendor=${Codecrealtekaudio:2:4} + gCodecDevice=${Codecrealtekaudio:6:4} + +# debug + if [ $gDebug = 2 ]; then + echo "gCodecVendor = $gCodecVendor" + echo "gCodecDevice = $gCodecDevice" + fi + + if [ ${gCodecDevice:0:1} = 0 ]; then + gCodecName=${gCodecDevice:1:3} + fi + + if [ $gCodecDevice = "0899" ]; then + gCodecName=898 + fi + + if [ $gCodecDevice = "0900" ]; then + gCodecName=1150 + fi + +# debug +if [ $gDebug = 2 ]; then + echo "Codec identification: success" +fi + +# validate_realtek codec + case "$gCodecName" in + 269|283|885|887|888|889|892|898|1150 ) + +# confirm codec, go button + while true + do + read -p "Confirm Realtek ALC$gCodecName (y/n): " choice3 + case "$choice3" in + [yY]* ) gCodec=$gCodecName; gCodecvalid=y; break;; + [nN]* ) break;; + * ) echo "Try again...";; + esac + done + ;; + + * ) echo "Realtek ALC$gCodecName is not supported with $gFile" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + ;; + esac + +# exit if error + if [ "$?" != "0" ]; then + echo Error: ?? + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + +fi + +if [ $gCodecvalid != y ]; then + +# get supported codec + echo "Supported RealtekALC codecs: 885, 887, 888, 889, 892, 898 or 1150 (0 to exit)" + while true + do + read -p "Enter codec: " choice0 + case "$choice0" in + 269|283|885|887|888|889|892|898|1150 ) gCodec=$choice0; break;; + 0 ) echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1;; + + * ) echo "Try again...";; + esac + done +# Versionrealtekaudio=0x100302 + +fi + +# legacy + +case "$gCodec" in + + 887|888 ) + if [ $gMake = 0 ]; then + + case "$Versionrealtekaudio" in + 0x100302 ) echo "ALC$gCodec v_$Versionrealtekaudio (Current)"; gLegacy=n ;; + 0x100202 ) echo "ALC$gCodec v_$Versionrealtekaudio (Legacy)"; gLegacy=y ;; + * ) echo "ALC$gCodec v_$Versionrealtekaudio not supported" + + while true + do + read -p "Use Legacy (v100202) Patch (y/n): " choice1 + case "$choice1" in + [yY]* ) gLegacy=y; break;; + [nN]* ) echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit;; + * ) echo "Try again...";; + esac + done + esac + + else + while true + do + read -p "887/888 Legacy (v100202) Patch (y/n): " choice1 + case "$choice1" in + [yY]* ) gLegacy=y; break;; + [nN]* ) gLegacy=n; break;; + * ) echo "Try again...";; + esac + done + + fi + +esac + +case "$gCodec" in + +887|892|898|1150 ) + +# verify ioreg/HDAU for HD4600 HDMI audio + ioreg -rw 0 -p IODeviceTree -n HDAU > /tmp/HDAU.txt + + if [[ $(cat /tmp/HDAU.txt | grep -c "HDAU@3") != 0 ]]; then + if [[ $(cat /tmp/HDAU.txt | grep -c "0c0c") != 0 ]]; then + echo "HDAU@3 found, HD4600 HDMI audio capable" + gController=1 + fi + fi + sudo rm -R /tmp/HDAU.txt + + ioreg -rw 0 -p IODeviceTree -n B0D3 > /tmp/B0D3.txt + + if [[ $(cat /tmp/B0D3.txt | grep -c "B0D3@3") != 0 ]]; then + if [[ $(cat /tmp/B0D3.txt | grep -c "0c0c") != 0 ]]; then + echo "B0D3@3 found, HDAU edit required for HD4600 HDMI audio" + echo "dsdt edit/ssdt injection not available with this script" + gController=1 + fi + fi + sudo rm -R /tmp/B0D3.txt + + ;; + +esac + +# HD4600 HDMI audio patch] +choice2=n +if [ $gController = 1 ]; then + if [ $gCodec = 887 -a $gLegacy = y ]; then gController=n; else + case "$gCodec" in + + 887|892|898|1150 ) + while true + do + read -p "Patch AppleHDA.kext for HD4600 HDMI audio (y/n): " choice2 + case "$choice2" in + [yY]* ) gController=y; break;; + [nN]* ) gController=n; break;; + * ) echo "Try again...";; + esac + done + esac + fi +fi + +# validate audio id +case $gAudioid in +# 0|1|2|3 ) gAudioidvalid=y;; +1|2|3 ) gAudioidvalid=y;; +* ) +while true +do +read -p "Audio ID: $gAudioid is not supported, continue (y/n): " choice9 +case "$choice9" in + [yY]* ) gAudioid=0; gAudioidvalid=n break;; + [nN]* ) echo "No system files were changed"; exit;; + * ) echo "Try again..." +;; +esac +done +;; +esac + +if [ $gRealtekALC = 1 ]; then + if [ $gAudioidvalid = n ]; then + echo "" + echo "Note" + echo "Set Audio ID injection before restart; valid IDs are:" +# echo "0 - dsdt/ssdt HDMI audio (AMD/Nvidia/Intel)" + echo "1 - 3/5/6 port Realtek ALCxxx audio" + echo "2 - 3 port (5.1) Realtek ALCxxx audio (n/a 885)" + echo "3 - HD3000/HD4000/HD5xx HDMI audio and Realtek ALCxxx audio (n/a 885 & 887/888 Legacy)" + echo "Caution: if Audio ID: $gAudioid is not fixed, no audio after restart" + fi +fi + +if [ $gCloverALC = 1 ]; then + while true + do + read -p "Clover Audio ID Injection (y/n): " choice4 + case "$choice4" in + [yY]* ) choice4=y; break;; + [nN]* ) gAudioid=1; choice5=y; break;; + * ) echo "Try again...";; + esac + done + + if [ $gAudioidvalid = n ]; then + choice5=n + else + if [ $choice4 = y ]; then + while true + do + read -p "Use Audio ID: $gAudioid (y/n): " choice5 + case "$choice5" in + [yY]* ) break;; + [nN]* ) choice5=n; break;; + * ) echo "Try again...";; + esac + done + fi + fi + + if [ $choice5 = n ]; then + echo "Audio IDs:" +# echo "0 - dsdt/ssdt HDMI audio (AMD/Nvidia/Intel)" + echo "1 - 3/5/6 port Realtek ALCxxx audio" + echo "2 - 3 port (5.1) Realtek ALCxxx audio (n/a 885)" + echo "3 - HD3000/HD4000/HD5xx HDMI audio and Realtek ALCxxx audio (n/a 885 & 887/888 Legacy)" + while true + do +# read -p "Select Audio ID? (0, 1, 2 or 3): " choice6 + read -p "Select Audio ID: " choice6 + case "$choice6" in +# 0* ) gAudioid=0; break;; + 1* ) gAudioid=1; break;; + 2* ) gAudioid=2; if [ $gCodec = 885 ]; then echo "ID: 2 n/a, try again..."; else break; fi;; + 3* ) gAudioid=3; valid=y; + if [ $gCodec = 885 ]; then valid=n; fi; +# if [ $gCodec = 1150 ]; then valid=n; fi; + if [ $gLegacy = y ]; then valid=n; fi; + if [ $valid = n ]; then echo "ID: 3 n/a, try again..."; else break; fi;; + * ) echo "Try again...";; + esac + done + fi + +fi + + + +# debug +if [ $gDebug = 2 ]; then + echo "gCodec = $gCodec" + echo "gAudioid = $gAudioid" + echo "gLegacy = $gLegacy" + echo "gController = $gController" + echo "Codec configuration: success" +fi + +if [ $gPikerAlphaALC = 0 ]; then +echo "" +echo "Download ALC$gCodec files ..." + +if [ $gtestALC = 0 ]; then +gDownloadLink="https://raw.githubusercontent.com/toleda/audio_ALC$gCodec/master/$gCodec.zip" +if [ $gLegacy = y ]; then + Legacy=_v100202 + gDownloadLinkLegacy="https://raw.githubusercontent.com/toleda/audio_ALC$gCodec/master/$gCodec$Legacy.zip" + sudo curl -o "/tmp/ALC$gCodec.zip" $gDownloadLinkLegacy +else + sudo curl -o "/tmp/ALC$gCodec.zip" $gDownloadLink +fi + +unzip -qu "/tmp/ALC$gCodec.zip" -d "/tmp/" + +else +# confirm codec test +while true +do + read -p "Confirm Realtek ALC$gCodec test (y/n): " choice13 + case "$choice13" in + [yY]* ) break;; + [nN]* ) + echo "Error: set gtestALC=0" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + ;; + * ) echo "Try again...";; + esac +done + +gDownloadLink="https://raw.githubusercontent.com/toleda/audio_alc_test/master/$gCodec.zip" +sudo curl -o "/tmp/ALC$gCodec.zip" $gDownloadLink +unzip -qu "/tmp/ALC$gCodec.zip" -d "/tmp/" +gDownloadLink="https://raw.githubusercontent.com/toleda/audio_alc_test/master/realtekALC.kext.zip" +sudo curl -o "/tmp/realtekALC.kext.zip" $gDownloadLink +unzip -qu "/tmp/realtekALC.kext.zip" -d "/tmp/" + +fi + +# exit if error +if [ "$?" != "0" ]; then + echo "Error: Download failure, verify network" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi +fi + +# debug +if [ $gDebug = 2 ]; then + echo "gCloverALC = $gCloverALC" + echo "gPikerAlphaALC = $gPikerAlphaALC" + echo "gRealtekALC = $gRealtekALC" +fi + +###################### + +if [ $gCloverALC = 1 ]; then # main loop + +###################### + +# if no clover audio id injection, exit +configaudio=$(sudo /usr/libexec/PlistBuddy -c "Print ':Devices'" /tmp/config.plist | grep -c "Audio") +if [ $gAudioid != 0 ]; then +# set Devices/Audio/Inject/gLayout-id + echo "Edit config.plist/Devices/Audio/Inject/$gAudioid" + if [ $configaudio = 0 ]; then + sudo /usr/libexec/PlistBuddy -c "Add :Devices:Audio dict" /tmp/config.plist + sudo /usr/libexec/PlistBuddy -c "Add :Devices:Audio:Inject string '$gAudioid'" /tmp/config.plist + else + sudo /usr/libexec/PlistBuddy -c "Set :Devices:Audio:Inject $gAudioid" /tmp/config.plist + fi +fi +# check for Devices/Audio/#Inject +configaudio=$(sudo /usr/libexec/PlistBuddy -c "Print ':Devices'" /tmp/config.plist | grep -c "#Inject") +if [ $configaudio != 0 ]; then +sudo /usr/libexec/PlistBuddy -c "Add :Devices:Audio:Inject string '$gAudioid'" /tmp/config.plist +fi + +# debug +if [ $gDebug = 2 ]; then + echo "gAudioid = $gAudioid" + echo "configaudio = $configaudio" +fi + +if [ $gPikerAlphaALC = 0 ]; then +echo "Edit config.plist/SystemParameters/InjectKexts/YES" + +injectkexts=$(sudo /usr/libexec/PlistBuddy -c "Print ':SystemParameters:InjectKexts:'" /tmp/config.plist) + +# debug +if [ $gDebug = 2 ]; then + echo "SystemParameters:InjectKexts: = $injectkexts" +fi + +if [ -z "${injectkexts}" ]; then + sudo /usr/libexec/PlistBuddy -c "Add :SystemParameters:InjectKexts string" /tmp/config.plist + echo "Edit config.plist: Add SystemParameters/InjectKexts - Fixed" +fi + +if [ $(sudo /usr/libexec/PlistBuddy -c "Print ':SystemParameters:InjectKexts'" /tmp/config.plist | grep -c "YES") = 0 ]; then + sudo /usr/libexec/PlistBuddy -c "Set :SystemParameters:InjectKexts YES" /tmp/config.plist +fi + +# debug +if [ $gDebug = 2 ]; then + echo "After edit. :SystemParameters:InjectKexts; = $(sudo /usr/libexec/PlistBuddy -c "Print ':SystemParameters:InjectKexts:'" /tmp/config.plist)" +fi + +# exit if error +if [ "$?" != "0" ]; then + echo Error: config.plst edit failed + echo “Original config.plist restored” + sudo cp -X $gCloverDirectory/config-backup.plist $gCloverDirectory/config.plist + sudo rm -R /tmp/ktp.plist + sudo rm -R /tmp/config.plist + sudo rm -R /tmp/config-audio_cloverALC.plist + sudo rm -R /tmp/$gCodec.zip + sudo rm -R /tmp/$gCodec + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +fi + +# case $gSysName in + +# "Yosemite" ) +# kext-dev-mode=1 + +# echo "Edit config.plist/Boot/Arguments/kext-dev-mode=1" + +# bootarguments=$(sudo /usr/libexec/PlistBuddy -c "Print ':Boot:Arguments:'" /tmp/config.plist) + +# debug +# if [ $gDebug = 2 ]; then +# echo "Boot:Arguments: = $bootarguments" +# fi + +# if [ -z "${bootarguments}" ]; then +# sudo /usr/libexec/PlistBuddy -c "Add :Boot:Arguments string" /tmp/config.plist +# echo "Edit config.plist: Add Boot/Argument - Fixed" +# fi + +# if [[ $bootarguments != *kext-dev-mode=1* ]]; then +# newbootarguments="$bootarguments kext-dev-mode=1" +# s udo /usr/libexec/PlistBuddy -c "Set :Boot:Arguments $newbootarguments" /tmp/config.plist +# fi + +# debug +# if [ $gDebug = 2 ]; then +# echo "After edit. Boot:Arguments: = $(sudo /usr/libexec/PlistBuddy -c "Print ':Boot:Arguments:'" /tmp/config.plist)" +# fi + +# ;; +# esac + +# # exit if error +# if [ "$?" != "0" ]; then +# echo Error: config.plst edit failed +# echo “Original config.plist restored” +# sudo cp -X $gCloverDirectory/config-backup.plist $gCloverDirectory/config.plist +# sudo rm -R /tmp/ktp.plist +# sudo rm -R /tmp/config.plist +# sudo rm -R /tmp/config-audio_cloverALC.plist +# sudo rm -R /tmp/$gCodec.zip +# sudo rm -R /tmp/$gCodec +# echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." +# exit 1 +# fi + +echo "Download kext patches" + +gDownloadLink="https://raw.githubusercontent.com/toleda/audio_cloverALC/master/config-audio_cloverALC.plist.zip" +sudo curl -o "/tmp/config-audio_cloverALC.plist.zip" $gDownloadLink +unzip -qu "/tmp/config-audio_cloverALC.plist.zip" -d "/tmp/" + +# add KernelAndKextPatches/KextsToPatch codec patches +# remove existing audio patches + +ktpexisting=$(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:'" /tmp/config.plist) + +if [ -z "${ktpexisting}" ]; then + sudo /usr/libexec/PlistBuddy -c "Add KernelAndKextPatches:KextsToPatch array" /tmp/config.plist + echo "Edit config.plist: Add KernelAndKextPatches/KextsToPatch - Fixed" +fi + +ktpexisting=$(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:'" /tmp/config.plist | grep -c "t1-") + +# remove t1 patches (cloverALC) +index=0 +while [ $ktpexisting -ge 1 ]; do +if [ $(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist | grep -c "t1-") = 1 ]; then + sudo /usr/libexec/PlistBuddy -c "Delete ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist + ktpexisting=$(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:'" /tmp/config.plist | grep -c "t1-") + index=$((index - 1)) +fi +index=$((index + 1)) +# debug +if [ $gDebug = 2 ]; then + echo "t1 patches" + echo "index = $index" + echo "ktpexisting = $ktpexisting" +fi +done + +# remove AppleHDAController patches (mb) +ktpexisting=$(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:'" /tmp/config.plist | grep -c "AppleHDAController") + +index=0 +while [ $ktpexisting -ge 1 ]; do +if [ $(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist | grep -c "AppleHDAController") = 1 ]; then + if [ $(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist | grep -c "x99") = 0 ]; then + sudo /usr/libexec/PlistBuddy -c "Delete ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist + fi + ktpexisting=$(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:'" /tmp/config.plist | grep -c "AppleHDAController") + index=$((index - 1)) +fi +index=$((index + 1)) +# debug +if [ $gDebug = 2 ]; then + echo "AppleHDAController patches (mb)" + echo "index = $index" + echo "ktpexisting = $ktpexisting" +fi +done + +# remove AppleHDA patches (mb) +ktpexisting=$(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:'" /tmp/config.plist | grep -c "AppleHDA") + +index=0 +while [ $ktpexisting -ge 1 ]; do +if [ $(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist | grep -c "AppleHDA") != 0 ]; then + if [ $(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist | grep -c "x99") = 0 ]; then + sudo /usr/libexec/PlistBuddy -c "Delete ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist + fi + ktpexisting=$(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:'" /tmp/config.plist | grep -c "AppleHDA") + index=$((index - 1)) +fi +gMB=1 +index=$((index + 1)) +# debug +if [ $gDebug = 2 ]; then + echo "AppleHDA patches (mb)" + echo "index = $index" + echo "ktpexisting = $ktpexisting" +fi +done + +# remove AppleHDA patches (any remaining) +ktpexisting=$(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:'" /tmp/config.plist | grep -c "AppleHDA") + +index=0 +while [ $ktpexisting -ge 1 ]; do +if [ $(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist | grep -c "AppleHDA") = 1 ]; then + if [ $(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist | grep -c "x99") = 0 ]; then + sudo /usr/libexec/PlistBuddy -c "Delete ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist + fi + ktpexisting=$(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:'" /tmp/config.plist | grep -c "AppleHDA") + index=$((index - 1)) +fi +gMB=1 +index=$((index + 1)) + +# debug +if [ $gDebug = 2 ]; then + echo "AppleHDA patches (any remaining)" + echo "index = $index" + echo "ktpexisting = $ktpexisting" +fi +done + +# set patch for codec + +case $gCodec in +# xml>znl, patch1=0 +885 ) patch1=1;; +887 ) patch1=2;; +888 ) patch1=3;; +889 ) patch1=4;; +892 ) patch1=5;; +898 ) patch1=6;; +1150 ) patch1=7;; +269 ) patch1=8;; +283) patch1=9;; +# el capitan only, patch1=10 +# hd4600 hdmi audio only, patch1=11 +# hd4600 hdmi audio only, patch1=12 +esac + +patch=( 0 $patch1 ) +index=0 + +if [ $gPikerAlphaALC = 1 ]; then + index=1 +fi + +while [ $index -lt 2 ]; do + +sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:${patch[$index]}'" /tmp/config-audio_cloverALC.plist -x > "/tmp/ktp.plist" +ktpcomment=$(sudo /usr/libexec/PlistBuddy -c "Print 'Comment'" "/tmp/ktp.plist") +sudo /usr/libexec/PlistBuddy -c "Set :Comment 't1-$ktpcomment'" "/tmp/ktp.plist" +sudo /usr/libexec/PlistBuddy -c "Add :KernelAndKextPatches:KextsToPatch:0 dict" /tmp/config.plist +sudo /usr/libexec/PlistBuddy -c "Merge /tmp/ktp.plist ':KernelAndKextPatches:KextsToPatch:0'" /tmp/config.plist + +index=$((index + 1)) +done + +case $gSysName in + +"El Capitan" ) + +case $gCodec in + +887|888|889|892|898|1150 ) + +# codec patch out/credit lisai9093 +sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:10}'" /tmp/config-audio_cloverALC.plist -x > "/tmp/ktp.plist" +ktpcomment=$(sudo /usr/libexec/PlistBuddy -c "Print 'Comment'" "/tmp/ktp.plist") +sudo /usr/libexec/PlistBuddy -c "Set :Comment 't1-$ktpcomment'" "/tmp/ktp.plist" +sudo /usr/libexec/PlistBuddy -c "Add :KernelAndKextPatches:KextsToPatch:0 dict" /tmp/config.plist +sudo /usr/libexec/PlistBuddy -c "Merge /tmp/ktp.plist ':KernelAndKextPatches:KextsToPatch:0'" /tmp/config.plist +;; + +esac + +esac + +# codec patch hd4600 hdmi audio/credit TimeWalker75a +if [ $choice2 = y ]; then + index=11 + + while [ $index -lt 13 ]; do + +sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:$index}'" /tmp/config-audio_cloverALC.plist -x > "/tmp/ktp.plist" +ktpcomment=$(sudo /usr/libexec/PlistBuddy -c "Print 'Comment'" "/tmp/ktp.plist") +sudo /usr/libexec/PlistBuddy -c "Set :Comment 't1-$ktpcomment'" "/tmp/ktp.plist" +sudo /usr/libexec/PlistBuddy -c "Add :KernelAndKextPatches:KextsToPatch:0 dict" /tmp/config.plist +sudo /usr/libexec/PlistBuddy -c "Merge /tmp/ktp.plist ':KernelAndKextPatches:KextsToPatch:0'" /tmp/config.plist + + index=$((index + 1)) + done + +fi + +# exit if error +if [ "$?" != "0" ]; then + echo Error: config.plst edit failed + echo “Original config.plist restored” + sudo cp -X $gCloverDirectory/config-backup.plist $gCloverDirectory/config.plist + sudo rm -R /tmp/ktp.plist + sudo rm -R /tmp/config.plist + sudo rm -R /tmp/config-audio_cloverALC.plist + sudo rm -R /tmp/$gCodec.zip + sudo rm -R /tmp/$gCodec + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# install updated config.plst +case $gDebug in + +0 ) + sudo cp -R "/tmp/config.plist" "$gCloverDirectory/config.plist" + ;; + +1|2 ) + sudo cp -R /tmp/config.plist /tmp/$gCodec + echo "/tmp/config.plist copied to /tmp/$gCodec" + ;; + +esac + +# cleanup /tmp +sudo rm -R /tmp/ktp.plist +sudo rm -R /tmp/config.plist +sudo rm -R /tmp/config-audio_cloverALC.plist +sudo rm -R /tmp/config-audio_cloverALC.plist.zip + +# echo "config.plist patching finished." + +if [ $gPikerAlphaALC = 1 ]; then + +# download AppleHDA8Series.sh to /tmp/ +echo "Download Piker-Alpha/AppleHDA8Series.sh" + +curl -o /tmp/AppleHDA8Series.zip https://codeload.github.com/Piker-Alpha/AppleHDA8Series.sh/zip/master +if [ -d /tmp/AppleHDA8Series ]; then + sudo rm -R /tmp/AppleHDA8Series +fi +unzip -qu /tmp/AppleHDA8Series.zip -d /tmp/ +mv /tmp/AppleHDA8Series.sh-master /tmp/AppleHDA8Series + +# remove installed AppleHDAxxx.kext +if [ -d "$gLibraryDirectory/AppleHDA$gCodec.kext" ]; then + sudo rm -R "$gLibraryDirectory/AppleHDA$gCodec.kext" +fi + +# run AppleHDA8Series.sh +echo "Install $gLibraryDirectory/AppleHDA$gCodec.kext" +chmod +x /tmp/AppleHDA8Series/AppleHDA8Series.sh +sh /tmp/AppleHDA8Series/AppleHDA8Series.sh -a $gCodec -l $gAudioid -d $gLibraryDirectory + +# exit if error +if [ "$?" != "0" ]; then + echo Error: AppleHDA8Series.sh + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + sudo rm -R /tmp/AppleHDA8Series.zip + sudo rm -R /tmp/AppleHDA8Series + sudo rm -R /tmp/ALC$gCodec.zip + sudo rm -R /tmp/$gCodec + sudo rm -R /tmp/ConfigData-ALC$gCodec.xml + sudo rm -R /tmp/HDEF.txt + exit 1 +fi + +# clean up +sudo rm -R /tmp/AppleHDA8Series.zip +sudo rm -R /tmp/AppleHDA8Series +sudo rm -R /tmp/ALC$gCodec.zip +sudo rm -R /tmp/$gCodec +sudo rm -R /tmp/ConfigData-ALC$gCodec.xml +sudo rm -R /tmp/HDEF.txt + +else # PikerAlphaALC +# determine kexts/folder +if [ -d "$gCloverDirectory/$gSysFolder" ]; then + gSysFolder=$gSysFolder + else + gSysFolder=kexts/Other +fi + +if [ $gtestALC = 0 ]; then + echo "Download config kext and install ..." + gDownloadLink="https://raw.githubusercontent.com/toleda/audio_cloverALC/master/realtekALC.kext.zip" + sudo curl -o "/tmp/realtekALC.kext.zip" $gDownloadLink + unzip -qu "/tmp/realtekALC.kext.zip" -d "/tmp/" +fi + +# install realtekALC.kext + +case $gDebug in + +0 ) + +case $gMB in + + 0 ) +# to EFI/CLOVER/kexts/ (cloverALC) + + if [ -d "$gCloverDirectory/$gSysFolder/realtekALC.kext" ]; then + sudo rm -R "$gCloverDirectory/$gSysFolder/realtekALC.kext" + # echo "$gCloverDirectory/$gSysFolder/realtekALC.kext deleted" + fi + + sudo cp -R "/tmp/realtekALC.kext" "$gCloverDirectory/$gSysFolder/" + echo "Install $gCloverDirectory/$gSysFolder/realtekALC.kext" + if [ -d "$gLibraryDirectory/realtekALC.kext" ]; then + sudo rm -R "$gLibraryDirectory/realtekALC.kext" + fi + ;; + + 1 ) +# to Library/Extensions/ (mb) + + if [ -d "$gLibraryDirectory/realtekALC.kext" ]; then + sudo rm -R "$gLibraryDirectory/realtekALC.kext" + else + gMB=0 + # echo "$gLibraryDirectory/realtekALC.kext deleted" + fi + + sudo cp -R "/tmp/realtekALC.kext" "/tmp/$gCodec" + echo "Install $gLibraryDirectory/realtekALC.kext" + ;; + + esac + + ;; + +1|2 ) + sudo cp -R /tmp/realtekALC.kext /tmp/$gCodec + echo "/tmp/realtekALC.kext copied to /tmp/$gCodec" + ;; + +esac + +sudo rm -R /tmp/realtekALC.kext.zip +sudo rm -R /tmp/realtekALC.kext +sudo rm -R /tmp/__MACOSX + +# exit if error +if [ "$?" != "0" ]; then + echo Error: Download failure + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# set install folder +case $gDebug in + +0 ) + +# install codec specific files + if [ -d "$gHDAContentsDirectory/Resources/*.zml.zlib" ]; then + sudo rm -R "$gHDAContentsDirectory/Resources/*.zml.zlib" +# echo "System/Library/Extensions/AppleHDA.kext/ALC$gCodec zml files deleted" + fi + + echo "Install System/Library/Extensions/AppleHDA.kext/ALC$gCodec zml files" + sudo install -m 644 -o root -g wheel /tmp/$gCodec/Platforms.xml.zlib $gHDAContentsDirectory/Resources/Platforms.zml.zlib + sudo install -m 644 -o root -g wheel /tmp/$gCodec/layout1.xml.zlib $gHDAContentsDirectory/Resources/layout1.zml.zlib + + case $gCodec in + + 887|888|889|892|898|1150 ) + sudo install -m 644 -o root -g wheel /tmp/$gCodec/layout2.xml.zlib $gHDAContentsDirectory/Resources/layout2.zml.zlib + sudo install -m 644 -o root -g wheel /tmp/$gCodec/layout3.xml.zlib $gHDAContentsDirectory/Resources/layout3.zml.zlib + ;; +# 1150 ) +# sudo install -m 644 -o root -g wheel /tmp/$gCodec/layout2.xml.zlib $gHDAContentsDirectory/Resources/layout2.zml.zlib +# ;; + esac + ;; + +1|2 ) + if [ -d $gDesktopDirectory$gCodec-${gDebugMode[$gDebug]} ]; then + sudo rm -R $gDesktopDirectory$gCodec-${gDebugMode[$gDebug]} + fi + sudo cp -R /tmp/$gCodec $gDesktopDirectory$gCodec-${gDebugMode[$gDebug]} + sudo rm -R "$gDesktopDirectory$gCodec-${gDebugMode[$gDebug]}"/Info-*.plist + echo "$gCodec-${gDebugMode[$gDebug]} copied to Desktop" + echo "No system files were changed" + ;; + +esac + +# exit if error +if [ "$?" != "0" ]; then + echo "Error: Installation failure" + sudo rm -R "$gHDAContentsDirectory/Resources/*zml.zlib" + sudo touch $gExtensionsDirectory + echo "Original S/L/E/AppleHDA.kext restored" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# remove temp files +sudo rm -R /tmp/ALC$gCodec.zip +sudo rm -R /tmp/$gCodec + +fi # end: PikerAlphaALC + +fi # end: if [ $gCloverALC = 1 ] + +# fix permissions and rebuild cache + +if [ $gDebug = 0 ]; then +case $gSysName in + +"El Capitan"|"Yosemite" ) +echo "Fix permissions ..." +sudo chown -R root:wheel $gExtensionsDirectory/AppleHDA.kext +echo "Kernel cache..." +sudo touch $gExtensionsDirectory +sudo kextcache -Boot -U / +;; + +"Mavericks"|"Mountain Lion" ) +echo "Fix permissions ..." +sudo chown -R root:wheel $gExtensionsDirectory/AppleHDA.kext +echo "Kernel cache..." +sudo touch $gExtensionsDirectory +echo "Allow a few minutes for kernel cache rebuild." +;; + +esac +fi + +# exit if error +# if [ "$?" != "0" ]; then +# echo Error: Maintenance failure +# echo "Verify Permissions" +# echo "Rebuild Kernel Cache" +# echo "Verify S/L/E/AppleHDA.kext" +# echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." +# exit 1 +# fi + +echo "" +case $gDebug in + +0 ) + echo "Install finished, restart required." + ;; + +1|2 ) + echo "Install finished, see Desktop/$gCodec-${gDebugMode[$gDebug]}" + ;; + +esac + +echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." +exit \ No newline at end of file diff --git a/audio_cloverHDMI-110_v0.23.command b/audio_cloverHDMI-110_v0.23.command new file mode 100755 index 0000000..511c99c --- /dev/null +++ b/audio_cloverHDMI-110_v0.23.command @@ -0,0 +1,1844 @@ +#!/bin/sh +# Maintained by: toleda for: github.com/toleda/audio_cloverHDMI +gFile="audio_cloverHDMI-110.command_v0.23 - BETA" +# Credit: bcc9, RevoGirl, PikeRAlpha, RehabMan +# +# OS X Clover HDMI Audio +# +# Enables OS X HDMI audio in 10.11. 10.10, 10.9 and 10.8, all versions +# 1. Supports Intel integrated graphics and/or AMD and Nvidia discrete graphics +# 2. Installs HDMI audio ssdt and required framebuffer edits (Intel only) +# 3. Native CPU and GPU power management (Intel only, additonal steps required) +# +# Requirements +# 1. OS X: 10.11/10.10/10.9/10.8, all versions +# 2. AppleHDA.kext (If not installed, run 10.x.x installer) +# 3. Recognized Intel/AMD/Nvidia graphics +# 4. Clover only: 1.UEFI, mount EFI partition and 2. Clover Legacy +# +#Supports: +# 1. Intel/desktop series: 9, 8, 7, 6, 5 +# 2. Intel/graphics hd: +# Desktop: HD6200, HD4600+, HD4000, HD3000 +# BRIX/NUC: HD6100, HD6000, HD5500, HD5200, HD5000, HD4000 +# 3. AMD/default framebuffer: R7/R9 3xx, R7/R9 2xx,7xxx, 6xxx, 5xxx +# Except: GCN 1.1/Hawaii/Bonaire) +# 4. Nvidia/OS X drivers: 7xx, 6xx, 5xx, 4xx (except 450, 550, 560) +# Required: Nvidia/Web drivers: 9xx, 750 +# +# Debug Mode (saves ssdt and config.plist to Desktop +# 1. Set audio_cloverHDMI-110.command/gDebug=1 (below) +# 2. Copy config.plist to Desktop +# 3. Continue with Installation/Step 3 +# +# Installation +# 1. Double click audio_cloverHDMI...command +# 2. Enter password at prompt +# 3. Questions (answer y or n) +# Install SSDT-HDMI-HDxxx HDMI audio ssdt (y/n) +# Verify SSDT-HDMI-HDxxx HDMI audio connector (y/n) +# Confirm DP to HDMI connector patch on port 0x5 (y/n) +# Continue to AMD/Nvidia HDMI audio (y/n) +# Install AMD HDMI audio ssdt (y/n) +# 4. Restart +# +# Alpha Change log: +# v0.1 - 1/10/16: clover HDMI audio support +# v0.2 - 1/10/16: set gDebug=0 +# v0.3 - 1/10/16: added IGPU, no displays connected +# v0.4 - 1/10/16: added .aml to cp/ssdt, if typo fixed +# v0.5 - 1/10/16: typo fixed, updates +# +# Beta Change log +# v0.5 - 1/16/16: minor clean up +# v0.6 - 1/26/16: typo fixed, add Desktop/HD6200 +# v0.7 - 1/30/16: add HD3000/HD4000 ssdt_hdef-3 +# v0.8 - 1/31/16: remove exiting patches, fix confirm framebuffer +# v0.9 - 2/5/16: add nuc/bix: HD4000, HD5000, HD5200, HD5500, HD6000, HD6100 +# v0.9.1 - 2/11/16: fix no_igfx +# v0.9.2 - 2/11/16: typo +# v0.9.3 - 2/11/16: set debug +# v0.9.4 - 2/12/16: typos, error handling +# v0.10 - 2/19: x58, x79, x99 support +# v0.12 - 2/27/16: Fix version. typo +# v0.12 - 3/2/16: Add PEG1, typos +# v0.13 - 3/31/16: Add HD530/HD540 ssdts +# v0.14 - 3/31/16: Add 100 series hdef ssdts +# v0.15 - 4/12/16: typo +# v0.16 - 4/17/16: fix errors, minor updates +# v0.17 - 4/18/17: typos +# v0.18 - 4/18/17: HD530 update +# v0.19 - 4/22/17: HD530 update, invalid framebuffer +# v0.20 - 4/25/17: AMD/Nvidia fix +# v0.20 - 4/25/17: Add HD515 ssdt +# v0.21 - 5/30/17: AMD/Nvidia graphics only fix +# v0.22 - 5/30/17: AMD/Nvidia graphics only fix +# v0.23 - 8/16/17: AMD/Nvidia graphics question + +echo " " +echo "Agreement" +echo "The audio_cloverHDMI script is for personal use only. Do not distribute" +echo "the patch, any or all of the files for any reason without permission." +echo "The audio_cloverHDMI script is provided as is and without any warranty." +echo " " + +# set initial variables +# debug=0 - normal install, +# debug=1 - test drive, copy config.plist to Desktop, edited config.plist and ssdt copied to Desktop +gDebug=0 + +gSysVer=`sw_vers -productVersion` +gSysName="El Capitan" +gStartupDisk=EFI +gCloverDirectory=/Volumes/$gStartupDisk/EFI/CLOVER +gDesktopDirectory=/Volumes/$(whoami)/Desktop +gssdtinstall=n +gigfxlvds=0 +gideviceid=0 +givendorid=0 +gigfxhdmicodec=0 +gigfxhdmihdau=y +gigfxportmax=7 +gigfxport5=0 +gigfxports=3 +gigfxnuc=1 +gdgfxname1=0 +gdgfxssdt=0 +gdgfxname=0 +gdgfx=0 +ghdmi=0 + +# Terminal commands +# ioreg -rxn IGPU@2 | grep vendor-id| awk '{ print $4 }' +# ioreg -rxn IGPU@2 | grep device-id | sed -e 's/.*//' +# ioreg -rxn IGPU@2 | grep "AAPL,ig-platform-id"| awk '{ print $4 }' +# ioreg -rxn IGPU@2 | grep "hda-gfx"| awk '{ print $4 }' +# ioreg -rxn IGPU@2 | grep -c "hda-gfx" +# ioreg -rxn HDAU@0 | grep "hda-gfx"| awk '{ print $4 }' +# ioreg -rxn HDAU@0,1 | grep device-id| awk '{ print $4 }' +# ioreg -rxn P0P2@3 | grep vendor-id| awk '{ print $4 }' +# ioreg -rw 0 -p IODeviceTree -n IGPU@2 > /tmp/IGPU.txt +# ioreg -rw 0 -p IOService -n AppleIntelFramebuffer@0 > /tmp/IGPU.txt +# audioinfo=$(cat /tmp/IGPU.txt | grep -c "audio-codec-info") +# connector=$(cat /tmp/IGPU.txt | grep connector-type | sed -e 's/.*//') + +function _patchconfig() +{ +while [ $index -lt 2 ]; do + +# debug +if [ $gDebug = 2 ]; then +echo "index = $index" +echo "patch = ${patch[*]}" +fi + +# add patches to config.plist +sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:${patch[$index]}'" /tmp/config-audio_cloverHDMI.plist -x > "/tmp/ktp.plist" +ktpcomment=$(sudo /usr/libexec/PlistBuddy -c "Print 'Comment'" "/tmp/ktp.plist") +sudo /usr/libexec/PlistBuddy -c "Set :Comment 't2-$ktpcomment'" "/tmp/ktp.plist" +sudo /usr/libexec/PlistBuddy -c "Add :KernelAndKextPatches:KextsToPatch:0 dict" /tmp/config.plist +sudo /usr/libexec/PlistBuddy -c "Merge /tmp/ktp.plist ':KernelAndKextPatches:KextsToPatch:0'" /tmp/config.plist + +index=$((index + 1)) +done +} + +# verify system version +case ${gSysVer} in + + 10.11* ) gSysName="El Capitan" + gSysFolder=kexts/10.11 + gSID=$(csrutil status) + ;; + + 10.10* ) gSysName="Yosemite" + gSysFolder=kexts/10.10 + ;; + + 10.9* ) gSysName="Mavericks" + gSysFolder=kexts/10.9 + ;; + + 10.8* ) gSysName="Mountain Lion" + gSysFolder=kexts/10.8 + ;; + + * ) + echo "OS X Version: $gSysVer is not supported" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + ;; + +esac + +# debug +if [ $gDebug = 2 ]; then + # gSysVer=10.9 + echo "System version: supported" + echo "gSysVer = $gSysVer" +fi + +gDebugMode[0]=Release +gDebugMode[1]=TestDrive +gDebugMode[2]=Debug + +# verify Debug setting +case $gDebug in + + 0|1|2 ) + ;; + + * ) + echo "gDebug = $gDebug not invalid, script terminating" + echo "No system files were changed" + exit 1 + :: + +esac + +echo "File: $gFile" +echo "${gDebugMode[$gDebug]} Mode" + +# credit: mfram, http://forums.macrumors.com/showpost.php?p=18302055&postcount=6 +# get startup disk name +gStartupDevice=$(mount | grep "on / " | cut -f1 -d' ') +gStartupDisk=$(mount | grep "on / " | cut -f1 -d' ' | xargs diskutil info | grep "Volume Name" | perl -an -F'/:\s+/' -e 'print "$F[1]"') + +# debug +if [ $gDebug = 2 ]; then + echo "Boot device: $gStartupDevice" + echo "Boot volume: $gStartupDisk" +fi + +# check for debug (debug=1 and 2 do not touch CLOVER folder) +case $gDebug in +0 ) + +# verify EFI install +gEFI=0 +if [ -d $gCloverDirectory ]; then + gEFI=1 +fi + +if [ $gEFI = 0 ]; then + + if [ -d '/Volumes/ESP/EFI/CLOVER' ]; then + gCloverDirectory=/Volumes/ESP/EFI/CLOVER + gEFI=1 + fi + +fi + +if [ $gEFI = 1 ]; then + echo "EFI partition is mounted" + if [ -f "$gCloverDirectory/config.plist" ]; then + cp -p "$gCloverDirectory/config.plist" "/tmp/config.plist" + if [ -f "$gCloverDirectory/config-backup.plist" ]; then + rm -R "$gCloverDirectory/config-backup.plist" + fi + cp -p "$gCloverDirectory/config.plist" "$gCloverDirectory/config-backup.plist" + else + echo "$gCloverDirectory/config.plist is missing" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi +else + echo "EFI partition not mounted" + +# confirm Clover Legacy install + gCloverDirectory=/Volumes/"$gStartupDisk"/EFI/CLOVER + if [ -d "$gCloverDirectory" ]; then + echo "$gStartupDisk/EFI folder found" + else echo "$gStartupDisk/EFI not found" + echo "EFI/CLOVER folder not available to install HDMI audio" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + +# initialize variable + choice7=n + + while true + do + read -p "Confirm Clover Legacy Install (y/n): " choice7 + case "$choice7" in + + [yY]* ) +# gCloverDirectory=/Volumes/"$gStartupDisk"/EFI/CLOVER + if [ -d "$gCloverDirectory" ]; then + if [ -f "$gCloverDirectory/config.plist" ]; then + cp -p "$gCloverDirectory/config.plist" "/tmp/config.plist" + if [ -f "$gCloverDirectory/config-backup.plist" ]; then + rm -R "$gCloverDirectory/config-backup.plist" + fi + cp -p "$gCloverDirectory/config.plist" "$gCloverDirectory/config-backup.plist" + else + echo "$gCloverDirectory/config.plist is missing" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + + else + echo "$gCloverDirectory not found" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + + break + ;; + + [nN]* ) + echo "User terminated, EFI partition/folder not mounted" + echo “Mount EFI partition and Restart“ + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + ;; + + * ) echo "Try again...";; + esac + done + fi +;; + +1|2 ) + if [ -f "Desktop/config.plist" ]; then + cp -R Desktop/config.plist /tmp/config.plist +# echo "Debug mode" +# echo "Desktop/config.plist copied to /tmp/config.plist" + else + echo "Desktop/config.plist missing, Debug mode not possible" + exit 1 + fi +;; + +esac + +# verify ioreg/HDEF +ioreg -rw 0 -p IODeviceTree -n HDEF > /tmp/HDEF.txt + +if [[ $(cat /tmp/HDEF.txt | grep -c "HDEF@1") = 0 ]]; then +echo "Error: no IOReg/HDEF; BIOS/audio/disabled or ACPI problem" + + while true + do + read -p "Continue without HDEF/onboard audio (y/n): " choice0 + case "$choice0" in + [yY]* ) break;; + [nN]* ) + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." +# rm -R /tmp/HDEF.txt + exit 1 + ;; + * ) echo "Try again...";; + esac + done +fi + +# verify ioreg/GFX0 +ioreg -rw 0 -p IODeviceTree -n GFX0@2 > /tmp/IGPU.txt +if [[ $(cat /tmp/IGPU.txt | grep -c "GFX0@2") = 0 ]]; then + gigfx=0 + +# debug + if [ $gDebug = 2 ]; then + echo "GFX0 - gigfx = $gigfx" + fi + +# verify ioreg/IGPU + ioreg -rw 0 -p IODeviceTree -n IGPU@2 > /tmp/IGPU.txt + if [[ $(cat /tmp/IGPU.txt | grep -c "IGPU@2") = 0 ]]; then + gigfx=0 + +# debug + if [ $gDebug = 2 ]; then + echo "IGPU - gigfx = $gigfx" + fi + + else + gigfx=IGPU@2 + +# debug + if [ $gDebug = 2 ]; then + echo "gigfx = $gigfx" + fi + + fi + +else +gigfx=GFX0@2 + +# debug +if [ $gDebug = 2 ]; then + echo "gigfx = $gigfx" +fi + +fi + +rm -R /tmp/IGPU.txt +rm -R /tmp/HDEF.txt + +# get installed codecs +gCodecsInstalled=$(ioreg -rxn IOHDACodecDevice | grep VendorID | awk '{ print $4 }' | sed -e 's/ffffffff//') + +# debug +if [ $gDebug = 2 ]; then +# gCodecsInstalled=0x10ec0900 +# gCodecsInstalled=0x10134206 + echo "gCodecsInstalled = $gCodecsInstalled" +fi + +# no audio codecs detected +if [ -z "${gCodecsInstalled}" ]; then + echo "" + echo "No audio codec detected" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# initialize variables +intelhdmi=0 +amdhdmi=0 +nvidiahdmi=0 + +# find codecs +index=0 +for codec in $gCodecsInstalled +do + +# debug +if [ $gDebug = 2 ]; then + echo "Index = $index, Codec = $codec" +fi + +# sort vendors and devices +case ${codec:2:4} in + + 8086 ) Codecintelhdmi=$codec; intelhdmi=1 + ;; + 1002 ) Codecamdhdmi=$codec; amdhdmi=1 + ;; + 10de ) Codecnvidiahdmi=$codec; nvidiahdmi=1 + ;; + +esac +index=$((index + 1)) +done + +ghdmi=$((intelhdmi+amdhdmi+nvidiahdmi)) +gdgfx=$((amdhdmi+nvidiahdmi)) + +# no hdmi codecs detected +if [ $ghdmi = 0 ]; then + + while true + do + read -p "No HDMI audio codec(s) detected, continue (y/n): " choice4 + case "$choice4" in + [yY]* ) break;; + [nN]* ) + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + rm -R /tmp/HDEF.txt + rm -R /tmp/config.plist + exit 1 + ;; + * ) echo "Try again...";; + esac + done +fi + +# debug +# if [ $gDebug != 0 ]; then + echo "HDMI audio codec(s)" + if [ $intelhdmi = 1 ]; then + echo "Intel: $Codecintelhdmi" + fi + if [ $amdhdmi = 1 ]; then + echo "AMD: $Codecamdhdmi" + fi + if [ $nvidiahdmi = 1 ]; then + echo "Nvidia: $Codecnvidiahdmi" + fi +# fi + +# debug 0 +# if [ $gDebug = 0 ]; then +# if [ $gDebug = 1 ]; then +# if [ $gDebug = 2 ]; then +# echo "" +# gigfx=0 +# gdgfx=0 +# echo "gigfx = $gigfx" +# echo "gdgfx = $gdgfx" +# fi + +if [ $gigfx = 0 ]; then # no IGFX + echo "Integrated Graphics is not installed/enabled" + gigfxnuc=0 + rm -R /tmp/config.plist + rm -R /tmp/HDEF.txt + +else + gideviceid=$(ioreg -rxn $gigfx | grep device-id | sed -e 's/.*//') + +# debug 0 +# if [ $gDebug = 0 ]; then +# if [ $gDebug = 1 ]; then +# if [ $gDebug = 2 ]; then +# gideviceid=26010000 +# gideviceid=62010000 +# gideviceid=12040000 +# gideviceid=220d0000 +# gideviceid=16160000 +# gideviceid=12190000 +# gideviceid=26190000 +# echo "gideviceid = $gideviceid" +# fi + +# initialize variable +gideviceidsupported=y +gigfxindex=0 +gigfxhdmihdef=n +gigfxhdmihdau=n + +# desktop igfx ssdt parameters +case $gideviceid in + +26010000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,snb-platform-id"| awk '{ print $4 }') +gigfxgen=2 +gigfxhdmifb=00020300 +gigfxname="HD3000" +gigfxrepo=hd3000 +gigfxfolder=ssdt_hdmi-hd3000 +gigfxzip=ssdt_hdmi-hd3000-6series-3 +gigfxssdt=SSDT-HDMI-HD3000 +gigfxindex=2 +gigfxhdmihdef=y +gigfxnuc=0 +;; + +62010000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,ig-platform-id"| awk '{ print $4 }') +gigfxgen=3 +gigfxhdmifb=0A006601 +gigfxname="HD4000" +gigfxrepo=hd4000 +gigfxfolder=ssdt_hdmi-hd4000 +gigfxzip=ssdt_hdmi-hd4000-7series-3 +gigfxssdt=SSDT-HDMI-HD4000 +gigfxindex=5 +gigfxhdmihdef=y +gigfxnuc=0 +;; + +12040000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,ig-platform-id"| awk '{ print $4 }') +gigfxgen=4 +gigfxhdmifb=0300220D +gigfxhdmicodec=0c0c +gigfxhdmihdau=y +gigfxname="HD4600+" +gigfxrepo=8series +gigfxfolder=ssdt_hdmi-hd4600+ +gigfxzip=ssdt_hdmi-hd4600+ +gigfxssdt=SSDT-HDMI-HD4600+ +gigfxindex=8 +gigfxnuc=0 +;; + +22160000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,ig-platform-id"| awk '{ print $4 }') +gigfxgen=5 +gigfxhdmifb=03001216 +gigfxhdmihdau=y +gigfxname="HD6200" +gigfxrepo=9series +gigfxfolder=ssdt_hdmi-hd6000+ +gigfxzip=ssdt_hdmi-hd6200 +gigfxssdt=SSDT-HDMI-HD6200 +gigfxindex=0 +gigfxnuc=0 +;; + +12190000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,ig-platform-id"| awk '{ print $4 }') +gigfxgen=6 +gigfxhdmifb=00001219 +gigfxhdmihdau=n +gigfxname="HD530" +gigfxrepo=100series +gigfxfolder=ssdt_hdmi_hd5x0 +gigfxzip=ssdt_hdmi-hd530 +gigfxssdt=SSDT-HDMI-HD530 +gigfxindex=14 +gigfxhdmihdef=y +gigfxport5=1 +gigfxnuc=0 +;; + +16190000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,ig-platform-id"| awk '{ print $4 }') +gigfxgen=6 +gigfxhdmifb=00001219 +gigfxhdmihdau=n +gigfxname="HD515" +gigfxrepo=100series +gigfxfolder=ssdt_hdmi_hd5x0 +gigfxzip=ssdt_hdmi-hd515 +gigfxssdt=SSDT-HDMI-HD515 +gigfxindex=14 +gigfxhdmihdef=y +gigfxport5=1 +gigfxnuc=0 +;; + +* ) +gideviceidsupported=n +;; + +esac + +# nuc igfx ssdt parameters +if [[ $gigfxnuc = 1 && $gideviceidsupported = n ]]; then +gigfxnuc=2 +gideviceidsupported=y +gigfxportmax=6 + +case $gideviceid in + +66010000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,ig-platform-id"| awk '{ print $4 }') +gigfxgen=3 +gigfxhdmifb=0A006601 +gigfxname="HD4000" +gigfxrepo=hd4000 +gigfxfolder=ssdt_hdmi-hd4000 +gigfxzip=ssdt_hdmi-hd4000-7series-3 +gigfxssdt=SSDT-HDMI-HD4000 +gigfxindex=5 +gigfxhdmihdef=y +gigfxportmax=7 +;; + +260a0000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,ig-platform-id"| awk '{ print $4 }') +gigfxgen=4 +gigfxhdmifb=0300220D +gigfxhdmihdau=y +gigfxname="HD5000" +gigfxrepo=8series +gigfxfolder=ssdt_hdmi-hd4600+ +gigfxzip=ssdt_hdmi-hd4600+ +gigfxssdt=SSDT-HDMI-HD4600+ +gigfxindex=8 +;; + +220d0000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,ig-platform-id"| awk '{ print $4 }') +gigfxgen=4 +gigfxhdmifb=0300220D +gigfxhdmihdau=y +gigfxname="HD5200" +gigfxrepo=8series +gigfxfolder=ssdt_hdmi-hd4600+ +gigfxzip=ssdt_hdmi-hd4600+ +gigfxssdt=SSDT-HDMI-HD4600+ +gigfxindex=8 +;; + +16160000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,ig-platform-id"| awk '{ print $4 }') +gigfxgen=5 +gigfxhdmifb=02001616 +gigfxhdmihdau=y +gigfxname="HD5500" +gigfxrepo=9series +gigfxfolder=ssdt_hdmi-hd6000+ +gigfxzip=ssdt_hdmi-hd5500 +gigfxssdt=SSDT-HDMI-HD5500 +gigfxindex=11 +;; + +26160000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,ig-platform-id"| awk '{ print $4 }') +gigfxgen=5 +gigfxhdmifb=04002616 +gigfxhdmihdau=y +gigfxname="HD6000" +gigfxrepo=9series +gigfxfolder=ssdt_hdmi-hd6000+ +gigfxzip=ssdt_hdmi-hd6000 +gigfxssdt=SSDT-HDMI-HD6000 +gigfxindex=11 +;; + +2B160000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,ig-platform-id"| awk '{ print $4 }') +gigfxgen=5 +gigfxhdmifb=04002B16 +gigfxhdmihdau=y +gigfxname="HD6100" +gigfxrepo=9series +gigfxfolder=ssdt_hdmi-hd6000+ +gigfxzip=ssdt_hdmi-hd6100 +gigfxssdt=SSDT-HDMI-HD6100 +gigfxindex=11 +;; + +26190000* ) +gigfxframebuffer=$(ioreg -rxn $gigfx | grep "AAPL,ig-platform-id"| awk '{ print $4 }') +gigfxgen=6 +gigfxhdmifb=00002619 +gigfxhdmihdau=n +gigfxname="HD540" +gigfxrepo=100series +gigfxfolder=ssdt_hdmi_hd5x0 +gigfxzip=ssdt_hdmi-hd540 +gigfxssdt=SSDT-HDMI-HD540 +gigfxindex=0 +gigfxhdmihdef=y +;; + +* ) +gideviceidsupported=n +gigfxnuc=0 +;; + +esac +fi + + +if [ $gideviceidsupported = n ]; then # IGFX not supported + echo "Device ID: 0x$gideviceid not supported" + rm -R /tmp/config.plist + rm -R /tmp/HDEF.txt + + if [ $gdgfx = 0 ]; then + echo "AMD/Nvidia not found" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi +else + +# hdef ssdt audio id +gigfxhdmiaudioid=3 +if [ $gigfxnuc = 2 ]; then + gigfxhdmiaudioid=1 +fi + +if [ $gigfxgen = 6 ]; then + gigfxhdmiaudioid=1 +fi + +# hdef ssdt parameters +ghdefrepo=ALCInjection +ghdeffolder=ssdt_hdef + +case $gigfxname in + +HD3000|HD4000* ) + ghdefzip=ssdt_hdef-$gigfxhdmiaudioid-with_ioreg:hdef + ghdefssdt=SSDT-HDEF-$gigfxhdmiaudioid +;; + +HD515|HD530|HD540* ) + ghdefzip=ssdt_hdef-$gigfxhdmiaudioid-100-hdas + ghdefssdt=SSDT-HDEF-HDAS-$gigfxhdmiaudioid +;; + +esac + +# verify IGPU hfa-gfx injection +igfxhdagfx1=$(ioreg -rxn $gigfx | grep -c "hda-gfx") + +# verify HDEF/HDAU hda-gfx injection +if [ $gigfxhdmihdau = y ]; then + igfxhdagfx2=$(ioreg -rxn HDAU@3 | grep -c "hda-gfx") +else + igfxhdagfx2=$(ioreg -rxn HDEF | grep -c "hda-gfx") +fi + +igfxhdagfx=$(($igfxhdagfx1 + $igfxhdagfx2)) + +# debug 0 +# if [ $gDebug = 0 ]; then +# if [ $gDebug = 1 ]; then +# if [ $gDebug = 2 ]; then +# echo "" +# igfxhdagfx=0 +# igfxhdagfx2=0 +# fi + +# debug +if [ $gDebug = 2 ]; then + echo "igfxhdagfx1 = $igfxhdagfx1" + echo "igfxhdagfx2 = $igfxhdagfx2" + igfxhdagfx=$(($igfxhdagfx1 + $igfxhdagfx2)) + echo "igfxhdagfx = $igfxhdagfx" +fi + +# Intel integrated graphics HDMI audio + +# initialize variable +choice1=n +choice2=n +gconnectoredit=n +gssdtinstall=n + +if [ $igfxhdagfx = 2 ]; then # ssdt working + Echo "$gigfxname HDMI audio is enabled, connector edit may be required" + while true + do + read -p "Verify $gigfxname HDMI audio connector/s (y/n): " choice1 + case "$choice1" in + [yY]* ) gconnectoredit=y; break;; + [nN]* ) gconnectoredit=n; break;; + * ) echo "Try again...";; + esac + done +else +Echo "$gigfxname HDMI audio is not enabled" + while true + do + read -p "Install $gigfxssdt HDMI audio ssdt (y/n): " choice2 + case "$choice2" in + [yY]* ) gssdtinstall=y; break;; + [nN]* ) gssdtinstall=n; break;; + * ) echo "Try again...";; + esac + done +fi + +gamdnvidia=n +if [[ $choice1 = n && $choice2 = n ]]; then + if [ $gdgfx = 0 ]; then + echo "AMD/Nvidia not found" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi +fi + +# debug +if [ $gDebug = 2 ]; then +# echo "" +# gdgfx=0 +# gamdnvidia=y +echo "gdgfx = $gdgfx" +echo "gamdnvidia = $gamdnvidia" +fi + +if [ $gssdtinstall = y ]; then # install igfx ssdt +gconnectoredit=y + if [ $gDebug = 2 ]; then + echo "if [ gssdtinstall = y ]; then # install ssdt" + echo "gdgfx = $gdgfx" + echo "gamdnvidia = $gamdnvidia" + echo "gssdtinstall = $gssdtinstall" + echo "gconnectoredit = $gconnectoredit" + echo "gigfxrepo = $gigfxrepo" + echo "gigfxfolder = $gigfxfolder" + echo "gigfxzip = $gigfxzip" + echo "gDownloadLink=https://raw.githubusercontent.com/toleda/audio_hdmi_$gigfxrepo/master/$gigfxfolder/$gigfxzip.zip" + fi + +# download igfx ssdt +echo "Download $gigfxssdt ..." +gDownloadLink="https://raw.githubusercontent.com/toleda/audio_hdmi_$gigfxrepo/master/$gigfxfolder/$gigfxzip.zip" +sudo curl -o "/tmp/$gigfxzip.zip" $gDownloadLink +unzip -qu "/tmp/$gigfxzip.zip" -d "/tmp/" + +# exit if error +if [ "$?" != "0" ]; then + echo "Error: Download failure, verify network - igfx ssdt" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# debug +if [[ $gDebug = 2 && $gigfxhdmihdef = y ]]; then + echo "ghdefrepo = $ghdefrepo" + echo "ghdeffolder = $ghdeffolder" + echo "ghdefzip = $ghdefzip" + echo "gDownloadLink=hthttps://raw.githubusercontent.com/toleda/audio_$ghdefrepo/master/$ghdeffolder/$ghdefzip.zip" +fi + +# download hdef ssdt, HD3000, HD4000, HD515, HD530, HD540 +if [ $gigfxhdmihdef = y ]; then + echo "Download $ghdefssdt.aml ..." + gDownloadLink="https://raw.githubusercontent.com/toleda/audio_$ghdefrepo/master/$ghdeffolder/$ghdefzip.zip" + sudo curl -o "/tmp/$ghdefzip.zip" $gDownloadLink + unzip -qu "/tmp/$ghdefzip.zip" -d "/tmp/" +fi + +# exit if error +if [ "$?" != "0" ]; then + echo "Error: Download failure, verify network - hdef ssdt" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# install igfx ssdt to EFI/CLOVER/ACPI/patched (cloverHDMI) +case $gDebug in + +0 ) + if [ -d "$gCloverDirectory/ACPI/patched/$gigfxssdt" ]; then + sudo rm -R "$gCloverDirectory/ACPI/patched/$gigfxssdt" + # echo "$gCloverDirectory/ACPI/patched/$gigfxssdt deleted" + fi + sudo cp -R "/tmp/$gigfxzip/$gigfxssdt.aml" "$gCloverDirectory/ACPI/patched/" + +# exit if error + if [ "$?" != "0" ]; then + echo Error: ssdt copy failure + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + + echo "$gCloverDirectory/ACPI/patched/$gigfxssdt installed" + + if [ $gigfxhdmihdef = y ]; then + if [ -d "$gCloverDirectory/ACPI/patched/$ghdefssdt" ]; then + sudo rm -R "$gCloverDirectory/ACPI/patched/$ghdefssdt" + # echo "$gCloverDirectory/ACPI/patched/$ghdefssdt deleted" + fi + sudo cp -R "/tmp/$ghdefzip/$ghdefssdt.aml" "$gCloverDirectory/ACPI/patched/" + +# exit if error + if [ "$?" != "0" ]; then + echo Error: ssdt copy failure + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + echo "$gigfxname HDEF audio ssdt copied to Desktop" + fi + + echo "$gCloverDirectory/ACPI/patched/$ghdefssdt installed" + fi + ;; + +1|2 ) + sudo cp -R "/tmp/$gigfxzip/$gigfxssdt.aml" "Desktop/$gigfxname-$gigfxssdt.aml" + +# exit if error + if [ "$?" != "0" ]; then + echo Error: ssdt copy failure + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi +# echo "Debug mode" + echo "$gigfxname HDMI audio ssdt copied to Desktop" + + if [ $gigfxhdmihdef = y ]; then + sudo cp -R "/tmp/$ghdefzip/$ghdefssdt.aml" "Desktop/$gigfxname-$ghdefssdt.aml" + +# exit if error + if [ "$?" != "0" ]; then + echo Error: ssdt copy failure + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + echo "$gigfxname HDEF audio ssdt copied to Desktop" + fi +# echo "No system files were changed" + fi + ;; + +esac + +gssdtinstall=OK +# cleanup /tmp +sudo rm -R /tmp/$gigfxzip.zip +sudo rm -R /tmp/$gigfxzip +# sudo rm -R /tmp/IGPU.txt +sudo rm -R /tmp/HDEF.txt +sudo rm -R /tmp/__MACOSX + +if [ $gigfxhdmihdef = y ]; then + sudo rm -R /tmp/$ghdefzip.zip + sudo rm -R /tmp/$ghdefzip +fi + +# exit if error +if [ "$?" != "0" ]; then + sudo rm -R "$gCloverDirectory/ACPI/patched/$gigfxssdt" + echo Error: ssdt install failure + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +fi # install igfx ssdt + +# verify igfx framebuffers +if [ $gconnectoredit = y ]; then # verify framebuffers + + +index=$gigfxport5 +indexmax=$((gigfxport5 + gigfxports - 1)) +port=5 +iaudio=0 + +while [ $index -le $indexmax ]; do + +# debug +if [ $gDebug = 2 ]; then + echo "index = $index" + echo "port = $port" +fi + +# look for display(s) +ioreg -rw 0 -p IOService -n AppleIntelFramebuffer@$index > /tmp/IGPU.txt +audioinfo[$port]=$(cat /tmp/IGPU.txt | grep -c "audio-codec-info") +connector[$port]=$(cat /tmp/IGPU.txt | grep connector-type | sed -e 's/.*//') +iaudio=$(($iaudio + ${audioinfo[$port]})) + + +# debug +if [ $gDebug = 2 ]; then + echo "audioinfo = ${audioinfo[$port]}" + echo "connector = ${connector[$port]}" + echo "iaudio = $iaudio" +fi + +index=$((index + 1)) +port=$((port + 1)) +rm -R /tmp/IGPU.txt +done + +# exit if error +if [ "$?" != "0" ]; then +echo "Error: framebuffer analysis failed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# verify hdmi display, max 1 +# initialize variable +gamdnvidia=n + +case $iaudio in + +0 ) + echo "No display connected to $gigfxname" + + if [ $gdgfx = 0 ]; then + echo "Error: patch not possible" + echo "AMD/Nvidia not found" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + ;; + +1 ) + echo "One display connected, proceeding" + ;; + +2 ) +if [[ $gigfxgen = 4 || $gigfxgen = 5 || $gigfxgen = 6 ]]; then + echo "Two displays connected, proceeding" + else + echo "Error: more than one display connected to $gigfxname, patch not possible" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + fi + ;; + +3 ) + if [ $gigfxhdmihdau = y ]; then + echo "Error: ore than two displays connected to $gigfxname, patch not possible" + else + echo "Error: more than one display connected to $gigfxname, patch not possible" + fi + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + ;; + +* ) + echo Error: display analysis failed + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + ;; + +esac + +# debug +if [ $gDebug = 2 ]; then +echo "gdgfx = $gdgfx" +echo "gamdnvidia = $gamdnvidia" +fi + +# exit if error +if [ "$?" != "0" ]; then + echo Error: display analysis failed + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# debug +if [ $gDebug = 2 ]; then +echo "" +# gigfxname="HD3000" +# gigfxname="HD6200" +fi + +ifbnative=0 + +case $gigfxname in + +HD3000|HD4000* ) # native HDMI connector + connector7=${connector[7]} + if [ $connector7 = "00080000" ]; then # native hdmi + echo "Native $gigfxname/port 0x7 is HDMI connector, no patch required" + ifbnative=1a + fi +;; + +HD6200|HD540* ) # connector detection, 515, 530 removed special case + echo "$gigfxname/$gigfxhdmifb detects and sets HDMI connector, no patch required" + ifbnative=1 +;; + +esac + +# no fb patch required +if [ $ifbnative = 1 ]; then # native fb + sudo rm -R /tmp/config.plist + rm -R /tmp/HDEF.txt + +else + +# confirm ports to edit +port=5 + +# debug +if [ $gDebug = 2 ]; then + echo "gigfxportmax = $gigfxportmax" +fi + +choice3=n +while [ $port -le $gigfxportmax ]; do + # debug + if [ $gDebug = 2 ]; then + echo "port = $port" + echo "audioinfo = ${audioinfo[$port]}" + echo "connector = ${connector[$port]}" + echo "iaudio = $iaudio" + fi + + if [ ${audioinfo[$port]} != 0 ]; then + while true; do + read -p "Confirm DP to HDMI connector edit on port 0x$port (y/n): " choice3 + case "$choice3" in + [yY]* ) echo "Patch port 0x$port"; gifgxfbedit=y; break;; + [nN]* ) echo "Ignore port 0x$port"; audioinfo[$port]=0; iaudio=$(($iaudio-1)); break;; + * ) echo "Try again...";; + esac + done + + # debug + if [ $gDebug = 2 ]; then + echo "port = $port" + echo "iaudio = $iaudio" + echo "audioinfo = ${audioinfo[$port]}" + echo "connector = ${connector[$port]}" + echo "iaudio = $iaudio" + fi + fi + +port=$(($port + 1)) +done + +# exit if error +if [ "$?" != "0" ]; then + echo "Error: config.plst edit failed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +if [ $iaudio = 0 ]; then # no framebuffer edits + echo "No framebuffer edits requested" + rm -R /tmp/config.plist +# rm -R /tmp/HDEF.txt + +else +# download connector edits +echo "Download $gigfxname HDMI audio connector edits ..." +gDownloadLink="https://raw.githubusercontent.com/toleda/audio_cloverHDMI/master/config-audio_cloverHDMI.plist.zip" +sudo curl -o "/tmp/config-audio_cloverHDMI.plist.zip" $gDownloadLink +unzip -qu "/tmp/config-audio_cloverHDMI.plist.zip" -d "/tmp/" + +# verify AppleHDAController patches (mb/cloverALC) +ktpexisting=$(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:'" /tmp/config.plist | grep -c "AppleHDAController") + +# debug +if [ $gDebug = 2 ]; then + echo "ktpexisting - AppleHDAController = $ktpexisting" +fi + +# exit if error +if [ "$?" != "0" ]; then + echo "Error: config.plst/hd4600 codec edit failed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# remove 0c0c patches (mb, cloverALC, cloverHDMI) +index=0 +while [ $ktpexisting -ge 1 ]; do +if [ $(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist | grep -c "AppleHDAController") = 1 ]; then + sudo /usr/libexec/PlistBuddy -c "Delete ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist + ktpexisting=$((ktpexisting - 1)) + index=$((index - 1)) +fi +index=$((index + 1)) + +# debug +if [ $gDebug = 2 ]; then + echo "index = $index" + echo "ktpexisting = $ktpexisting" +fi +done + +# remove t2- patches (cloverHDMI) + +# verify t2 patches (mb/cloverALC) +ktpexisting=$(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:'" /tmp/config.plist | grep -c "t2-") + +# debug +if [ $gDebug = 2 ]; then + echo "ktpexisting - t2- = $ktpexisting" +fi + +index=0 +while [ $ktpexisting -ge 1 ]; do +if [ $(sudo /usr/libexec/PlistBuddy -c "Print ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist | grep -c "t2-") = 1 ]; then + sudo /usr/libexec/PlistBuddy -c "Delete ':KernelAndKextPatches:KextsToPatch:$index dict'" /tmp/config.plist + ktpexisting=$((ktpexisting - 1)) + index=$((index - 1)) +fi +index=$((index + 1)) + +# debug +if [ $gDebug = 2 ]; then + echo "index = $index" + echo "ktpexisting = $ktpexisting" +fi +done + +# patch summary +# iaudio=1 # number of connector edits +# audioinfo[5]=1 # audio on port 0x5 +# audioinfo[6]=0 # audio on port 0x5 +# audioinfo[7]=0 # audio on port 0x5 +# connector[5]=00040000 # native port 0x5 connector +# connector[6]=00040000 # native port 0x6 connector +# connector[7]=00040000 # native port 0x7 connector +# config-audio_cloverHDMI.plist/.../KextsToPatch +# Item 0: 10.9-10.11-HD4600_HDMI_Audio-1of2 Item 0 + Item 1 +# Item 1: 10.9-10.11-HD4600_HDMI_Audio-2of2 +# Item 2: 10.10-10.11-SNB-Port _0x5-DP2HDMI Item 2 + Item 4 +# Item 3: 10.10-10.11-SNB-Port _0x6-DP2HDMI Item 3 + Item 4 +# Item 4: 10.10-10.11-SNB-Port _0x7-DP2HDMI +# Item 5: 10.10-10.11-Capri-Port _0x5-DP2HDMI Item 5 + Item 7 +# Item 6: 10.10-10.11-Capri-Port _0x6-DP2HDMI Item 6 + Item 7 +# Item 7: 10.10-10.11-Capri-Port _0x7-HDMI2DP +# Item 8: 10.10-10.11-Azul-Port_0x5-DP2HDMI +# Item 9: 10.10-10.11-Azul-Port_0x6-DP2HDMI +# Item 10: 10.10-10.11-Azul-Port_0x7-DP2HDMI +# Item 11: 10.10-10.11-BDW010509-Port_0x5-DP2HDM (010509) +# Item 12: 10.10-10.11-BDW010509-Port_0x5-DP2HDM (01050b) +# Item 13: 10.11.4-SKL-1912000-4_displays +# Item 14: 10.11.4-SKL-1912000-Port_0x5-DP2HDM (010509) +# Item 15: 10.11.4-SKL-1912000-Port_0x6-DP2HDM (02040a) +# Item 16: 10.11.4-SKL-1912000-Port_0x7-DP2HDM (03060a) + +# debug +if [ $gDebug = 2 ]; then + echo "gigfxhdmicodec = $gigfxhdmicodec" +fi + +# codec patch hd4600 hdmi audio/credit TimeWalker75a +if [ $gigfxhdmicodec = "0c0c" ]; then + index=0 + patch=( 1 0 ) + _patchconfig +fi + +# exit if error +if [ "$?" != "0" ]; then + echo "Error: config.plst/hd4600 codec edit failed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# hd515,hd530 4 port edit +if [ $gigfxhdmifb = "00001219" ]; then + index=1 + patch[0]=0 + patch[1]=13 + _patchconfig + patch[1]=0 +fi + +# patch framebuffer +case $gigfxgen in + +2|3 ) + if [ ${audioinfo[5]} = 1 ]; then + patch[0]=$gigfxindex + fi + if [ ${audioinfo[6]} = 1 ]; then + patch[0]=$(($gigfxindex+1)) + fi + patch[1]=$(($gigfxindex+2)) + ;; + +4|5|6 ) + + index=0 + port=5 + +# debug + if [ $gDebug = 2 ]; then + echo "gigfxportmax = $gigfxportmax" + fi + + while [ $port -le $gigfxportmax ]; do + if [ ${audioinfo[$port]} != 0 ]; then + patch[$index]=$(($gigfxindex + $port - 5)) + index=$(($index + 1)) + + # debug + if [ $gDebug = 2 ]; then + echo "port = $port" + echo "gigfxindex = $gigfxindex" + echo "index = $index" + echo "patch-a = ${patch[*]}" + fi + fi + port=$(($port + 1)) + done + ;; + + * ) + echo "Intel HD Graphics Gen $gigfxgen is not supported" + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 + ;; + + +esac + +# debug +if [ $gDebug = 2 ]; then + echo "patch-b = ${patch[*]}" +fi + +# 1 patch or 2 +index=1 +case $gigfxgen in + +2|3 ) + if [ $iaudio = 1 ]; then + index=0 + fi + ;; + +esac + +# switch array values +tpatch=${patch[1]} +patch[1]=${patch[0]} +patch[0]=$tpatch + +# debug +if [ $gDebug = 2 ]; then + echo "index = $index" + echo "patch-d = ${patch[*]}" +fi + +_patchconfig + +# exit if error +if [ "$?" != "0" ]; then + echo "Error: config.plst/framebuffer edit failed" + echo “Original config.plist restored” + sudo cp -X $gCloverDirectory/config-backup.plist $gCloverDirectory/config.plist + sudo rm -R /tmp/ktp.plist + sudo rm -R /tmp/config.plist + sudo rm -R /tmp/config-audio_cloverHDMI.plist.zip + sudo rm -R /tmp/config-audio_cloverHDMI.plist + sudo rm -R /tmp/__MACOSX + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# install updated config.plst +case $gDebug in + +0 ) + sudo cp -R "/tmp/config.plist" "$gCloverDirectory/config.plist" + echo "HDMI audio edited $gCloverDirectory/config.plist installed" + ;; + +1|2 ) + if [ -f "Desktop/$gigfxname-config.plist" ]; then + sudo rm -R "Desktop/$gigfxname-config.plist" + fi + sudo cp -R "/tmp/config.plist" "Desktop/$gigfxname-config.plist" +# echo "Debug mode" + echo "$gigfxname HDMI audio edited config.plist copied to Desktop" +# echo "No system files were changed" + ;; + +esac + +# cleanup /tmp +sudo rm -R /tmp/config-audio_cloverHDMI.plist.zip +rm -R /tmp/config-audio_cloverHDMI.plist +rm -R /tmp/config.plist +rm -R /tmp/__MACOSX +rm -R /tmp/ktp.plist + +fi # no framebuffer edits + +fi # verify framebuffers +fi # native fb +fi # IGFX not supported +fi # no IGFX + +# debug +if [ $gDebug = 2 ]; then + echo "AMD/Nvidia discrete graphics HDMI audio" + echo "gigfx = $gigfx" + echo "gdgfx = $gdgfx" +fi + +# AMD/Nvidia discrete graphics HDMI audio + +if [ $gigfxnuc = 0 ]; then # AMD/Nvidia else nuc +# find discrete graphics card + +while true +do + read -p "Install AMD/Nvidia HDMI audio (y/n): " choice8 + case "$choice8" in + [yY]* ) gdgfxhdmi=y; break;; + [nN]* ) gdgfxhdmi=n; break;; + * ) echo "Try again...";; + esac +done + +if [ $gdgfxhdmi = y ]; then # AMD/Nvidia HDMI audio + +# get acpi pcie device name +numname1=12 +gdgfxname1[1]=PEG0@1 +gdgfxname1[2]=PEG1@1 +gdgfxname1[3]=PEGP@1 +gdgfxname1[4]=P0P1@1 +gdgfxname1[5]=P0P2@1 +gdgfxname1[6]=P0P2@3 +gdgfxname1[7]=NPE3@2 +gdgfxname1[8]=NPE3@3 +gdgfxname1[9]=NPE7@3 +gdgfxname1[10]=pci-bridge@1 +gdgfxname1[11]=pci-bridge@3 +gdgfxname1[12]=BR3A@3 + +index=1 +while [ $index -le $numname1 ]; do +dgfxpciname=$(ioreg -rxn ${gdgfxname1[$index]} | grep vendor-id| awk '{ print $4 }') + +# debug + if [ $gDebug = 2 ]; then + echo "gdgfxname1 = ${gdgfxname1[$index]}" + fi + + if [ -n "${dgfxpciname}" ]; then + dgfxindex1=$index + index=$(($numname1 + 1)) + +# debug + if [ $gDebug = 2 ]; then + echo "dgfxindex1 = $dgfxindex1" + fi + + fi + + index=$(($index + 1)) +done + +gdgfxpciname1=${gdgfxname1[$dgfxindex1]} + +# debug +if [ $gDebug = 2 ]; then + echo "gdgfxpciname1 = ${gdgfxname1[$dgfxindex1]}" + echo "gdgfxpciname1 = $gdgfxpciname1" +fi + +if [ $gdgfxpciname1 = 0 ]; then +echo "Error: discrete graphics card not found, unknown acpi PCI0 name" +echo "Names checked: ${gdgfxname1[@]}" +echo "No system files were changed" +echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." +exit 1 +fi + +# get acpi graphics device name +# get acpi graphics device name +numname2=6 +gdgfxname2[1]=PEGP@0 +gdgfxname2[2]=GFX0@0 +gdgfxname2[3]="display@0" +gdgfxname2[4]="pci-display@0" +gdgfxname2[5]=GFX1@0 +gdgfxname2[6]=H000@0 +# gdgfxname2[7]=pci10de +# gdgfxname2[8]=pci1002 + + +#find discrete graphics vendor-id +index=1 +while [ $index -le $numname2 ]; +do +dgfxvendorid=$(ioreg -rxn ${gdgfxname2[$index]} | grep vendor-id| awk '{ print $4 }') +dgfxdeviceid=$(ioreg -rxn ${gdgfxname2[$index]} | grep device-id| awk '{ print $4 }') + +if [ $gDebug = 2 ]; then + echo "gdgfxname2 = ${gdgfxname2[$index]}" +fi + +if [ -n "${dgfxvendorid}" ]; then + gdgfxpciname2=${gdgfxname2[$index]} + + index0=1 + for vendor in $dgfxvendorid + do + +# debug + if [ $gDebug = 2 ]; then + echo "index0 = $index, vendor-id = ${vendor:1:4}" + fi + +# sort discrete graphics vendors and devices + case ${vendor:1:4} in + + 0210 ) gdgfxvendorid=${vendor:1:4} + gdgfxname=AMD + ;; + + de10 ) gdgfxvendorid=${vendor:1:4} + gdgfxname=Nvidia + ;; + esac + index0=$((index0 + 1)) + done + +# find discrete graphics device-id + index0=1 + for device in $dgfxdeviceid + do + +# debug + if [ $gDebug = 2 ]; then + echo "index0 = $index, device-id = ${device:1:4}" + fi + + gdgfxdeviceid=${device:1:4} + + index0=$((index0 + 1)) + done +fi + +index=$(($index + 1)) +done + +gdgfxvendorid=${gdgfxvendorid:2:2}${gdgfxvendorid:0:2} +gdgfxdeviceid=${gdgfxdeviceid:2:2}${gdgfxdeviceid:0:2} + +# debug 0 +# if [ $gDebug = 0 ]; then +# if [ $gDebug = 1 ]; then +# if [ $gDebug = 2 ]; then +# echo "gdgfxpciname1 = $gdgfxpciname1" +# echo "gdgfxpciname2 = $gdgfxpciname2" +# echo "gdgfxvendorid = ${gdgfxvendorid}" +# echo "gdgfxdeviceid = ${gdgfxdeviceid}" +# gdgfxpciname1=BR3A@3 +# gdgfxpciname2=H060@0 +# echo "gdgfxvendorid = ${gdgfxvendorid}" +# echo "gdgfxdeviceid = ${gdgfxdeviceid}" +# gdgfxvendorid="" +# fi + + +if [ $gdgfxpciname1 = "BR3A@3" ]; then +if [[ $gdgfxpciname1 = "BR3A@3" && $gdgfxpciname2 = "H000@0" ]]; then +echo "X99 HDMI audio supported" +else + +# debug + if [ $gDebug = 2 ]; then + echo "gdgfxpciname1 = $gdgfxpciname1" + echo "gdgfxpciname2 = $gdgfxpciname2" + echo + fi + + gdgfxpciname2="Hxx0@0" + echo "NOTE:ACPI graphics name unknown, H000 installed" + echo "Verify IOReg/BR3A/graphics name, i.e., Hxx0@0 and Hxx1@0,1" + echo "Before restarting, edt EFI/CLOVER/ACPI/patched/SSDT-HDMI-...-$gdgfxpciname1" + echo "MaciASL/Edit/Find: H000/Replace: Hxx0" + echo "MaciASL/Edit/Find: H001/Replace: Hxx1" + echo "Compile/Save/Restart" + echo "More information, see Desktop/[Guide] OS X hdmi audio x99 ssdt" + + while true + do + read -p "AMD(a)/Nvidia(n) graphics (a/n): " choice6 + case "$choice6" in + [aA]* ) gdgfxname="AMD"; break;; + [nN]* ) gdgfxname="Nvidia"; break;; + * ) echo "Try again...";; + esac + done + +fi +fi + +if [ -z "${gdgfxvendorid}" ]; then + if [ $gdgfxpciname1 = "BR3A@3" ]; then + if [ $gDebug = 2 ]; then + echo "gdgfxpciname1 = $gdgfxpciname1" + echo "gdgfxvendorid = $gdgfxvendorid" + fi + + else + if [ $gdgfx != 0 ]; then + echo "AMD/Nvidia HDMI codec found" + fi + echo "AMD/Nvidia graphics not found, unknown acpi PCI0/graphics name" + echo "Names checked: ${gdgfxname2[@]}" + echo "Install finished, restart required." + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit + fi +fi + +if [ $gdgfxpciname2 = "Hxx0@0" ]; then +dgfxhdagfx=0 + +else +echo "$gdgfxname discrete graphics card $gdgfxvendorid$gdgfxdeviceid found on $gdgfxpciname1/$gdgfxpciname2" + +# verify GFX0 hfa-gfx injection +dgfxhdagfx1=$(ioreg -rxn $gdgfxpciname2 | grep -c "hda-gfx") + +# verify HDAU hda-gfx injection +dgfxhdagfx2=$(ioreg -rxn HDAU@0,1 | grep -c "hda-gfx") + +dgfxhdagfx=$(($dgfxhdagfx1 + $dgfxhdagfx2)) + +# debug +if [ $gDebug = 2 ]; then + echo "dgfxhdagfx1 = $dgfxhdagfx1" + echo "dgfxhdagfx2 = $dgfxhdagfx2" + dgfxhdagfx=$(($dgfxhdagfx1 + $dgfxhdagfx2)) + echo "dgfxhdagfx = $dgfxhdagfx" +fi + +fi + +# debug 0 +# if [ $gDebug = 0 ]; then +# if [ $gDebug = 1 ]; then +# if [ $gDebug = 2 ]; then +# echo "" +# dgfxhdagfx=0 +# fi + +choice1=n +if [ $dgfxhdagfx = 2 ]; then # ssdt working + echo "$gdgfxname HDMI audio is enabled" + if [ $gdgfxname = "AMD" ]; then + echo "Frambuffer injection and connector patching may also be required" + echo "Note: AMD kext edits are not available with this script" + fi + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +else + Echo "$gdgfxname HDMI audio is not enabled" + while true + do + read -p "Install $gdgfxname HDMI audio ssdt (y/n): " choice1 + case "$choice1" in + [yY]* ) gssdtinstall=y; break;; + [nN]* ) echo "No system files were changed"; exit;; + * ) echo "Try again...";; + esac + done +fi + +if [ $gdgfxpciname1 = "pci-bridge@1" ]; then +if [ $gDebug = 2 ]; then +echo "gdgfxpciname1 = $gdgfxpciname1" +echo +fi +gdgfxpciname1="PEGP@1" +fi + +if [ $gdgfxpciname1 = "pci-bridge@3" ]; then +if [ $gDebug = 2 ]; then +echo "gdgfxpciname1 = $gdgfxpciname1" +echo +fi +gdgfxpciname1="PEGP@3" +fi + +if [ $gDebug = 2 ]; then +echo "gdgfxpciname1 = $gdgfxpciname1" +echo +fi + +# ssdt repo, folder, file +case $gdgfxname in + +AMD* ) + +gdgfxrepo=amd-nvidia +gdgfxfolder=ssdt_hdmi-amd +gdgfxzip=ssdt_hdmi-amd-default- +gdgfxssdt=SSDT-HDMI-AMD- +;; + +Nvidia* ) + +gdgfxrepo=amd-nvidia +gdgfxfolder=ssdt_hdmi-nvidia +gdgfxzip=ssdt_hdmi-nvidia- +gdgfxssdt=SSDT-HDMI-NVIDIA- +;; + +esac + +if [ ${gdgfxpciname1:0:4} = "PEGP" ];then +gdgfxpciname1=${gdgfxpciname1:0:6} +else +gdgfxpciname1=${gdgfxpciname1:0:4} +fi + +if [ $gdgfxpciname1 = "GFX1" ];then +gdgfxpciname1="GFX0" +echo "NOTE :GFX1 is not available, GFX0 installed" +echo "Before restarting. edt EFI/CLOVER/ACPI/patched/$gdgfxzip$gdgfxpciname1" +echo "MaciASL/Edit/Find: GFX0/Replace: GFX1/Compile/Save/Restart" +fi + +# debug +if [ $gDebug = 2 ]; then + echo "gdgfxrepo = $gdgfxrepo" + echo "gdgfxfolder = $gdgfxfolder" + echo "gdgfxzip = $gdgfxzip" + echo "gDownloadLink=https://raw.githubusercontent.com/toleda/audio_hdmi_$gdgfxrepo/master/$gdgfxfolder/$gdgfxzip$gdgfxpciname1.zip" +fi + +# download ssdt +echo "Download $gdgfxssdt$gdgfxpciname1 ..." +gDownloadLink="https://raw.githubusercontent.com/toleda/audio_hdmi_$gdgfxrepo/master/$gdgfxfolder/$gdgfxzip$gdgfxpciname1.zip" + +if [ $gDebug = 2 ]; then + echo "sudo curl -o /tmp/$gdgfxzip$gdgfxpciname1.zip $gDownloadLink" + echo +fi + +sudo curl -o "/tmp/$gdgfxzip$gdgfxpciname1.zip" $gDownloadLink +unzip -qu "/tmp/$gdgfxzip$gdgfxpciname1.zip" -d "/tmp/" + +# exit if error +if [ "$?" != "0" ]; then + echo "Error: Download failure, verify network". + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +# install dgfx ssdt to EFI/CLOVER/ACPI/patched (cloverHDMI) + +case $gDebug in + +0 ) + if [ -d "$gCloverDirectory/ACPI/patched/$gdgfxssdt$gdgfxpciname1.aml" ]; then + sudo rm -R "$gCloverDirectory/ACPI/patched/$gdgfxssdt$gdgfxpciname1.aml" + # echo "$gCloverDirectoryACPI/patched/$gdgfxssdt$gdgfxpciname1.aml deleted" + fi + sudo cp -R "/tmp/$gdgfxzip$gdgfxpciname1/$gdgfxssdt$gdgfxpciname1.aml" "$gCloverDirectory/ACPI/patched/$gdgfxssdt$gdgfxpciname1.aml" + echo "$gCloverDirectory/ACPI/patched/$gdgfxssdt$gdgfxpciname1.aml installed" + if [ $gdgfxpciname2 = "Hxx0@0" ]; then + cp -R /tmp/$gdgfxzip$gdgfxpciname1/'[Guide] OS X hdmi audio x99 ssdt.pdf' Desktop/'[Guide] OS X hdmi audio x99 ssdt' + fi +;; + +1|2 ) + sudo cp -R "/tmp/$gdgfxzip$gdgfxpciname1/$gdgfxssdt$gdgfxpciname1.aml" "Desktop/$gdgfxname-$gdgfxssdt$gdgfxpciname1.aml" +# echo "Debug mode" +# echo "No system files were changed" + echo "$gdgfxname HDMI audio ssdt copied to Desktop" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + if [ $gdgfxpciname2 = "Hxx0@0" ]; then + cp -R /tmp/$gdgfxzip$gdgfxpciname1/'[Guide] OS X hdmi audio x99 ssdt.pdf' Desktop/'[Guide] OS X hdmi audio x99 ssdt' + fi +# cleanup /tmp + sudo rm -R /tmp/$gdgfxzip$gdgfxpciname1.zip + sudo rm -R /tmp/$gdgfxzip$gdgfxpciname1 +# rm -R /tmp/config.plist + rm -R /tmp/__MACOSX +# rm -R /tmp/HDEF.txt +# rm -R /tmp/IGPU.txt + exit 0 + ;; + +esac + +# cleanup /tmp +sudo rm -R /tmp/$gdgfxzip$gdgfxpciname1.zip +sudo rm -R /tmp/$gdgfxzip$gdgfxpciname1 +sudo rm -R /tmp/__MACOSX + +fi # AMD/Nvidia HDMI audio +fi # AMD/Nvidia + +# exit if error +if [ "$?" != "0" ]; then + sudo rm -R "$gCloverDirectory/ACPI/patched/$gigfxssdt" + echo Error: ssdt install failure + echo "No system files were changed" + echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." + exit 1 +fi + +echo "" +echo "Install finished, restart required." +echo "To save a Copy of this Terminal session: Terminal/Shell/Export Text As ..." +exit 0 + + + +exit \ No newline at end of file diff --git a/cudadriver-7.5.26-macos.dmg b/cudadriver-7.5.30-macos.dmg similarity index 74% rename from cudadriver-7.5.26-macos.dmg rename to cudadriver-7.5.30-macos.dmg index ac7ae07..46b5170 100644 Binary files a/cudadriver-7.5.26-macos.dmg and b/cudadriver-7.5.30-macos.dmg differ