mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-23 03:19:42 +01:00
Merge pull request #301 from Valodim/rpi-4-audio
rpi4: add module for audio settings
This commit is contained in:
commit
566f4da366
2 changed files with 41 additions and 0 deletions
40
raspberry-pi/4/audio.nix
Normal file
40
raspberry-pi/4/audio.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./audio.nix
|
||||
./dwc2.nix
|
||||
./modesetting.nix
|
||||
./poe-hat.nix
|
||||
|
|
Loading…
Reference in a new issue