mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-09 16:16:21 +01:00
Init support for acer chromebook cp713-1wn(with full audio support from https://github.com/ninelore/flake and https://github.com/WeirdTreeThing/chromebook-linux-audio
This commit is contained in:
parent
7467f155fc
commit
c5d2efcf1d
25
acer/chromebook/cp713-1wn/alsa-ucm-conf-cros.nix
Normal file
25
acer/chromebook/cp713-1wn/alsa-ucm-conf-cros.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib
|
||||
, alsa-ucm-conf
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
alsa-ucm-conf.overrideAttrs (oldAttrs: {
|
||||
wttsrc = fetchFromGitHub {
|
||||
owner = "WeirdTreeThing";
|
||||
repo = "alsa-ucm-conf-cros";
|
||||
rev = "1908a457c7f2bf8b63264fe3b1e0522ea632ac5a";
|
||||
hash = "sha256-h4qphJgXlEGMjpV4+llTaJeM3hoglmmgkXY8rOp+MAI=";
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
cp -rf $wttsrc/ucm2 $out/share/alsa/
|
||||
'';
|
||||
|
||||
meta = oldAttrs.meta // {
|
||||
platforms = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
18
acer/chromebook/cp713-1wn/default.nix
Normal file
18
acer/chromebook/cp713-1wn/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
alsa-ucm-conf-cros = pkgs.callPackage ./alsa-ucm-conf-cros.nix { };
|
||||
in {
|
||||
imports = [
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/pc/laptop
|
||||
../../../common/hidpi.nix
|
||||
];
|
||||
boot.extraModprobeConfig = ''
|
||||
options snd-intel-dspcfg dsp_driver=4
|
||||
options snd-soc-avs ignore_fw_version=1
|
||||
options snd-soc-avs obsolete_card_names=1
|
||||
'';
|
||||
environment.sessionVariables.ALSA_CONFIG_UCM2 = lib.mkDefault "${alsa-ucm-conf-cros}/share/alsa/ucm2";
|
||||
}
|
||||
|
||||
Loading…
Reference in a new issue