Skip to content

Commit

Permalink
Add rawDeviceName option for `hardware.framework.laptop13.audioEnha…
Browse files Browse the repository at this point in the history
…ncement`
  • Loading branch information
miketth committed Nov 16, 2024
1 parent 1949610 commit 2bf73a3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion framework/13-inch/common/audio.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,23 @@ in
This option is enabled by default, because keeping the raw speaker device can lead to volume conflicts.
'';
};

rawDeviceName = lib.mkOption {
type = lib.types.string;
default = "alsa_output.pci-0000_c1_00.6.analog-stereo";
description = ''
The name of the raw speaker device. This will vary by device.
You can get this by running `pw-dump | grep -C 20 pci-0000`.
Some models that we tried:
- AMD 7040: alsa_output.pci-0000_c1_00.6.analog-stereo
- Intel 13th gen: alsa_output.pci-0000_00_1f.3.analog-stereo
'';
};
};
};

config = lib.mkIf cfg.enable (let
outputName = "alsa_output.pci-0000_c1_00.6.analog-stereo";
outputName = cfg.rawDeviceName;
prettyName = "Framework Speakers";

# These are pre-made decibel to linear value conversions, since Nix doesn't have pow().
Expand Down

0 comments on commit 2bf73a3

Please sign in to comment.