Last active
September 17, 2024 11:04
-
-
Save unya/a1f7a07f5d4b04855806aba88f48b615 to your computer and use it in GitHub Desktop.
Enabling proper sound on ROG Zephyrus G14 GA402XY without driver quirks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DefinitionBlock ("", "SSDT", 1, "RURI", "CSC3551", 0x00000001) | |
{ | |
External (_SB.I2CD, DeviceObj) | |
External (_SB.I2CD.SPKR, DeviceObj) | |
External (_SB.PCI0, DeviceObj) | |
Scope (_SB.PCI0) // Useful if you use different size SO-DIMM than 16GB, marks PCI-E devices as part of NUMA node 0 | |
{ | |
Name (_PXM, 0x00) | |
} | |
Scope (_SB.I2CD.SPKR) // Sound fix - to get proper values for your system, check quirks in latest kernel https://github.com/torvalds/linux/blob/a940d9a43e623d1ba1e5c499aa843516656c0ae4/sound/pci/hda/cs35l41_hda_property.c | |
{ | |
Name (_DSD, Package () // _DSD: Device-Specific Data | |
{ | |
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | |
Package () | |
{ | |
Package () { "cirrus,dev-index", Package () { 0x0040, 0x0041 }}, | |
Package () { "reset-gpios", Package () { | |
SPKR, Zero, Zero, Zero, | |
SPKR, Zero, Zero, Zero, | |
} }, | |
Package () { "spk-id-gpios", Package () { | |
SPKR, 0x01, Zero, Zero, | |
SPKR, 0x01, Zero, Zero, | |
} }, | |
Package () { "cirrus,speaker-position", Package () { Zero, One } }, | |
// gpioX-func: 0 not used, 1 VPSK_SWITCH, 2: INTERRUPT, 3: SYNC | |
Package () { "cirrus,gpio1-func", Package () { Zero, Zero } }, | |
Package () { "cirrus,gpio2-func", Package () { 0x02, 0x02 } }, | |
// boost-type: 0 internal, 1 external | |
Package () { "cirrus,boost-type", Package () { Zero, Zero } }, | |
Package () { "cirrus,boost-ind-nanohenry", Package () { 0x3E8, 0x3E8 }}, | |
Package () { "cirrus,boost-cap-microfarad", Package () { 0x18, 0x18 }}, | |
Package () { "cirrus,boost-peak-milliamp", Package () { 0x1194, 0x1194 }}, | |
}, | |
}) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires acpica-tools and cpio command | |
# Build compiled acpi table | |
iasl -tc cirrus_ssdt_patch.dsl | |
#prepare initrd prepend archive | |
mkdir -p kernel/firmware/acpi/ | |
cp cirrus_ssdt_patch.aml kernel/firmware/acpi/cirrus_ssdt_patch.aml | |
find kernel | cpio -H newc -o >cirrus_ssdt_patch.cpio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, lib, config, ... }: | |
{ | |
# Beware - I had to use full absolute path on my system instead of relative, update as needed | |
boot.initrd.prepend = [ "${./cirrus_ssdt_patch.cpio}" ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment