Add GU605C speaker fix
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -55,15 +55,29 @@
|
||||
boot = {
|
||||
kernelParams = [ "pci=noaer" ];
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
initrd.kernelModules = [
|
||||
"i915"
|
||||
"xhci_pci"
|
||||
"thunderbolt"
|
||||
"vmd"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
|
||||
kernelPatches = [
|
||||
{
|
||||
name = "alc285-fixup";
|
||||
patch = ./gu605c-spi-cs-gpio/alc285-fixup.patch;
|
||||
}
|
||||
];
|
||||
|
||||
initrd = {
|
||||
prepend = [
|
||||
"${import ./gu605c-spi-cs-gpio { inherit pkgs; }}/asus-gu605c-acpi.cpio"
|
||||
];
|
||||
|
||||
kernelModules = [
|
||||
"i915"
|
||||
"xhci_pci"
|
||||
"thunderbolt"
|
||||
"vmd"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
|
12
hosts/himalia/hardware/gu605c-spi-cs-gpio/alc285-fixup.patch
Normal file
12
hosts/himalia/hardware/gu605c-spi-cs-gpio/alc285-fixup.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index cd0d7ba7320e..2a8791d30a5f 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -10982,6 +10982,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
|
||||
SND_PCI_QUIRK(0x1043, 0x1c63, "ASUS GU605M", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
|
||||
+ SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
|
||||
SND_PCI_QUIRK(0x1043, 0x1c80, "ASUS VivoBook TP401", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS),
|
||||
SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC),
|
28
hosts/himalia/hardware/gu605c-spi-cs-gpio/default.nix
Normal file
28
hosts/himalia/hardware/gu605c-spi-cs-gpio/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "asus-gu605c-acpi";
|
||||
version = "0.0.1";
|
||||
|
||||
src = ./gu605c-spi-cs-gpio.asl;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.acpica-tools
|
||||
pkgs.cpio
|
||||
];
|
||||
|
||||
phases = [
|
||||
"buildPhase"
|
||||
"installPhase"
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p kernel/firmware/acpi
|
||||
iasl -we -p kernel/firmware/acpi/${pname} ${src}
|
||||
find kernel | cpio -H newc -o > ${pname}.cpio
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp ${pname}.cpio $out/
|
||||
'';
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This is an SSDT file.
|
||||
*/
|
||||
|
||||
DefinitionBlock ("", "SSDT", 2, "Cirrus", "CsGpios", 0x00001000)
|
||||
{
|
||||
External (_SB_.PC00.SPI0, DeviceObj)
|
||||
External (_SB_.PC00.SPI0.SPK1, DeviceObj)
|
||||
|
||||
Scope (_SB.PC00.SPI0)
|
||||
{
|
||||
Name (_DSD, Package ()
|
||||
{
|
||||
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
|
||||
|
||||
Package ()
|
||||
{
|
||||
Package ()
|
||||
{
|
||||
"cs-gpios",
|
||||
Package ()
|
||||
{
|
||||
0, // Native CS0
|
||||
SPK1, 0, 0, 0, // first GPIO declared in SPK1
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user