Compare commits

...

6 commits

Author SHA1 Message Date
Logger fa4b758050
Merge 427956eeb5 into 52113c4f5c 2025-11-07 08:29:58 -05:00
Jörg Thalheim 52113c4f5c
Merge pull request #1668 from concatime/fix/rename-modules
Rename some modules to their correct names
2025-11-06 21:07:11 +00:00
Issam E. Maghni fc4c7c6ec7 meta: rename module to pcie-brcmstb
https://github.com/torvalds/linux/blob/v6.17/drivers/pci/controller/Makefile#L37
2025-11-06 15:05:04 -05:00
Issam E. Maghni 744975050f meta: rename module to usb-storage
https://github.com/torvalds/linux/blob/v6.17/drivers/usb/storage/Kconfig#L23-L24
> To compile this driver as a module, choose M here: the
> module will be called usb-storage.
2025-11-06 15:05:04 -05:00
Logger 427956eeb5
Merge branch 'master' into lenovo-legion-16irx8h-audio-fix 2025-10-14 10:12:38 -06:00
Logger 4771157250 lenovo/legion/16irx8h: add comprehensive audio and hardware support
Add full hardware configuration for Legion Pro 7 16IRX8H including:
- Realtek ALC287 + TAS2781 audio with proper kernel params
- Bluetooth LE Audio support via BlueZ settings
- Thermal management (thermald + ACPI fixes)
- Audio group permissions

Fixes audio issues where speakers wouldn't work due to missing
TAS2781 calibration reset and incorrect HDA model detection.
2025-10-04 15:57:16 -06:00
7 changed files with 67 additions and 10 deletions

View file

@ -15,7 +15,7 @@
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"usb-storage"
"sd_mod"
"rtsx_pci_sdmmc"
];

View file

@ -13,7 +13,7 @@
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"usb-storage"
"sd_mod"
"rtsx_pci_sdmmc"
];

View file

@ -19,21 +19,78 @@
config.boot.kernelPackages.nvidia_x11
];
# Comprehensive audio fixes for Legion Pro 7 16IRX8H
# This model has both Realtek ALC287 and TAS2781 audio components
# The TAS2781 I2C codec binds to the HDA subsystem and requires special handling
boot.kernelParams = [
# Audio configuration
"snd_hda_intel.enable_msi=1"
# Legion-specific audio model (required until kernel quirk is upstreamed)
"snd_hda_intel.model=lenovo-legion-7i"
# TAS2781 calibration reset to handle CRC errors in factory calibration data
# This is a known issue on Legion laptops where the TAS2781 firmware has corrupted
# calibration values; resetting allows the codec to initialize with defaults
"snd_soc_tas2781.reset_calib=1"
# More aggressive TAS2781 fixes for Legion
"snd_soc_tas2781.tas2781_dev_id=0x6a"
"snd_hda_intel.single_cmd=1"
# Hardware fixes
"tsc=reliable" # Fix TSC ADJUST firmware bugs common on Legion laptops
# ACPI thermal management fixes for Legion BIOS issues
"acpi.debug_layer=0x2"
"acpi.debug_level=0x2"
"processor.ignore_ppc=1"
];
# Additional audio configuration for Legion Pro 7
boot.extraModprobeConfig = ''
# Force specific Legion audio model for proper speaker routing
options snd-hda-intel model=lenovo-legion-7i single_cmd=1 probe_mask=1
# TAS2781 specific options
options snd-soc-tas2781-comlib reset_calib=1
options snd-hda-scodec-tas2781-i2c reset_calib=1
'';
# Hardware firmware support for Legion audio
hardware.enableRedistributableFirmware = lib.mkDefault true;
# Enable Bluetooth modules
boot.kernelModules = [
"bluetooth"
"btusb"
];
hardware = {
nvidia = {
modesetting.enable = lib.mkDefault true;
powerManagement.enable = lib.mkDefault true;
#
prime = {
intelBusId = "PCI:00:02:0";
nvidiaBusId = "PCI:01:00:0";
};
};
# Enable Bluetooth with Legion-optimized settings
bluetooth = {
enable = lib.mkDefault true;
powerOnBoot = lib.mkDefault false; # Save battery
settings = {
General = {
ControllerMode = "dual";
FastConnectable = "true";
Experimental = "true"; # Enable LE Audio features
KernelExperimental = "true"; # Enable ISO socket support
};
};
};
};
# Cooling management
# Cooling management for Legion laptops
services.thermald.enable = lib.mkDefault true;
# Audio group permissions
users.groups.audio = { };
# √(2560² + 1600²) px / 16 in ≃ 189 dpi
services.xserver.dpi = 189;
}

View file

@ -14,7 +14,7 @@ lib.mkIf config.hardware.librem5.customInitrdModules {
"tps6598x"
"xhci_hcd"
"usbcore"
"usb_storage"
"usb-storage"
"uas"
"xhci_plat_hcd"
];
@ -56,7 +56,7 @@ lib.mkIf config.hardware.librem5.customInitrdModules {
"tps6598x"
"xhci_hcd"
"usbcore"
"usb_storage"
"usb-storage"
"uas"
"xhci_plat_hcd"
];

View file

@ -9,7 +9,7 @@
kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi3;
initrd.availableKernelModules = [
"usbhid"
"usb_storage"
"usb-storage"
];
};

View file

@ -31,9 +31,9 @@
kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi4;
initrd.availableKernelModules = [
"usbhid"
"usb_storage"
"usb-storage"
"vc4"
"pcie_brcmstb" # required for the pcie bus to work
"pcie-brcmstb" # required for the pcie bus to work
"reset-raspberrypi" # required for vl805 firmware to load
]
++ lib.optional config.boot.initrd.network.enable "genet";

View file

@ -16,7 +16,7 @@ in
initrd.availableKernelModules = [
"nvme"
"usbhid"
"usb_storage"
"usb-storage"
];
};