Merge pull request #301 from Valodim/rpi-4-audio

rpi4: add module for audio settings
This commit is contained in:
Jörg Thalheim authored and GitHub committed 2021-08-15 07:03:05 +01:00
commit 566f4da366
2 files changed
+41

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
{ config, lib, pkgs, ... }:
let
cfg = config.hardware.raspberry-pi."4".audio;
in
{
options.hardware = {
raspberry-pi."4".audio = {
enable = lib.mkEnableOption ''
configuration for audio
'';
};
};
config = lib.mkIf cfg.enable {
hardware.deviceTree = {
overlays = [
# Equivalent to dtparam=audio=on
{
name = "audio-on-overlay";
dtsText = ''
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2711";
fragment@0 {
target = <&audio>;
__overlay__ {
status = "okay";
};
};
};
'';
}
];
};
};
}
+1
View File
@@ -2,6 +2,7 @@
{
imports = [
./audio.nix
./dwc2.nix
./modesetting.nix
./poe-hat.nix