This repository has no description
5.4 kB
122 lines
1# GPD Win Mini 2025 PipeWire EQ configuration
2# Based on https://github.com/aarron-lee/gpd-win-tricks/tree/main/win_mini_equalizer
3# Credit: @BrotherChenwk from the GPD Discord
4{ pkgs, ... }:
5
6let
7 # The ALSA output device - may need adjustment based on PCI enumeration
8 # Use `pactl list sinks short` or `pw-cli list-objects | grep alsa_output` to find the correct device
9 alsaDevice = "alsa_output.pci-0000_c4_00.6.analog-stereo";
10
11 pipewireConfig = pkgs.writeTextDir "share/pipewire/pipewire.conf.d/gpd-win-mini-2025.conf" ''
12 # GPD Win Mini 2025 speaker EQ
13 # Compensates for the small speakers' frequency response deficiencies
14 context.modules = [
15 { name = libpipewire-module-filter-chain
16 args = {
17 node.description = "GPD Win Mini EQ"
18 media.name = "GPD Win Mini EQ"
19 filter.graph = {
20 nodes = [
21 {
22 type = builtin
23 name = eq_band_1
24 label = bq_lowshelf
25 control = { "Freq" = 32.0 "Q" = 1.41 "Gain" = -10.0 }
26 }
27 {
28 type = builtin
29 name = eq_band_2
30 label = bq_peaking
31 control = { "Freq" = 64.0 "Q" = 1.41 "Gain" = -10.0 }
32 }
33 {
34 type = builtin
35 name = eq_band_3
36 label = bq_peaking
37 control = { "Freq" = 125.0 "Q" = 1.41 "Gain" = 6.0 }
38 }
39 {
40 type = builtin
41 name = eq_band_4
42 label = bq_peaking
43 control = { "Freq" = 250.0 "Q" = 1.41 "Gain" = -3.0 }
44 }
45 {
46 type = builtin
47 name = eq_band_5
48 label = bq_peaking
49 control = { "Freq" = 500.0 "Q" = 1.41 "Gain" = 0.0 }
50 }
51 {
52 type = builtin
53 name = eq_band_6
54 label = bq_peaking
55 control = { "Freq" = 1000.0 "Q" = 1.41 "Gain" = -1.0 }
56 }
57 {
58 type = builtin
59 name = eq_band_7
60 label = bq_peaking
61 control = { "Freq" = 2000.0 "Q" = 1.41 "Gain" = -1.0 }
62 }
63 {
64 type = builtin
65 name = eq_band_8
66 label = bq_peaking
67 control = { "Freq" = 4000.0 "Q" = 1.41 "Gain" = 0.0 }
68 }
69 {
70 type = builtin
71 name = eq_band_9
72 label = bq_peaking
73 control = { "Freq" = 8000.0 "Q" = 1.41 "Gain" = 2.0 }
74 }
75 {
76 type = builtin
77 name = eq_band_10
78 label = bq_peaking
79 control = { "Freq" = 16000.0 "Q" = 2.0 "Gain" = 6.0 }
80 }
81 {
82 type = builtin
83 name = eq_band_11
84 label = bq_highshelf
85 control = { "Freq" = 4000.0 "Q" = 1.0 "Gain" = 6.0 }
86 }
87 ]
88 links = [
89 { output = "eq_band_1:Out" input = "eq_band_2:In" }
90 { output = "eq_band_2:Out" input = "eq_band_3:In" }
91 { output = "eq_band_3:Out" input = "eq_band_4:In" }
92 { output = "eq_band_4:Out" input = "eq_band_5:In" }
93 { output = "eq_band_5:Out" input = "eq_band_6:In" }
94 { output = "eq_band_6:Out" input = "eq_band_7:In" }
95 { output = "eq_band_7:Out" input = "eq_band_8:In" }
96 { output = "eq_band_8:Out" input = "eq_band_9:In" }
97 { output = "eq_band_9:Out" input = "eq_band_10:In" }
98 { output = "eq_band_10:Out" input = "eq_band_11:In" }
99 ]
100 }
101
102 audio.channels = 2
103 audio.position = [ FL FR ]
104 capture.props = {
105 node.name = "GPD Win Mini EQ"
106 media.class = Audio/Sink
107 priority.driver = 1009
108 priority.session = 1009
109 }
110 playback.props = {
111 node.name = "GPD Win Mini EQ Fixed"
112 node.passive = true
113 node.target = "${alsaDevice}"
114 }
115 }
116 }
117 ]
118 '';
119in
120{
121 services.pipewire.configPackages = [ pipewireConfig ];
122}